From b20e126ab68a6bcd086bf25a0b2af2ba40155a75 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 12 Jul 2002 15:39:18 +0000 Subject: [PATCH] Short doc about state changes and actions associated with each state change. Original commit message from CVS: Short doc about state changes and actions associated with each state change. --- docs/random/wtay/states | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/random/wtay/states diff --git a/docs/random/wtay/states b/docs/random/wtay/states new file mode 100644 index 0000000..f065f73 --- /dev/null +++ b/docs/random/wtay/states @@ -0,0 +1,66 @@ +1) transitions +-------------- + +There are four states, NULL, READY, PAUSED, PLAYING. state transitions only +happen from once neighbouring state to another. + +NULL: the element is just being created, the initial state. + ! + ! the element creates all of its resources (a thread will create + ! its pthread etc..) + ! - most used by bins to set up thread context for its children + v +READY: the element is ready to start processing. + ! + ! the element sets up its state so it can start processing buffers. + ! - open devices + v +PAUSED: the element is paused + ! + ! the element starts spinning + ! + v +PLAYING: the element is playing + ! + ! the element stops spinning + ! the element frees resources from other plugins (bufferpools) + ! + v +PAUSED + ! element removes caps from pads + ! reset internal state + ! - close devices + ! + v +READY + ! + ! the element frees all of its resources (eg: pthread_join) + ! + v +NULL + + +2) bin transition +----------------- + +the state of a bin is equal to the maximum state of its children. + + +3) interaction with the scheduler +--------------------------------- + +elements in the !PLAYING state are disabled in the scheduler. + + +4) action that can be performed by the app in the different states +------------------------------------------------------------------ + +PLAYING: nothing, only iterate on the pipeline, some properties can + be changed. + +PAUSED: elements can be connected, removed, disconnected. some + properties can be changed + +READY: as in PAUSED but *all* properties can be changed. + +NULL: everything. -- 2.7.4