2006-02-28 15:54:06 +00:00
|
|
|
Streams
|
|
|
|
-------
|
|
|
|
|
|
|
|
This document describes the objects that are passed from element to
|
|
|
|
element in the streaming thread.
|
|
|
|
|
|
|
|
|
|
|
|
Stream objects
|
|
|
|
--------------
|
|
|
|
|
|
|
|
The following objects are to be expected in the streaming thread:
|
|
|
|
|
|
|
|
- events
|
|
|
|
- NEW_SEGMENT (NS)
|
|
|
|
- EOS (EOS) *
|
|
|
|
- TAG (T)
|
|
|
|
- buffers (B) *
|
|
|
|
|
|
|
|
Objects marked with * need to be synchronised to the clock in sinks
|
|
|
|
and live sources.
|
|
|
|
|
|
|
|
|
|
|
|
Typical stream
|
|
|
|
--------------
|
|
|
|
|
|
|
|
A typical stream starts with a newsegment event that marks the
|
|
|
|
buffer timestamp range. After that buffers are send one after the
|
|
|
|
other. After the last buffer an EOS marks the end of the stream. No
|
|
|
|
more buffer are to be processed after the EOS event.
|
|
|
|
|
|
|
|
+--+ +-++-+ +-+ +---+
|
|
|
|
|NS| |B||B| ... |B| |EOS|
|
|
|
|
+--+ +-++-+ +-+ +---+
|
|
|
|
|
|
|
|
1) NEW_SEGMENT, rate, start/stop, time
|
2006-03-13 10:32:26 +00:00
|
|
|
- marks valid buffer timestamp range (start, stop)
|
|
|
|
- marks stream_time of buffers (time)
|
|
|
|
- marks playback rate (rate)
|
2006-02-28 15:54:06 +00:00
|
|
|
|
|
|
|
2) N buffers
|
|
|
|
- displayable buffers are between start/stop of the NEW_SEGMENT
|
2006-03-13 10:32:26 +00:00
|
|
|
|
2006-02-28 15:54:06 +00:00
|
|
|
- display_time: (B.timestamp - NS.start) * NS.abs_rate
|
2006-03-13 10:32:26 +00:00
|
|
|
* used to calculate stream_time and sync_time
|
|
|
|
|
2006-02-28 15:54:06 +00:00
|
|
|
- stream_time: display_time + NS.time
|
2006-03-13 10:32:26 +00:00
|
|
|
* current position in stream between 0 and duration
|
|
|
|
|
|
|
|
- sync_time: display_time + NS.accum + base_time
|
|
|
|
* used to synchronize against the clock.
|
2006-02-28 15:54:06 +00:00
|
|
|
|
|
|
|
3) EOS
|
|
|
|
- marks the end of data, nothing is to be expected after EOS
|
2006-03-13 10:32:26 +00:00
|
|
|
|
|
|
|
|