Segment.toRunningTime

Translate @position to the total running time using the currently configured segment. 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 running 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
ulong
toRunningTime
(
GstFormat format
,
ulong position
)

Parameters

format GstFormat

the format of the segment.

position ulong

the position in the segment

Return Value

Type: ulong

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

Meta