GStreamer Plugin Writer's Guide (1.0.6) | ||
---|---|---|
<<< Previous | Clocking | Next >>> |
A clock returns the absolute-time according to that clock with gst_clock_get_time (). From the absolute-time is a running-time calculated, which is simply the difference between a previous snapshot of the absolute-time called the base-time. So:
running-time = absolute-time - base-time
A GStreamer GstPipeline
object maintains a
GstClock
object and a base-time when it goes
to the PLAYING state. The pipeline gives a handle to the selected
GstClock
to each element in the pipeline along
with selected base-time. The pipeline will select a base-time in such
a way that the running-time reflects the total time spent in the
PLAYING state. As a result, when the pipeline is PAUSED, the
running-time stands still.
Because all objects in the pipeline have the same clock and base-time, they can thus all calculate the running-time according to the pipeline clock.
<<< Previous | Home | Next >>> |
Clocking | Up | Buffer running-time |