Dynamic Replacement of a source element in pipeline

lorenzo.m lorenzo at muscariello.com
Wed Sep 11 17:11:43 UTC 2019


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/


More information about the gstreamer-devel mailing list