Segment.toRunningTime

Translate position to the total running time using the currently configured and previously accumulated segments. Position is a value between segment start and stop time. This function is typically used by elements that need to synchronize to the global clock in a pipeline. The runnning time is a constantly increasing value starting from 0. When gst_segment_init() is called, this value will reset to 0. This function returns -1 if the position is outside of segment start and stop.

class Segment
long
toRunningTime

Parameters

format GstFormat

the format of the segment.

position long

the position in the segment

Return Value

Type: long

the position as the total running time or -1 when an invalid position was given.

Meta