After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520892 - [dshowvideosrc] latency and shutdown improvements
[dshowvideosrc] latency and shutdown improvements
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-07 01:23 UTC by Ole André Vadla Ravnås
Modified: 2008-04-11 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dshowvideosrc_drop_late_and_support_unlock (4.43 KB, patch)
2008-03-07 01:27 UTC, Ole André Vadla Ravnås
committed Details | Review

Description Ole André Vadla Ravnås 2008-03-07 01:23:53 UTC
Please describe the problem:
dshowvideosrc should drop late buffers instead of queuing them and accumulating latency. It would also be nice if it did unlocking for improved teardown.

Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ole André Vadla Ravnås 2008-03-07 01:27:59 UTC
Created attachment 106740 [details] [review]
dshowvideosrc_drop_late_and_support_unlock

Only keep the last video-frame, and also handle unlocking.

* It's not a good idea to keep frames in a GAsyncQueue if the streaming
thread doesn't read fast enough. For instance if the thread gets starved it could end up lagging behind by n frames and thus accumulating latency.
* Remaining GstBuffers on the queue weren't unreffed on teardown.
* Another issue was that there wasn't any unblocking implemented for the call to g_async_queue_pop() in create() if the queue was drained at the point when the capture was stopped.
Comment 2 Julien Isorce 2008-03-08 12:07:27 UTC
Hi, how can I update the files? I made a fix there: http://bugzilla.gnome.org/show_bug.cgi?id=517203

thx
Comment 3 Julien Isorce 2008-03-08 13:03:10 UTC
ok forgot my question lol, mistake
Comment 4 Tim-Philipp Müller 2008-04-11 19:35:27 UTC
Committed, thanks:

 2008-04-11  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>

        * 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).


FWIW, the GST_CAT_{LOG|DEBUG|ERROR|*} statements could use a bit of cleaning up - the _CAT part and argument is not required at all, the

 #define GST_CAT_DEFAULT dshowvideosrc_debug

takes care of that already.