Providing a clock in a dynamic pipeline

Krzysztof Konopko krzysztof.konopko at konagma.eu
Tue Sep 3 04:52:32 UTC 2019


Hi,

I'm wondering how to provide a clock in the pipeline by an element
which is added dynamically (after the pipeline is started) and whether
it makes sense in the first place.

If for example some stream discovery (like typefinding) happens first,
the pipeline must be already in PLAYING state and the clock is selected
(default one).  At some point an element is added which can provide a
better or more suitable clock [1] but its 'clock-provide' message will
be (aptly) ignored.  Also elements in the pipeline have their base time
no longer in line with the new clock.

Is the right approach to use the 'clock-lost' message here?  The new
element with a better clock could emit it with the current clock
provided as "lost".

Or does this not make sense at all conceptually and dynamic pipelines
should never need to re-select the clock?

Any hints are much appreciated.

Thanks,
Kris

[1] This may be the case when any of buffering, demux, decode,
rendering is done in the hardware while another sink element needs to
sync with the presentation.



More information about the gstreamer-devel mailing list