Dynamically changing the pipeline when a buffer is received
I want to change the pipeline (while it is in the playing state) when a source element produces a buffer, then I want to make sure that the buffer reached the sink elements, and then I want to change the pipeline again, but this time as soon as possible (but so that no data is lost).
Re: Dynamically changing the pipeline when a buffer is received
This seems like a weird thing you're doing, can you explain the goal of this?
Can you just use a tee and allow buffers to pass to specific pre-constructed
branches as needed?
The more complicated answer is to use pad probes to detect when buffers come
from the src pads, then do stuff in the callback function. However, I'm not
sure if you can change the pipeline while remaining in the playing state.
This is something you'd have to test, but I suspect that you'd have to pause
a few elements, make the changes to the pipeline, then start playing again.