gstreamer/docs/design/part-seeking.txt
Jan Schmidt 8377afc0ba check/: I wrote a test!
Original commit message from CVS:
* check/Makefile.am:
* check/gst/gstevents.c: (GST_START_TEST), (event_probe),
(test_event), (timediff), (gstevents_suite), (main):
I wrote a test!

* docs/design/part-seeking.txt:
Spelling correction

* docs/gst/tmpl/gstevent.sgml:
Docs updates.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Treat a buffer-without-newsegment the same as a receiving
a newsegment not in time format, and disable syncing to the clock
with a warning.

* gst/gstbus.c: (gst_bus_set_sync_handler):
Assert if anyone tries to replace the existing sync_handler for bus,
as only the owner should be setting it.

* gst/gstevent.h:
Have a fixed set of custom event enums with events identified by
their structure name (as in 0.8), rather than a free-for-all
allowing collisions between enum values from different plugins.

* gst/gstpad.c: (gst_pad_class_init):
Docs change.

* gst/gstqueue.c: (gst_queue_handle_sink_event):
Handle out-of-band downstream events from the sending thread.
2005-08-18 15:31:28 +00:00

74 lines
2.1 KiB
Text

Seeking
-------
Seeking in GStreamer means configuring the pipeline for playback of the
media between a certain start and stop time, called a segment.
Different kinds of seeking exist:
- immediate seeking with low latency (FLUSH seek)
- seeking without flush, playback will start from the new
position after all the queues are emptied with old data.
- segment seeking with and without FLUSH, this can be used to
implement seamless looping or NLE functionality.
Seeking can be performed in different formats such as time, frames
or samples.
Seeking can be performed to an absolute position or relative to the
current playback position.
For seeking to work reliably, all plugins in the pipeline need to follow
the well-defined rules in this document.
Non segment seeking will make the pipeline emit EOS when the configured
playback range has been played.
Segment seeking will not emit an EOS at the end of the range but will
post a SEGMENT_STOP message on the bus. This message is posted by the
earliest element in the pipeline, typically a demuxer. After receiving
the message, the application can reconnect the pipeline or issue other
seek events in the pipeline.
The seek can also change the playback speed of the configured segment.
A speed of 1.0 is normal speed, 2.0 is double speed. Negative values
mean backward playback.
Generating seeking events
-------------------------
The different kinds of seeking methods and their internal workings are
described below.
FLUSH seeking
-------------
This is the most common way of performing a seek in a playback application.
The application issues a seek on the pipeline and the new media is immediatly
played after the seek calls returns.
seeking without FLUSH
---------------------
This seek type is typically performed after issuing segment seeks to finish
the playback of the pipeline.
segment seeking with FLUSH
--------------------------
This seek is typically performed when starting seamless looping.
segment seeking without FLUSH
-----------------------------
This seek is typically performed when continuing seamless looping.