Merge remote-tracking branch 'origin/0.10'
[platform/upstream/gstreamer.git] / docs / random / wtay / states
1 1) transitions
2 --------------
3
4 There are four states, NULL, READY, PAUSED, PLAYING. state transitions only
5 happen from once neighbouring state to another.
6
7 NULL:  the element is just being created, the initial state.
8   !
9   !    the element creates all of its resources (a thread will create
10   !      its pthread etc..)
11   !    - most used by bins to set up thread context for its children
12   v
13 READY: the element is ready to start processing.
14   !
15   !    the element sets up its state so it can start processing buffers.
16   !    - open devices
17   v
18 PAUSED: the element is paused
19   !
20   !    the element starts spinning
21   !      
22   v
23 PLAYING: the element is playing
24   !
25   !    the element stops spinning
26   !    the element frees resources from other plugins (bufferpools)
27   !
28   v
29 PAUSED
30   !    element removes caps from pads
31   !    reset internal state
32   !    - close devices
33   !
34   v
35 READY
36   !
37   !   the element frees all of its resources (eg: pthread_join)
38   !
39   v
40 NULL
41
42
43 2) bin transition
44 -----------------
45
46 the state of a bin is equal to the maximum state of its children.
47
48
49 3) interaction with the scheduler
50 ---------------------------------
51
52 elements in the !PLAYING state are disabled in the scheduler.
53
54
55 4) action that can be performed by the app in the different states
56 ------------------------------------------------------------------
57
58 PLAYING:  nothing, only iterate on the pipeline, some properties can
59           be changed.
60
61 PAUSED:   elements can be connected, removed, disconnected. some
62           properties can be changed
63
64 READY:    as in PAUSED but *all* properties can be changed.
65
66 NULL:     everything.