Playbin2: run-time decoder change

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Feb 2 04:17:44 PST 2012


On Thu, 2012-02-02 at 04:01 -0800, mick_coracin wrote:

> Is it possible, with playbin2, to change the URI property of an already
> created pipeline and update decoding elements acordingly?
> 
> I mean, I would like to play a generic media playlist, containing any kind
> of files (video, audio, image...), and I would like to play all of them
> without recreating a complete pipeline, but just setting URI property for
> the new file, and let porbing and pipeling reconfiguration happen.
> 
> Does Playbin2 support that, or do I need to destroy the pipeline and
> recreate it for each file?
> 
> Does the uri set property work when all files are of same type?

You don't have create a new playbin2 element (pipeline) for each URI.

Just set the playbin2 element to READY or NULL state, set a new URI via
the "uri" property, and set playbin2 back to PLAYING state, and it will
do everything needed internally.

You can also set the next URI within the "about-to-finish" signal
handler, then playbin2 will pre-roll it in advance and will continue
playing without the need to set it back to READY/NULL state first.

Cheers
 -Tim



More information about the gstreamer-devel mailing list