1229e65e3f8274c5c83f65aabcace92913e556ea
[platform/upstream/gstreamer.git] / docs / random / wtay / eos5
1
2 case 1) 
3
4 (--------------------------------------------------)
5 ! bin                                              !
6 ! (--------)         (--------)         (--------) !
7 ! ! fakesrc!         !identity!         !fakesink! !
8 ! !   1   src ----- sink  1  src ---- sink   1   ! !
9 ! (--------)         (--------)         (--------) !
10 !                                                  !
11 ! (--------)         (--------)         (--------) !
12 ! !fakesrc !         !identity!         !fakesink! !
13 ! !   2   src ----- sink  2  src ---- sink   2   ! !
14 ! (--------)         (--------)         (--------) !
15 (--------------------------------------------------)
16
17   just two scheduled chains in a single bin.
18
19 .scheduling.
20   
21   we have two chains here fs1-i1-fsk1 and fs2-i2-fsk2
22   fakesrc1 will output 1 buffer, fakesrc2 3 buffers
23
24 .eos.
25
26   fs1 will return a NULL buffer on EOS. the scheduler 
27   detects the NULL buffer and puts chain1 in EOS so that it
28   doesn't get scheduled again. The scheduler fires the EOS
29   signal for all the elements in the chain and puts the fs1
30   element in the READY state. 
31
32   the same procedure happens for chain2. At that point, the bin 
33   has no chains to schedule and so it fires EOS.
34
35
36 case 2) 
37
38 (---------------------------------------------------)
39 ! bin                                               !
40 ! (--------)         (--------)         (---------) !
41 ! ! disksrc!         ! mpg123 !         !audiosink! !
42 ! !   1   src ----- sink  1  src ---- sink   1    ! !
43 ! (--------)         (--------)         (---------) !
44 !                                                   !
45 ! (--------)         (--------)         (---------) !
46 ! !disksrc !         ! mpg123 !         !audiosink! !
47 ! !   2   src ----- sink  2  src ---- sink   2    ! !
48 ! (--------)         (--------)         (---------) !
49 (---------------------------------------------------)
50
51   same as case 1, an mp3 mixer where the mixing is performed
52   in hardware (in the audiosink).
53   we want to show how the EOS state can be undone.
54
55 .scheduling.
56   
57   we have two chains here ds1-mpg1-ask1 and ds2-mpg2-ask2
58   the song in chain1 is about to end, chain2 has just begun
59   playing a song.
60
61 .eos.
62
63   fs1 will return a NULL buffer on EOS. the scheduler 
64   detects the NULL buffer and puts chain1 in EOS so that it
65   doesn't get scheduled again. The scheduler fires the EOS
66   signal for all the elements in the chain and puts the fs1
67   element in the READY state.
68
69   the app sets the new location for the disksrc. The element is
70   put in the PLAYING state, the chain is marked !EOS so that
71   it will be scheduled again.
72  
73