Segment.toRunningTime

ulong toRunningTime(gst.types.Format format, ulong position)

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.Segment.init_] is called, this value will reset to

    Parameters

    formatthe format of the segment.
    positionthe position in the segment

    Returns

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

    was given.