From 6588850d7426b792046254d5ddf050c47172e932 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 21 May 2003 06:33:18 +0000 Subject: Some final fixes for the v4lsrc elements. remove software sync thread (use GST_ELEMENT_THREAD_SUGGESTED instead) make... Original commit message from CVS: Some final fixes for the v4lsrc elements. * remove software sync thread (use GST_ELEMENT_THREAD_SUGGESTED instead) * make all src elements threadsafe * fix num_buffer argument setting in v4l2src (VIDIOC_S_PARM) * re-add bufsize (RO) for v4lmjpegsrc * fix the A/V sync calculation in all elements (spvf=GST_SECOND/fps, not GST_SECOND*fps) * probably some more crap.... With all this, it actually works quite well. The TODO files describes the next steps in order to make a full-featured video recorder based on these elements and GStreamer (bottom). Making a simple recorder should be fairly easy now, btw. --- sys/v4l2/gstv4l2src.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys/v4l2/gstv4l2src.h') diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h index 76fc5ef9..1b4ab095 100644 --- a/sys/v4l2/gstv4l2src.h +++ b/sys/v4l2/gstv4l2src.h @@ -52,6 +52,17 @@ struct _GstV4l2Src { struct v4l2_requestbuffers breq; struct v4l2_format format; + /* num of queued frames and some GThread stuff + * to wait if there's not enough */ + gint8 *frame_queue_state; + GMutex *mutex_queue_state; + GCond *cond_queue_state; + gint num_queued; + gint queue_frame; + + /* True if we want to stop */ + gboolean quit; + /* A/V sync... frame counter and internal cache */ gulong handled; gint last_frame; -- cgit v1.2.1