Change location of filesrc dinamically

Lautaro Woites lauchapc87 at gmail.com
Tue Mar 5 08:00:09 PST 2013


Thanks Wim.

I will try to add a videomixer to the pipeline removing the old source and
adding the new one.
What do you think?



2013/3/5 Wim Taymans <wim.taymans at gmail.com>

> 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<gstreamer-devel at lists.freedesktop.org>
>> http://lists.freedesktop.org/**mailman/listinfo/gstreamer-**devel<http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>>
>
> ______________________________**_________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.**freedesktop.org<gstreamer-devel at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/gstreamer-**devel<http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130305/d72168bd/attachment.html>


More information about the gstreamer-devel mailing list