check/: I wrote a test!
[platform/upstream/gstreamer.git] / docs / design / part-seeking.txt
1 Seeking
2 -------
3
4 Seeking in GStreamer means configuring the pipeline for playback of the
5 media between a certain start and stop time, called a segment.
6
7 Different kinds of seeking exist:
8
9  - immediate seeking with low latency (FLUSH seek)
10  - seeking without flush, playback will start from the new
11    position after all the queues are emptied with old data.
12  - segment seeking with and without FLUSH, this can be used to
13    implement seamless looping or NLE functionality.
14
15 Seeking can be performed in different formats such as time, frames
16 or samples.
17
18 Seeking can be performed to an absolute position or relative to the
19 current playback position.
20
21 For seeking to work reliably, all plugins in the pipeline need to follow
22 the well-defined rules in this document.
23
24 Non segment seeking will make the pipeline emit EOS when the configured 
25 playback range has been played.
26
27 Segment seeking will not emit an EOS at the end of the range but will
28 post a SEGMENT_STOP message on the bus. This message is posted by the
29 earliest element in the pipeline, typically a demuxer. After receiving
30 the message, the application can reconnect the pipeline or issue other
31 seek events in the pipeline.
32
33 The seek can also  change the playback speed of the configured segment.
34 A speed of 1.0 is normal speed, 2.0 is double speed. Negative values
35 mean backward playback.
36
37
38 Generating seeking events
39 -------------------------
40
41
42
43
44
45 The different kinds of seeking methods and their internal workings are
46 described below.
47
48
49 FLUSH seeking
50 -------------
51
52 This is the most common way of performing a seek in a playback application.
53 The application issues a seek on the pipeline and the new media is immediatly
54 played after the seek calls returns.
55
56
57 seeking without FLUSH
58 ---------------------
59
60 This seek type is typically performed after issuing segment seeks to finish
61 the playback of the pipeline.
62
63
64 segment seeking with FLUSH
65 --------------------------
66
67 This seek is typically performed when starting seamless looping.
68
69
70 segment seeking without FLUSH
71 -----------------------------
72
73 This seek is typically performed when continuing seamless looping.
74