GNOME Bugzilla – Bug 590280
[v4l2] add v4l2sink
Last modified: 2009-08-04 07:37:52 UTC
I've implemented a v4l2sink element, as part of the v4l2 plugin. The changes basically amount to: (1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a bit more generic so it can be used both for v4l2src and v42lsink (2) move some of the device probing/configuration/caps stuff into gstv4l2object.c so it does not have to be duplicated between v4l2src and v4l2sink (3) add v4l2sink the patched is attached, or you can find my repo where I have been working at: <http://github.com/robclark/gst-plugins-good>
Created attachment 139568 [details] [review] patch adding v4l2sink, based on current git/master branch
Created attachment 139780 [details] [review] change where buffers are dequeued for v4l2sink The attached patch can be applied on top of the previous patch; it changes v4l2sink to dequeue a buffer if the driver already has more than one buffer. This way, the DQBUF happens when the frame is rendered, not later when _buffer_alloc() is called (which, at least with our current v4l2 display driver, was causing periodic ~180ms latency when dequeuing buffers, which was causing problems with A/V sync)
Thanks, both patches are committed now. Please note that I've removed the OMAP specific hacks (the caps logging and the OMAPZOOM define) because it's not useful in general and requires manual changes to the build anyway so that part of the patch could live in your custom gst-plugins-good tree (which apparently exists already for the build changes). I hope this is no problem for you? commit 99e2ac121d7252aa858a8e0b2db0872d06ca226c Author: Rob Clark <rob@ti.com> Date: Tue Aug 4 09:22:29 2009 +0200 v4l2sink: change where buffers get dequeued It seems to cause strange occasional high latencies (almost 200ms) when dequ commit f19cfbda96d098362cc2a2565197cef347878549 Author: Rob Clark <rob@ti.com> Date: Tue Aug 4 09:14:20 2009 +0200 v4l2: Add v4l2sink element This also does the following changes: (1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a bit more generic so it can be used both for v4l2src and v4l2sink (2) move some of the device probing/configuration/caps stuff into gstv4l2object.c so it does not have to be duplicated between v4l2src and v4l2sink Fixes bug #590280.