| 1 |
OUTDATED |
| 2 |
-------- |
| 3 |
|
| 4 |
|
| 5 |
case 1) |
| 6 |
|
| 7 |
(--------------------------------------------------) |
| 8 |
! bin ! |
| 9 |
! (--------) (--------) (--------) ! |
| 10 |
! ! fakesrc! !identity! !fakesink! ! |
| 11 |
! ! 1 src ----- sink 1 src ---- sink 1 ! ! |
| 12 |
! (--------) (--------) (--------) ! |
| 13 |
! ! |
| 14 |
! (--------) (--------) (--------) ! |
| 15 |
! !fakesrc ! !identity! !fakesink! ! |
| 16 |
! ! 2 src ----- sink 2 src ---- sink 2 ! ! |
| 17 |
! (--------) (--------) (--------) ! |
| 18 |
(--------------------------------------------------) |
| 19 |
|
| 20 |
just two scheduled chains in a single bin. |
| 21 |
|
| 22 |
.scheduling. |
| 23 |
|
| 24 |
we have two chains here fs1-i1-fsk1 and fs2-i2-fsk2 |
| 25 |
fakesrc1 will output 1 buffer, fakesrc2 3 buffers |
| 26 |
|
| 27 |
.eos. |
| 28 |
|
| 29 |
fs1 will call gst_pad_set_eos (src, TRUE) on its srcpad |
| 30 |
in the _get function and returns a NULL buffer. |
| 31 |
|
| 32 |
gst_pad_set_eos will recurse down the pipeline and set |
| 33 |
all the pads in i1 and fsk1 to EOS too. none of these elements |
| 34 |
override the default behaviour so gst_pad_set_eos returns TRUE. |
| 35 |
|
| 36 |
fakesrc signals EOS. since an element in chain1 has signals |
| 37 |
EOS, chain1 becomes EOS. All the elements in the chain are set |
| 38 |
to the READY state and the chain is not scheduled anymore because |
| 39 |
its EOS flag is on. |
| 40 |
|
| 41 |
the same procedure happens for chain2. At that point, the bin |
| 42 |
has no chains to schedule and so it fires EOS. |
| 43 |
|
| 44 |
|
| 45 |
case 2) |
| 46 |
|
| 47 |
(---------------------------------------------------) |
| 48 |
! bin ! |
| 49 |
! (--------) (--------) (---------) ! |
| 50 |
! ! disksrc! ! mpg123 ! !audiosink! ! |
| 51 |
! ! 1 src ----- sink 1 src ---- sink 1 ! ! |
| 52 |
! (--------) (--------) (---------) ! |
| 53 |
! ! |
| 54 |
! (--------) (--------) (---------) ! |
| 55 |
! !disksrc ! ! mpg123 ! !audiosink! ! |
| 56 |
! ! 2 src ----- sink 2 src ---- sink 2 ! ! |
| 57 |
! (--------) (--------) (---------) ! |
| 58 |
(---------------------------------------------------) |
| 59 |
|
| 60 |
same as case 1, an mp3 mixer where the mixing is performed |
| 61 |
in hardware (in the audiosink). |
| 62 |
we want to show how the EOS state can be undone. |
| 63 |
|
| 64 |
.scheduling. |
| 65 |
|
| 66 |
we have two chains here ds1-mpg1-ask1 and ds2-mpg2-ask2 |
| 67 |
the song in chain1 is about to end, chain2 has just begun |
| 68 |
playing a song. |
| 69 |
|
| 70 |
.eos. |
| 71 |
|
| 72 |
disksrc1 will set the src pad to EOS with gst_pad_set_eos (pad, TRUE) |
| 73 |
the call recurses up and down, disksrc1 signals EOS. the chain with |
| 74 |
disksrc1 becomes EOS and is excluded from the scheduling algorithm. |
| 75 |
disksrc1 is set to the READY state. |
| 76 |
|
| 77 |
the user then changes the location of disksrc1 to the new mp3 song. |
| 78 |
The user then sets the element state of disksrc to PLAYING. disksrc |
| 79 |
performs gst_pad_set_eos (pad, FALSE) |
| 80 |
|
| 81 |
the call recurses up and down and returns TRUE. chain1 is set to !EOS |
| 82 |
so that it will be scheduled again. |
| 83 |
|
| 84 |
disksrc1 is set to PLAYING and the new mp3 is playing again. |
| 85 |
|
| 86 |
|
| 87 |
|