Change location of filesrc dinamically

Donny Viszneki donny.viszneki at gmail.com
Tue Mar 26 23:36:32 PDT 2013


Perhaps you could implement your own element which is made to
dynamically change its source? The investigation might provide useful
insight.

On Tue, Mar 26, 2013 at 9:16 PM, Lautaro Woites <lauchapc87 at gmail.com> wrote:
> Ok, discarding both the old filesrc and decoder, creating the new ones and
> linking them to the pipeline, works ok.
>
> My next step was adding a timeoverlay to the pipeline, the problems I
> encountered were:
>
> 1) When I changed the video source, the displayed time by timeoverlay jumps
> up to the end of the current video time
>  ( display_time = display_time + lenght_of_current_video).
>
> Regardless of the display time issue. The pipeline the form I builded is a
> valid one?
> Am I doing something wrong?
>
> 2) I could not control the precise time for change  the video source.
> For example, change the video source after 10 seconds from the first video.
> This is possible?
>
> Thanks in advance
>
>
> 2013/3/5 Lautaro Woites <lauchapc87 at gmail.com>
>>
>> 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
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
http://codebad.com/


More information about the gstreamer-devel mailing list