GNOME Bugzilla – Bug 786738
ximagesink,xvimagesink: handle drain query
Last modified: 2018-11-03 11:59:21 UTC
Created attachment 358306 [details] [review] xvimagesink: unref current image on a drain query So that an upstream element can claim all buffers to return to its buffer pool.
Created attachment 358307 [details] [review] ximagesink: unref current image on a drain query
Review of attachment 358306 [details] [review]: XVImage does not use buffers from upstream, they could endup being copied into an XImage, so this patch makes no sense.
Review of attachment 358307 [details] [review]: Same.
I think this is invalid, since this sink does not hold on upstream buffers.
Sorry I should have mentioned that this is when used with gst-omx. This is mostly due to GstOMXBufferPool which steal buffers from downstream for the OMX_UseBuffer/UseEGLImage cases https://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxbufferpool.c#n355 . The attached patches are to honor the drain query sent from: https://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideodec.c#n1723 Same thing was done for glimagesink few years ago. This can be reproduced with: GST_OMX_CONFIG_DIR=config/tizonia/ gst-launch-1.0 filesrc location=dynamic_resolution_change.mkv ! matroskademux ! omxvp8dec ! xvimagesink It is worth mentioning that ximagesink and ximagesink allow downstream elements to write directly into the images they have allocated: https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/sys/xvimage/xvimagesink.c#n927 Maybe I should modify the patches to only unref the curr_image if the condition xvimagesink.c#n927 was true when it has ref that buffer (and if its current pool is not xvimagesink's pool) I will provide some logs and tests.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/378.