Influencing playbin2/decodebin2 auto-plugging

Tvrtko Ursulin tvrtko.ursulin at onelan.co.uk
Fri Aug 3 02:44:39 PDT 2012


On Thursday 02 August 2012 18:36:05 Tim-Philipp Müller wrote:
> On Thu, 2012-08-02 at 19:03 +0200, Stefan Sauer wrote:
> > On 08/02/2012 04:39 PM, Tvrtko Ursulin wrote:
> > > Is there a way to dynamically influence auto-plugging in
> > > playbin2/decodebin2, for example by upranking or deranking elements?
> > 
> > No. https://bugzilla.gnome.org/show_bug.cgi?id=649542
> 
> This is just convenience API, of course you can do such things
> dynamically.
> 
> You can manually set element ranks at runtime in your application by
> looking up the GstElementFactory/GstPluginFeature in the registry after
> gst_init() and setting the plugin rank via
> gst_plugin_feature_set_rank().
> 
> Then there are the "autoplug-{factories,sort,select}" signals on
> decodebin2/uridecodebin, which you can use to tweak the autoplugging.
> 
> You can use those in playbin2 as well, but you need to "somehow" find
> the uridecodebin element inside playbin2.

Hm.. I can get uridecodebin element via the element-added signal, but when I 
connect my handler to autoplug-select it is not getting called. Code snippet 
is roughly this:

    def __gst_element_added(self, parent, element):
        element.connect( 'autoplug-select', self.__gst_autoplug_select )

Reading the docs, this stands out:

"""
Note
Only the signal handler that is connected first will ever by invoked. Don't 
connect signal handlers with the G_CONNECT_AFTER flag to this signal, they 
will never be invoked! 
"""

Could that be the problem? I don't know if my handler is first, I mean, I am 
not connecting anything else to it, but maybe something internally is? 

Tvrtko



More information about the gstreamer-devel mailing list