[artoolkit-commits] SF.net SVN: artoolkit: [276] trunk/artoolkit
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: <ret...@us...> - 2008-01-22 22:13:34
|
Revision: 276 http://artoolkit.svn.sourceforge.net/artoolkit/?rev=276&view=rev Author: retrakker Date: 2008-01-22 14:13:36 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Updated GStreamer video capture: - if no configuration string is given at all, fall back to video test image - dereference pad on the sink - changed license to LGPL v2 Updated Configure script: - added fPIC flag to fix compilation issues on x86_ia64 systems where only relocatable code is allowed Modified Paths: -------------- trunk/artoolkit/Configure trunk/artoolkit/include/AR/sys/videoGStreamer.h trunk/artoolkit/lib/SRC/VideoGStreamer/video.c Modified: trunk/artoolkit/Configure =================================================================== --- trunk/artoolkit/Configure 2008-01-04 10:10:10 UTC (rev 275) +++ trunk/artoolkit/Configure 2008-01-22 22:13:36 UTC (rev 276) @@ -108,7 +108,7 @@ GST_INCLUDE=`pkg-config --cflags gstreamer-0.10` GST_LIBS=`pkg-config --libs gstreamer-0.10` - CFLAG="-O $GST_INCLUDE -I/usr/X11R6/include" + CFLAG="-O $GST_INCLUDE -I/usr/X11R6/include -fPIC" LDFLAG="$GST_LIBS -L/usr/X11R6/lib -L/usr/local/lib" ARFLAG="rs" RANLIB="" Modified: trunk/artoolkit/include/AR/sys/videoGStreamer.h =================================================================== --- trunk/artoolkit/include/AR/sys/videoGStreamer.h 2008-01-04 10:10:10 UTC (rev 275) +++ trunk/artoolkit/include/AR/sys/videoGStreamer.h 2008-01-22 22:13:36 UTC (rev 276) @@ -1,9 +1,9 @@ /* * Video capture module utilising the GStreamer pipeline for AR Toolkit * - * (c) Copyrights 2003-2006 Hartmut Seichter + * (c) Copyrights 2003-2008 Hartmut Seichter <http://www.technotecture.com> * - * Licensed under the terms of the GPL + * Licensed under the terms of the LGPL v2 * */ #ifndef AR_VIDEO_GSTREAMER_H Modified: trunk/artoolkit/lib/SRC/VideoGStreamer/video.c =================================================================== --- trunk/artoolkit/lib/SRC/VideoGStreamer/video.c 2008-01-04 10:10:10 UTC (rev 275) +++ trunk/artoolkit/lib/SRC/VideoGStreamer/video.c 2008-01-22 22:13:36 UTC (rev 276) @@ -1,9 +1,9 @@ /* * Video capture module utilising the GStreamer pipeline for AR Toolkit * - * (c) Copyrights 2003-2007 Hartmut Seichter + * (c) Copyrights 2003-2008 Hartmut Seichter <http://www.technotecture.com> * - * licensed under the terms of the GPL v2.0 + * licensed under the terms of the LGPL v2 * */ @@ -22,6 +22,9 @@ #include <string.h> +#define GSTREAMER_TEST_LAUNCH_CFG "videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink" + + struct _AR2VideoParamT { /* size of the image */ @@ -201,8 +204,14 @@ g_printf ("Using config string from environment [%s].\n", envconf); } else { config = NULL; - g_printf ("No video config string supplied, using defaults.\n"); + + g_printf ("Warning: no video config string supplied, using default!.\n"); + + /* setting up defaults - we fall back to the TV test signal simulator */ + config = GSTREAMER_TEST_LAUNCH_CFG; + } + } else { config = config_in; g_printf ("Using supplied video config string [%s].\n", config_in); @@ -254,13 +263,10 @@ pad = gst_element_get_pad (vid->probe, "src"); - /* install the probe callback for capturing */ - + /* install the probe callback for capturing */ gst_pad_add_buffer_probe (pad, G_CALLBACK (cb_have_data), vid); - /* gst_object_unref(pad);*/ - #if 0 /* request ready state */ gst_element_set_state (vid->pipeline, GST_STATE_READY); @@ -282,6 +288,9 @@ /* dismiss the pad */ gst_object_unref (pad); + + /* dismiss the peer-pad */ + gst_object_unref (peerpad); /* wait until it's up and running or failed */ if (gst_element_get_state (vid->pipeline, NULL, NULL, -1) == GST_STATE_CHANGE_FAILURE) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |