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 723096 - decodebin: Make it possible to register multiple handlers to decodebin's autoplug-select signal
decodebin: Make it possible to register multiple handlers to decodebin's auto...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Mac OS
: Normal enhancement
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-27 13:32 UTC by Alessandro Decina
Modified: 2014-01-28 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed change (3.66 KB, patch)
2014-01-27 13:32 UTC, Alessandro Decina
committed Details | Review

Description Alessandro Decina 2014-01-27 13:32:08 UTC
Created attachment 267303 [details] [review]
proposed change

In Firefox I want to apply a whitelist to the streams that are decoded by playbin. A simple approach is to get the uridecodebin instance inside playbin and connect to its autoplug-select signal. Unfortunately this doesn't currently work because of the way autoplug-select is accumulated.

This bug has some context: https://bugzilla.mozilla.org/show_bug.cgi?id=959007#c4
Comment 1 Sebastian Dröge (slomo) 2014-01-27 18:38:47 UTC
Review of attachment 267303 [details] [review]:

Makes sense, just a typo in the comment :)

::: gst/playback/gsturidecodebin.c
@@ +275,3 @@
+  /* Call the next handler in the chain (if any) when the current callback
+   * returns TRY. This makes it possible to register separate autoplug-select
+   * handlers from different code sites that implement different TRY/EXPOSE/SKIP

sides, not sites?
Comment 2 Alessandro Decina 2014-01-28 02:47:53 UTC
commit 6a699b6c40cd6da3be5e669909093caab7cd174e
Author: Alessandro Decina <alessandro.d@gmail.com>
Date:   Tue Jan 28 00:19:07 2014 +1100

    decodebin: make it possible to register multiple handlers for autoplug-select
    
    Change the way autoplug-select is accumulated so that it's possible to have
    multiple handlers. The handlers keep getting called as long as they keep
    returning GST_AUTOPLUG_SELECT_TRY.
    
    One practical example of when this is needed is when hooking into playbin's
    uridecodebin, which is perhaps not very elegant but the only way to influence
    which streams playbin autoplugs/exposes.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723096