[Bug 745287] basesink: drain query doesn't fully work to release v4l2 buffers

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 27 09:45:16 PST 2015


Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:

           What    |Removed                     |Added
                 CC|                            |nicolas.dufresne at collabora.
                   |                            |co.uk

--- Comment #2 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
(In reply to Thiago Sousa Santos from comment #0)
> Created attachment 298090 [details]
> test application
> When receiving a drain query basesink does a gst_buffer_copy of its last
> sample. By default the gst_buffer_copy copies all metadata and also 'copies'
> the memory. 'Copies' because it might only ref the memory.
> This makes the drain query not be effective in returning all memory to the
> v4l2 buffer pool. We have 3 options:
> 1) Make v4l2 mark its memory as 'no-share'
Strong NO ;-P

> 2) Make gst_buffer_copy always do 'deep' memory copies
> 3) Replace basesink's gst_buffer_copy with gst_buffer_copy_into and pass the
> 'deep' flag to really copy the memory

I'm not sure I see the difference between these two, but seem like a better
approach. Though, arguably, buffers might not be mappable, in which case the
copy will fail. We can make this non-fatal, or simply always drop the sample
and be consistent.

(note that DRAIN query it's largely overkill for v4l2src renegotiation. We also
have better argument on why dropping the last sample when proposing a new
buffer pool)

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