Dynamic Replacement of a source element in pipeline
Pascal Jacquemart
pascal at fluffyspider.com.au
Sat Sep 14 23:26:22 UTC 2019
These are two different problems.
I think if the pipeline terminates and goes to null state, then it is possible to change the uri property on uridecodebin. And the pipeline remains untouched.
Otherwise, when you add a new decodebin, the running time of your pipeline is still incrementing whereas the new decodebin buffers restart at zero. In this case you need to set an offset on new incoming pads.
Cheers, Pascal
> On 12 Sep 2019, at 03:11, lorenzo.m <lorenzo at muscariello.com> wrote:
>
> Hi,
> I trying to implement a working example for this use case:
>
> given a simple pipeline of this kind:
>
> uridecodebin -> videoconvert -> autovideosink
>
> (where uridecodebin source pads are dynamically linked thru callback on
> "pad-added" events), i would like to replace the uridecodebin element, when
> it reaches EOS, with a new one (with a different uri) in the current running
> pipeline.
>
> What i've tried to do is:
> 1) adding a blocking pad probe on first uridecodebin source pad:
> gst_pad_add_probe (new_pad, GST_PAD_PROBE_TYPE_BLOCK |
> GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, eos_probe, data, NULL);
>
> 2) in probe code:
> * pause pipeline
> * unlink first uridecodebin src pad from videoconvert, set its state to
> NULL, remove it from pipeline bin
> * create new uridecodebin, set its uri property and add it to pipeline bin
> * register pad-added handler on new uridecodebin element (to dynamic link it
> to videoconvert)
> * set the pipeline in playing state
>
>
> but as soon as the pipeline is set again in playing mode it goes in EOS.
>
> what i'm doing wrong?
>
> Thanks,
>
> Ps. i can also post my code
>
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list