| 1 |
OUTDATED |
| 2 |
-------- |
| 3 |
|
| 4 |
|
| 5 |
case 1) |
| 6 |
|
| 7 |
(--------------------------------------------------) |
| 8 |
! bin ! |
| 9 |
! (--------) (--------) (--------) ! |
| 10 |
! ! fakesrc! !identity! !fakesink! ! |
| 11 |
! ! src ----- sink src ---- sink ! ! |
| 12 |
! (--------) (--------) (--------) ! |
| 13 |
(--------------------------------------------------) |
| 14 |
|
| 15 |
.scheduling. |
| 16 |
|
| 17 |
case1 has just one scheduled entity (chain) no problem here. |
| 18 |
|
| 19 |
.eos. |
| 20 |
|
| 21 |
fakesrc detects the end of stream. It just returned the last buffer. |
| 22 |
The next _pull will cause the srcpad to trigger gst_pad_set_eos (). |
| 23 |
After that it will return a NULL buffer. |
| 24 |
|
| 25 |
gst_pad_set_eos() will notify the parent about the plugins attempt to |
| 26 |
signal eos. the parent adds the element to its possible EOS |
| 27 |
providers. |
| 28 |
|
| 29 |
gst_pad_set_eos() will by default propagate to identy and to fakesink. |
| 30 |
none of these plugins override the default behaviour so gst_pad_set_eos |
| 31 |
returns TRUE and fakesrc signals EOS with the value TRUE. |
| 32 |
|
| 33 |
The parent looks in the list of EOS providers and finds the faksrc |
| 34 |
element that is now signaling EOS. all EOS providers are now in EOS |
| 35 |
and so the bin fires EOS. |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
case 2) |
| 40 |
(---------------) |
| 41 |
!thread ! |
| 42 |
(--------) (--------) (--------) ! (--------)! |
| 43 |
! fakesrc! !identity! ! queue ! ! !fakesink!! |
| 44 |
! src ----- sink src ---- sink src ---- sink !! |
| 45 |
(--------) (--------) (--------) ! (--------)! |
| 46 |
(---------------) |
| 47 |
|
| 48 |
.scheduling. |
| 49 |
|
| 50 |
case2 has two scheduled entities: fsr-i-q, q-fsk. |
| 51 |
|
| 52 |
.eos. |
| 53 |
|
| 54 |
fakesrc detects the end of stream. It just returned the last buffer. |
| 55 |
The next _pull will cause the srcpad to trigger gst_pad_set_eos (). |
| 56 |
After that it will return a NULL buffer. |
| 57 |
|
| 58 |
gst_pad_set_eos() will notify the parent about the plugins attempt to |
| 59 |
signal eos. the parent adds the element to its possible EOS |
| 60 |
providers. |
| 61 |
|
| 62 |
gst_pad_eos() will by default propagate to identy and to queue. |
| 63 |
queue overrides the eos handler and returns false on the eos |
| 64 |
request. fakesrc signals EOS with a value of false and the parent |
| 65 |
bin removes the EOS provider from its list. |
| 66 |
|
| 67 |
after the queue has sent out the last buffer, its calls eos on its |
| 68 |
src pad. queue is added to the top level bin as an eos provider and |
| 69 |
the default eos handler signals EOS with a value of TRUE to the parent. |
| 70 |
|
| 71 |
the parent sees that all the eos providers are in eos now and signals |
| 72 |
EOS. |
| 73 |
|
| 74 |
|
| 75 |
case 3) |
| 76 |
(---------------) |
| 77 |
!thread ! |
| 78 |
(--------) (--------) (--------) ! (--------)! |
| 79 |
! fakesrc! ! tee ! ! queue1 ! ! !fakesink!! |
| 80 |
! src ----- sink src ---- sink src ---- sink !! |
| 81 |
(--------) ! ! (--------) ! (--------)! |
| 82 |
! ! (---------------) |
| 83 |
! ! |
| 84 |
! ! (---------------) |
| 85 |
! ! !thread ! |
| 86 |
! ! (--------) ! (--------)! |
| 87 |
! ! ! queue2 ! ! !fakesink!! |
| 88 |
! src ---- sink src ---- sink !! |
| 89 |
! ! (--------) ! (--------)! |
| 90 |
(--------) (---------------) |
| 91 |
|
| 92 |
|
| 93 |
fakesrc detects the end of stream. It just sent the last buffer |
| 94 |
and sets the srcpad to EOS with gst_pad_eos (). |
| 95 |
|
| 96 |
the eos handler returns false because both queues return false on the |
| 97 |
eos request. the parent removes fakesrc as an EOS provider. |
| 98 |
|
| 99 |
queue1 and queue2 were responsible for the EOS delay and so they get |
| 100 |
added to the bin as possible EOS providers. |
| 101 |
|
| 102 |
after the queues have sent out their last buffer, they calls eos on their |
| 103 |
src pads. |
| 104 |
the parent already has the two queues in the EOS provider list so they don't |
| 105 |
get added twice. |
| 106 |
the two queues perform gst_pad_eos () on their pads when the queue is empty, |
| 107 |
the parent removes the EOS providers from its list, when the list is empty, |
| 108 |
the parent fires EOS. |
| 109 |
|
| 110 |
|
| 111 |
case 4) |
| 112 |
|
| 113 |
(---------------) |
| 114 |
!thread ! |
| 115 |
(--------) (----------) (--------) ! (--------)! |
| 116 |
! fakesrc! !mpeg1parse! ! queue1 ! ! !fakesink!! |
| 117 |
! src -- sink src ---- sink src ---- sink !! |
| 118 |
(--------) ! ! (--------) ! (--------)! |
| 119 |
! ! (---------------) |
| 120 |
! ! |
| 121 |
! ! (---------------) |
| 122 |
! ! !thread ! |
| 123 |
! ! (--------) ! (--------)! |
| 124 |
! ! ! queue2 ! ! !fakesink!! |
| 125 |
! src ---- sink src ---- sink !! |
| 126 |
! ! (--------) ! (--------)! |
| 127 |
(----------) (---------------) |
| 128 |
|
| 129 |
|
| 130 |
this case differs from case3 in that one of the queues can be empty |
| 131 |
while the other isn't. we assume queue1 is empty while queue2 isn't yet. |
| 132 |
|
| 133 |
fakesrc detects the end of stream. It just sent the last buffer |
| 134 |
and sets the srcpad to EOS with gst_pad_eos (). |
| 135 |
|
| 136 |
the eos handler returns false because queue2 returns false on the |
| 137 |
eos request. the parent removes fakesrc as an EOS provider. |
| 138 |
|
| 139 |
queue2 was responsible for the EOS delay and so it gets added to the bin |
| 140 |
as a possible EOS provider. |
| 141 |
|
| 142 |
after the queue2 has sent its last buffer, it performs gst_pad_eos on its |
| 143 |
src pad. |
| 144 |
the parent already has the queue2 in the list of EOS providers so it does not |
| 145 |
get added twice. |
| 146 |
queue2 finally fires the EOS signal and the parent removes the EOS provider |
| 147 |
from its list, when the list is empty, the parent fires EOS. |
| 148 |
|
| 149 |
|
| 150 |
|