gst-launch: Add switch to enable user to force a clock on the pipeline
Sometimes, one wants to force a clock on some pipelines - for instance,
when testing TSN related pipelines, one usually uses GstPtpClock or
CLOCK_REALTIME (assuming system realtime clock is in sync with network
one). Until now, one needs to write an application for that - not
difficult, but quite boring if one just wants to test something. This
patch adds a simple way to force some clocks to be used by the pipeline:
switch -k
.
Three clocks supported now: 'realtime', 'monotonic' and 'ptp'. The two first are actually the GstSystemClock, but defining its type to GST_CLOCK_TYPE_REALTIME and GST_CLOCK_TYPE_MONOTONIC, respectively. The 'ptp' one is GstPtpClock, using domain 0.
Not using the switch preserves current behaviour, in which pipeline elects its own clock depending on elements.