From 0c9d9d90d98033e58ca5b3844a7e8215bb844395 Mon Sep 17 00:00:00 2001 From: Ralf Sippl Date: Mon, 25 Mar 2019 10:01:32 +0000 Subject: [PATCH] docs: app-dev: events: seeking: use CLOCK_TIME_NONE instead of -1 and fix parameter names to match the parameter names in the gst_element_seek() declaration. Closes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/34/ Part-of: --- .../advanced/queryevents.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-docs/markdown/application-development/advanced/queryevents.md b/subprojects/gst-docs/markdown/application-development/advanced/queryevents.md index d6ff45060d..b2441a2089 100644 --- a/subprojects/gst-docs/markdown/application-development/advanced/queryevents.md +++ b/subprojects/gst-docs/markdown/application-development/advanced/queryevents.md @@ -84,12 +84,19 @@ contains a playback rate, a seek offset format (which is the unit of the offsets to follow, e.g. time, audio samples, video frames or bytes), optionally a set of seeking-related flags (e.g. whether internal buffers should be flushed), a seek method (which indicates relative to what the -offset was given), and seek offsets. The first offset (cur) is the new -position to seek to, while the second offset (stop) is optional and -specifies a position where streaming is supposed to stop. Usually it is -fine to just specify GST\_SEEK\_TYPE\_NONE and -1 as end\_method and end -offset. The behaviour of a seek is also wrapped in the `gst_element_seek -()`. +offset was given), and seek offsets. + +The first offset (`start`) is the new position to seek to, while the second +offset (`stop`) is optional and specifies a position where streaming is +supposed to stop. Usually it is fine to just specify `GST_SEEK_TYPE_NONE` +as `stop_type` and `GST_CLOCK_TIME_NONE` as `stop` offset. + +In case of reverse playback (`rate` < 0) the meaning of `start` and `stop` is +reversed and `stop` is the position to seek to. + +The behaviour of a seek is also wrapped in the `gst_element_seek()` and +`gst_element_seek_simple()` and you would usually use those functions to +initiate a seek on a pipeline. ``` c static void