seek_simple


Description:

public bool seek_simple (Format format, SeekFlags seek_flags, int64 seek_pos)

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream.

For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use seek.

In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return true on a seekable media type or false when the media type is certainly not seekable (such as a live stream).

Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return true when it receives the event in the READY state.

Parameters:

this

a Element to seek on

format

a Format to execute the seek in, such as TIME

seek_flags

seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here

seek_pos

position to seek to (relative to the start); if you are doing a seek in TIME this value is in nanoseconds - multiply with SECOND to convert seconds to nanoseconds or with MSECOND to convert milliseconds to nanoseconds.

Returns:

true if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit gst_message_async_done.