How to dynamically change the video source of a playbin pipeline?

Sebastian Dröge sebastian at centricular.com
Wed Dec 4 23:59:40 PST 2013


On Mi, 2013-12-04 at 13:01 -0500, Joshua Kurland wrote:
> Hi, I have a question about using playbin to dynamically change the source
> of a pipeline to play different video clips.  Right now I have the URI
> parameter set in playbin, and I have to block the source pad before I can
> switch to a new URI.  My question is, am I able to block the source pad of
> playbin directly and just update the URI without stopping the stream?  Or
> do I need to make a new GstElement linked to the pipeline, and block that
> pad instead, closer to the example here:
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic-pipelines.html?
>  And if so, how?

This was already answered on IRC yesterday. Basically, you can't do
things like that in playbin because there's no useful point to hook into
and playbin manages the pipeline itself. It would work if you have your
own pipeline.

For playbin a solution seems to be to send an EOS event to it, and then
change the URI from a callback of the about-to-finish signal.

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131205/043e8932/attachment.pgp>


More information about the gstreamer-devel mailing list