docs/: Small docs updates.

Original commit message from CVS:
* docs/design/part-events.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* docs/design/part-overview.txt:
* docs/design/part-seeking.txt:
* docs/design/part-states.txt:
* docs/design/part-trickmodes.txt:
* docs/manual/advanced-position.xml:
Small docs updates.

* gst/gstobject.h:
People think !! is ugly, this looks better.

* gst/gstpad.c: (gst_pad_set_blocked_async):
Remove !! since it's fixed elsewhere now.
This commit is contained in:
Wim Taymans 2005-11-03 14:22:44 +00:00
parent 22993965c7
commit c4abf79f02
11 changed files with 56 additions and 22 deletions

View file

@ -1,3 +1,21 @@
2005-11-03 Wim Taymans <wim@fluendo.com>
* docs/design/part-events.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* docs/design/part-overview.txt:
* docs/design/part-seeking.txt:
* docs/design/part-states.txt:
* docs/design/part-trickmodes.txt:
* docs/manual/advanced-position.xml:
Small docs updates.
* gst/gstobject.h:
People think !! is ugly, this looks better.
* gst/gstpad.c: (gst_pad_set_blocked_async):
Remove !! since it's fixed elsewhere now.
2005-11-03 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstminiobject.h:

View file

@ -132,7 +132,7 @@ of the indicated newsegment range.
If a newsegment arrives at an element not preceeded by a flush event, the
streamtime of the pipeline will not be reset to 0 so any element that syncs
to the clock must use the stop times of the previous newsegment events to
make the buffer timestamps increasing.
make the buffer timestamps increasing (part-segments.txt).
TAG
---
@ -176,7 +176,7 @@ at -1 to continue playback to the end of the stream. The seek event
also contains the new playback rate of the stream, 1.0 is normal playback,
2.0 double speed and negative values mean backwards playback.
A seek usually flushes the graph to minimize latency after the seek this
A seek usually flushes the graph to minimize latency after the seek. This
behaviour is triggered by using the SEEK_FLUSH flag.
The seek event is passed along from element to element until it reaches
@ -209,6 +209,7 @@ The general flow of executing the seek with FLUSH is as follows:
4) send a FLUSH_STOP event to all peer elements to allow streaming again.
5) send a NEWSEGMENT event to signal the new buffer timestamp base time.
This can also be done from the streaming thread.
6) start stopped tasks and unlock the STREAM_LOCK, dataflow will continue
now from the new position.

View file

@ -1,7 +1,7 @@
GstPipeline
-----------
A GstPipeline is usually a toplevel bin an provides all of its
A GstPipeline is usually a toplevel bin and provides all of its
children with a clock.
A GstPipeline also provides a toplevel GstBus (see part-gstbus.txt)

View file

@ -18,8 +18,9 @@ Message types
GST_MESSAGE_EOS:
The pipeline went to EOS. This means that all the sink elements in the
pipeline posted the EOS message to the bus.
Posted by sink elements. This message is posted to the application when
all the sinks in a pipeline posted an EOS message. When performing a seek,
the EOS state of the pipeline and sinks is undone.
GST_MESSAGE_ERROR:
@ -75,8 +76,8 @@ Message types
GST_MESSAGE_STREAM_STATUS:
An element posted information about the stream it is handling. This could include
information about the length of the stream.
An element posted information about the stream it is handling. This could include
information about the length of the stream.
GST_MESSAGE_APPLICATION:

View file

@ -397,7 +397,8 @@ Pipeline EOS
to the application.
When in EOS, the pipeline remains in the playing state, if is the application
responsability to PAUSE or READY the pipeline.
responsability to PAUSE or READY the pipeline. The application can also issue
a seek, for example.
Pipeline READY
@ -487,12 +488,13 @@ Pipeline seeking
to produce new data.
Since the pipeline is still PAUSED, this will preroll the next media sample in the
sinks.
sinks. The application can wait for this preroll to complete by performing a
_get_state() on the pipeline.
The last step in the seek operation is then to adjust the stream time of the pipeline
to 0 and to set the pipeline back to PLAYING.
The sequence of events in out mp3 playback example.
The sequence of events in our mp3 playback example.
| a) seek on pipeline
| b) PAUSE pipeline

View file

@ -16,16 +16,16 @@ 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.
current configured segment.
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 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
post a SEGMENT_DONE 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.

View file

@ -84,10 +84,7 @@ the following state changes are possible:
State variables
---------------
An element has a special lock to manage the state changes. This lock is called
the STATE_LOCK.
The STATE_LOCK protects 3 element variables:
An element has 4 state variables that are protected with the object LOCK:
- STATE
- STATE_NEXT
@ -102,6 +99,10 @@ The STATE_RETURN reflects the last return value of a state change.
The STATE_NEXT and STATE_PENDING can be VOID_PENDING if the element is in
the right state.
An element has a special lock to protect against concurrent invocations of
_set_state(), called the STATE_LOCK.
Setting state on elements
-------------------------

View file

@ -0,0 +1,13 @@
Trickmodes
==========
forward playback
----------------
backwards playback
------------------

View file

@ -182,9 +182,7 @@ static void
seek_to_time (GstElement *pipeline,
gint64 time_nanoseconds)
{
GstFormat format = GST_FORMAT_TIME;
if (!gst_element_seek (pipeline, 1.0, &amp;format, GST_SEEK_FLAG_FLUSH,
if (!gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, time_nanoseconds,
GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
g_print ("Seek failed!\n");

View file

@ -147,7 +147,7 @@ typedef enum
*
* This macro checks to see if the given flag is set.
*/
#define GST_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_OBJECT_FLAGS (obj) & (flag))
#define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) & (flag)) == (flag))
/**
* GST_OBJECT_FLAG_SET:
* @obj: Object to set flag in.

View file

@ -854,7 +854,7 @@ gst_pad_set_blocked_async (GstPad * pad, gboolean blocked,
GST_LOCK (pad);
was_blocked = !!GST_PAD_IS_BLOCKED (pad);
was_blocked = GST_PAD_IS_BLOCKED (pad);
if (G_UNLIKELY (was_blocked == blocked))
goto had_right_state;