GNOME Bugzilla – Bug 767429
vtdec: Renegotiation from GL to sysmem to GL with playbin
Last modified: 2018-11-03 13:52:06 UTC
+++ This bug was initially created as a clone of Bug #766611 +++
Created attachment 330115 [details] [review] fix What happens is that inside playbin vtdec negotiates GLMemory with glimagesink throught the autoplug-query signal. The autoplug-query signal tho only works while autoplugging, and once vtdec is linked to playsink CAPS queries just go through. When the first CAPS query happens playsink hasn't created the videochain yet (which it creates once the video pad is blocked) so it returns ANY and vtdec negotiates Sysmem. The patch makes vtdec keep the current patch if during negotiation downstream returns ANY.
Review of attachment 330115 [details] [review]: This is more a optimization for vtdec (and other hardware decoders should probably do the same), to keep the codec setup overhead lower and not do unneeded re-setups :) ::: sys/applemedia/vtdec.c @@ +242,2 @@ peercaps = gst_pad_peer_query_caps (GST_VIDEO_DECODER_SRC_PAD (vtdec), NULL); + if (gst_caps_is_any (peercaps) && prevcaps) { This should probably check if the peercaps still are a superset of our current caps, instead of special casing ANY.
commit 9a026799f0a90424d7e20513f45709b4dfdc3d86 Author: Alessandro Decina <alessandro.d@gmail.com> Date: Thu Jun 16 14:18:18 2016 +1000 vtdec: minimize renegotiation to make hw decoding more reliable The hardware decoder can become (temporarily) unavailable across VTDecompressionSessionCreate/Destroy calls. During negotiation if the currently configured caps are still accepted by downstream we keep using them so we don't have to destroy and recreate the decoding session. This indirectly fixes https://bugzilla.gnome.org/show_bug.cgi?id=767429, by making vtdec stick to GLMemory.
The commit above indirectly fixes this. The playsink bug which causes the caps query to return the result of autoplug-query, then ANY, then some other non-ANY caps is still there.
Let's close this one then and open a new bug for the generic playsink problem?
-- 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-bad/issues/397.