[artoolkit-commits] artoolkit/lib/SRC/VideoGStreamer video.c, 1.2, 1.3
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Hartmut S. <ret...@us...> - 2006-08-04 06:40:52
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoGStreamer In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18192/lib/SRC/VideoGStreamer Modified Files: video.c Log Message: added conditional preroll for the GStreamer pipeline if a V4L Version 2 source is used. This allows ARToolkit to use any V4L2 device out of the box as V4L1 is marked as deprecated in the Linux kernel. Minor update in the simpleTest example to document the usage of the gst-launch parameters with V4L2 Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoGStreamer/video.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** video.c 30 Jun 2006 13:13:13 -0000 1.2 --- video.c 4 Aug 2006 06:40:46 -0000 1.3 *************** *** 159,162 **** --- 159,163 ---- GstPad *pad; GstXML *xml; + GstStateChangeReturn _ret; /* initialise GStreamer */ *************** *** 212,217 **** gst_object_unref (pad); - - /* request ready state */ gst_element_set_state (vid->pipeline, GST_STATE_READY); --- 213,216 ---- *************** *** 234,238 **** } ! #if 0 /* write the bin to stdout */ --- 233,260 ---- } ! /* now preroll for V4L v2 interfaces */ ! if (strstr(config, "v4l2src") != 0) ! { ! /* set playing state of the pipeline */ ! gst_element_set_state (vid->pipeline, GST_STATE_PLAYING); ! ! /* wait until it's up and running or failed */ ! if (gst_element_get_state (vid->pipeline, NULL, NULL, -1) == GST_STATE_CHANGE_FAILURE) { ! g_error ("libARvideo: failed to put GStreamer into PLAYING state!\n"); ! } else { ! g_print ("libARvideo: GStreamer pipeline is PLAYING!\n"); ! } ! ! /* set playing state of the pipeline */ ! gst_element_set_state (vid->pipeline, GST_STATE_PAUSED); ! ! /* wait until it's up and running or failed */ ! if (gst_element_get_state (vid->pipeline, NULL, NULL, -1) == GST_STATE_CHANGE_FAILURE) { ! g_error ("libARvideo: failed to put GStreamer into PAUSED state!\n"); ! } else { ! g_print ("libARvideo: GStreamer pipeline is PAUSED!\n"); ! } ! } ! #if 0 /* write the bin to stdout */ *************** *** 282,286 **** return 0; ! } } return 1; --- 304,310 ---- return 0; ! } else { ! g_print ("libARvideo: GStreamer pipeline is PLAYING!\n"); ! } } return 1; |