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 590280 - [v4l2] add v4l2sink
[v4l2] add v4l2sink
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-30 15:51 UTC by Rob Clark
Modified: 2009-08-04 07:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch adding v4l2sink, based on current git/master branch (170.90 KB, patch)
2009-07-30 15:52 UTC, Rob Clark
committed Details | Review
change where buffers are dequeued for v4l2sink (7.61 KB, patch)
2009-08-03 12:43 UTC, Rob Clark
committed Details | Review

Description Rob Clark 2009-07-30 15:51:53 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>
Comment 1 Rob Clark 2009-07-30 15:52:45 UTC
Created attachment 139568 [details] [review]
patch adding v4l2sink, based on current git/master branch
Comment 2 Rob Clark 2009-08-03 12:43:54 UTC
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)
Comment 3 Sebastian Dröge (slomo) 2009-08-04 07:37:52 UTC
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.