From 53e5f028ec832ce34b44e283c4cffe5bdabb5308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Fri, 11 Apr 2008 19:33:53 +0000 Subject: sys/dshowsrcwrapper/gstdshowvideosrc.*: Don't increase latency by queuing buffers in an async queue when the streamin... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Patch by: Ole André Vadla Ravnås * sys/dshowsrcwrapper/gstdshowvideosrc.c: (PROP_DEVICE_NAME), (gst_dshowvideosrc_class_init), (gst_dshowvideosrc_init), (gst_dshowvideosrc_dispose), (gst_dshowvideosrc_stop), (gst_dshowvideosrc_unlock), (gst_dshowvideosrc_unlock_stop), (gst_dshowvideosrc_create), (gst_dshowvideosrc_push_buffer): * sys/dshowsrcwrapper/gstdshowvideosrc.h: Don't increase latency by queuing buffers in an async queue when the streaming thread can't keep up or isn't scheduled often enough for some other reason, but just drop the previous buffer in that case. Also implement GstBaseSrc::unlock for faster unlocking when shutting down. (#520892). --- sys/dshowsrcwrapper/gstdshowvideosrc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dshowsrcwrapper/gstdshowvideosrc.h') diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.h b/sys/dshowsrcwrapper/gstdshowvideosrc.h index 994326fd..8bc52fa9 100644 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.h +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.h @@ -66,8 +66,11 @@ struct _GstDshowVideoSrc IMediaFilter *media_filter; IFilterGraph *filter_graph; - /* async queue which will contain incoming buffers from directshow */ - GAsyncQueue *async_queue; + /* the last buffer from DirectShow */ + GCond * buffer_cond; + GMutex * buffer_mutex; + GstBuffer * buffer; + gboolean stop_requested; gboolean is_rgb; gint width; -- cgit v1.2.1