Segment.toStreamTime

Translate @position to stream time using the currently configured segment. The @position value must be between @segment start and stop value.

This function is typically used by elements that need to operate on the stream time of the buffers it receives, such as effect plugins. In those use cases, @position is typically the buffer timestamp or clock time that one wants to convert to the stream time. The stream time is always between 0 and the total duration of the media stream.

class Segment
ulong
toStreamTime
(
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 in stream_time or -1 when an invalid position was given.

Meta