Skip to content

v4l2: bufferpool: Drop writable check on output pool process

Output buffers don't have to be writable to be queued. Accepting read-only buffers from the V4L2 buffer pool allows upstream elements to write directly into the V4L2 buffers without triggering a CPU copy into a new buffer from the same V4L2 buffer pool every time.

Tested with the vivid output device:

GST_DEBUG=GST_PERFORMANCE:7 gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video5

With this change, gst_v4l2_buffer_pool_dqbuf() must be allowed to not resize read-only memories of output buffers. I think this should be fine, as !4920 (merged) was clearly aimed at capture buffers.

Merge request reports

Loading