After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767429 - vtdec: Renegotiation from GL to sysmem to GL with playbin
vtdec: Renegotiation from GL to sysmem to GL with playbin
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 766611
Blocks:
 
 
Reported: 2016-06-09 06:34 UTC by Sebastian Dröge (slomo)
Modified: 2018-11-03 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (2.88 KB, patch)
2016-06-21 05:37 UTC, Alessandro Decina
needs-work Details | Review

Description Sebastian Dröge (slomo) 2016-06-09 06:34:55 UTC
+++ This bug was initially created as a clone of Bug #766611 +++
Comment 1 Alessandro Decina 2016-06-21 05:37:30 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2016-06-21 06:21:39 UTC
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.
Comment 3 Alessandro Decina 2016-06-23 01:46:11 UTC
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.
Comment 4 Alessandro Decina 2016-06-23 01:47:49 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2016-06-23 06:15:02 UTC
Let's close this one then and open a new bug for the generic playsink problem?
Comment 6 GStreamer system administrator 2018-11-03 13:52:06 UTC
-- 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.