Influencing playbin2/decodebin2 auto-plugging

Tvrtko Ursulin tvrtko.ursulin at onelan.co.uk
Mon Aug 6 08:06:44 PDT 2012


On Friday 03 August 2012 12:03:20 Tvrtko Ursulin wrote:
> On Friday 03 August 2012 10:44:39 Tvrtko Ursulin wrote:
> > 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:
> It is called but I got the number of parameters wrong.
> 
> Just need to figure out the return values now.

I am seeing a weird interaction between using autoplug-select and vaapi. The 
attached reproducer does not transition into playing state for me unless I 
remove the line where I connect my message handler to autoplug-select. 
Interesting thing is that my handler in this configuration does not deviate 
from the default behaviour ie. it always returns GST_AUTOPLUG_SELECT_TRY. 

In the no VA-API setup, with use_vaapi set to False at the top of the program, 
playback works fine even with the autoplug-select handler installed.

Seems weird, any ideas?

Thanks,

Tvrtko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: playbin-vaapi.py
Type: text/x-python
Size: 6035 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120806/36265227/attachment-0001.py>


More information about the gstreamer-devel mailing list