mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
0ec400890c
Original commit message from CVS: initial checkin
80 lines
2.8 KiB
Text
80 lines
2.8 KiB
Text
GST States and Transition Rules (graph to follow)
|
|
-------------------------------
|
|
|
|
This should be a map of possible state transitions and what triggers them.
|
|
|
|
What the states are:
|
|
GST_STATE_NEW: a new element has this, if it has nothing set except name.
|
|
GST_STATE_INCOMPLETE: any element that has some, but not enough
|
|
information to function is in this state.
|
|
GST_STATE_COMPLETE: if the element has enough data, but is not in any kind
|
|
of running or explicitely stopped state. ready to be used.
|
|
GST_STATE_DISCOVERY: anything the element does in this state must be reset
|
|
after discovery. any data read from sync source must be cached.
|
|
GST_STATE_PREROLL: not a lot different from PLAYING, except sinks don't
|
|
render what they're getting. useful for elements that require
|
|
data to get in sync, such as an MPEG video decoder that needs
|
|
IBBPBB before starting at the next P.
|
|
GST_STATE_RUNNING: this is the normal state of the pipeline, where data
|
|
goes all the way through the pipeline normally.
|
|
GST_STATE_STOPPED: an explicit stop state, different from COMPLETE in that
|
|
the state doesn't get reset.
|
|
|
|
|
|
NULL -> GST_STATE_NEW
|
|
creating an element (gst_*_new*)
|
|
|
|
GST_STATE_NEW -> GST_STATE_INCOMPLETE
|
|
setting anything in the element that isn't sufficient to bring it
|
|
to a useful state (gst_object_set)
|
|
|
|
GST_STATE_INCOMPLETE -> GST_STATE_COMPLETE
|
|
setting whatever the last bit of info the element was looking for
|
|
(gst_object_set)
|
|
|
|
GST_STATE_COMPLETE -> GST_STATE_INCOMPLETE
|
|
changing anything that invalidates the complete state of the element
|
|
|
|
GST_STATE_COMPLETE -> GST_STATE_DISCOVERY
|
|
setting the state to DISCOVERY
|
|
[ used for autoplug ]
|
|
|
|
GST_STATE_DISCOVERY -> GST_STATE_COMPLETE
|
|
setting the state !DISCOVERY
|
|
[ used when autoplug is over ]
|
|
|
|
GST_STATE_DISCOVERY -> GST_STATE_PREROLL
|
|
setting the state to PREROLL
|
|
[ you can go straight to preroll from discovery if you want ]
|
|
|
|
GST_STATE_DISCOVERY -> GST_STATE_RUNNING
|
|
setting the state to RUNNING
|
|
[ you can even go straight to running from preroll ]
|
|
|
|
GST_STATE_DISCOVERY -> GST_STATE_STOPPED
|
|
setting the state to STOPPED
|
|
[ normally you'd go from discovery to stopped when you load a src ]
|
|
|
|
GST_STATE_PREROLL -> GST_STATE_RUNNING
|
|
setting the state to RUNNING
|
|
[ preroll generally leads straight to running, as in above ]
|
|
|
|
GST_STATE_PREROLL -> GST_STATE_STOPPED
|
|
setting the state to STOPPED
|
|
[ it is possible to go to stopped, i.e load file@time ]
|
|
|
|
GST_STATE_RUNNING -> GST_STATE_PREROLL
|
|
setting the state to PREROLL
|
|
[ unsure if you'd need this state, you'd go to stopped first ]
|
|
|
|
GST_STATE_RUNNING -> GST_STATE_STOPPED
|
|
setting the state to STOPPED
|
|
[ pause. ]
|
|
|
|
GST_STATE_STOPPED -> GST_STATE_PREROLL
|
|
setting the state to PREROLL
|
|
[ if you seek to intermediate time while stopped, you'd preroll to
|
|
prepare to start running again immediately ]
|
|
|
|
GST_STATE_STOPPED -> GST_STATE_RUNNING
|
|
setting the state to RUNNING
|