was given.
Segment.toStreamTime
ulong toStreamTime(gst.types.Format format, ulong position)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.
Parameters
format | the format of the segment. |
position | the position in the segment |
Returns
the position in stream_time or -1 when an invalid position