gstreamer/docs/design/part-streams.txt
Wim Taymans b9dbb55105 docs/design/part-overview.txt: Make upsteam/downstream concepts more clear.
Original commit message from CVS:
* docs/design/part-overview.txt:
Make upsteam/downstream concepts more clear.
Give an example of serialized/non-serialized events.
* docs/design/part-events.txt:
* docs/design/part-streams.txt:
Mention applied_rate.
* docs/design/part-trickmodes.txt:
Mention applied rate, flesh out some more use cases.
* gst/gstevent.c: (gst_event_new_new_segment),
(gst_event_parse_new_segment), (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_parse_seek),
(gst_event_new_navigation):
* gst/gstevent.h:
Add applied_rate field to NEWSEGMENT event.
API: gst_event_new_new_segment_full()
API: gst_event_parse_new_segment_full()
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
* gst/gstsegment.h:
Add applied_rate to GstSegment structure.
Make calculation of stream_time and running_time more correct
wrt rate/applied_rate.
Add some more docs.
API: GstSegment::applied_rate field
API: gst_segment_set_newsegment_full();
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_get_sync_times), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer):
Parse and use applied_rate in the GstSegment field.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add check for applied_rate field.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gstsegments_suite):
Add more checks for various GstSegment operations.
2006-05-08 09:52:33 +00:00

56 lines
1.5 KiB
Text

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
- marks valid buffer timestamp range (start, stop)
- marks stream_time of buffers (time)
- marks playback rate (rate)
- marks applied rate (applied_rate)
2) N buffers
- displayable buffers are between start/stop of the NEW_SEGMENT
- display_time: (B.timestamp - NS.start) * NS.abs_rate
* used to calculate stream_time and sync_time
- stream_time: display_time + NS.time
* current position in stream between 0 and duration
- sync_time: display_time + NS.accum + base_time
* used to synchronize against the clock.
3) EOS
- marks the end of data, nothing is to be expected after EOS