Change location of filesrc dinamically

Wim Taymans wim.taymans at gmail.com
Tue Mar 5 07:29:29 PST 2013


On 03/05/2013 04:24 PM, Lautaro Woites wrote:
> Hi all,
>
> I am new to gstreamer and I writing a gstreamer app (0.10.35) on 
> python. My app shows a video on the screen using the next pipeline:
>
> filesrc ! decodebin2 ! queue2 ! videoscale ! capsfilter 
> caps="video/x-raw-yuv height=640, width=480" !
>
> The decoder and the queue are linked dinamically using the "pad-added" 
> signal.
>
> I tryed to change the location property on the filesrc but is not 
> possible.
> Also I tryed to use a multifilesrc and change the location property 
> but didn't work.
>
> Now I'm trying to create and link a new filesrc. This are the steps 
> I'm following:
>
>     1) set the STATE of the old filesrc to NULL
>     2) create a new filesrc and set the new location to it.
>     3) unlink the old filesrc with the decoder
>     4) unlink the decoder with the queue
>     5) link the new filesrc with the decoder
>     6) set the STATE of the new filesrc to PLAYING
>
> This didn't work. The decoder "pad-added" callback is not called and 
> the pipeline is paused because a not-linked error on the old filsesrc
>
> My questions are:
> 1) How Can unlink the old filesrc and link the new one dinamically?
You can't do that in general.

> 2) What are the best approach to change the video source location?
You make a new pipeline with the new video source location and then 
mix/swap it in like before your
videoscale or so.

wim
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list