[Bug 796714] v4l2: add min-buffers properties

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 29 13:56:49 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796714

Nicolas Dufresne (ndufresne) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #8 from Nicolas Dufresne (ndufresne) <nicolas at ndufresne.ca> ---
That has nothing to do with the number of buffers, it's a well know issue with
kmssink implementation, and the legacy DRM API being used. When v4l2src pushes
buffers to kmssink, it ends up blocking for a variable amount of time, which
cause overflow in v4l2src fifo. And it's specially critical on drivers like
IMX.6 one that is an atomic render and does a synchronous commit on
drmModeSetPlane().

The way to go is to implement atomic render support into kmssink, and make the
renderer asynchronous so you only sync when the next buffer comes in. Note that
well known workaround exist, first one was provided to my by Philippe Zabel, it
is to set force-modesetting=1 in order to ensure we use PageFlip. And second
one is to add a queue of at least 1 buffer before kmssink (to simulate an async
render). Only downside is that the queue won't request more buffers like it
should, another issue, but with Gst master, the default number of requested
buffers by v4l2src has been increase for this purpose.

ps. In general, for smooth playback, any frame drop should happen in the sink
element, base on the buffer timestamp, not just the collision of buffers base
on jitter effect. I'll close this bug, as I have always done, because I prefer
upstream fixes for real issues then ugly workaround. Feel free to keep that
workaround in your vendor branch if you don't have the time.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list