7 (--------) (--------) (--------)
8 ! fakesrc! !identity! !fakesink!
9 ! src ----- sink src ---- sink !
10 (--------) (--------) (--------)
14 fakesrc detects the end of stream. It just sent the last buffer
15 and sets the srcpad to EOS with gst_pad_eos ().
17 gst_pad_eos() will notify the parent about the plugins attempt to
18 signal eos. the parent adds the element to its possible EOS
21 gst_pad_eos() will by default propagate to identy and to fakesink.
22 none of these plugins override the default behaviour so gst_pad_eos
23 returns TRUE and fakesrc signals EOS with the value TRUE.
25 The parent looks in the list of EOS providers and finds the faksrc
26 element that is now signaling EOS. all EOS providers are now in EOS
27 and so the bin fires EOS.
34 (--------) (--------) (--------) ! (--------)!
35 ! fakesrc! !identity! ! queue ! ! !fakesink!!
36 ! src ----- sink src ---- sink src ---- sink !!
37 (--------) (--------) (--------) ! (--------)!
41 fakesrc detects the end of stream. It just sent the last buffer
42 and sets the srcpad to EOS with gst_pad_eos ().
44 gst_pad_eos() will notify the parent about the plugins attempt to
45 signal eos. the parent adds the element to its possible EOS
48 gst_pad_eos() will by default propagate to identy and to queue.
49 queue overrides the eos handler and returns false on the eos
50 request. fakesrc signals EOS with a value of false and the parent
51 bin removes the EOS provider from its list.
53 after the queue has sent out the last buffer, its calls eos on its
54 src pad. queue is added to the top level bin as an eos provider and
55 the default eos handler signals EOS with a value of TRUE to the parent.
57 the parent sees that all the eos providers are in eos now and signals
64 (--------) (--------) (--------) ! (--------)!
65 ! fakesrc! ! tee ! ! queue1 ! ! !fakesink!!
66 ! src ----- sink src ---- sink src ---- sink !!
67 (--------) ! ! (--------) ! (--------)!
72 ! ! (--------) ! (--------)!
73 ! ! ! queue2 ! ! !fakesink!!
74 ! src ---- sink src ---- sink !!
75 ! ! (--------) ! (--------)!
76 (--------) (---------------)
79 fakesrc detects the end of stream. It just sent the last buffer
80 and sets the srcpad to EOS with gst_pad_eos ().
82 the eos handler returns false because both queues return false on the
83 eos request. the parent removes fakesrc as an EOS provider.
85 queue1 and queue2 were responsible for the EOS delay and so they get
86 added to the bin as possible EOS providers.
88 after the queues have sent out their last buffer, they calls eos on their
90 the parent already has the two queues in the EOS provider list so they dont
92 the two queues perform gst_pad_eos () on their pads when the queue is empty,
93 the parent removes the EOS providers from its list, when the list is empty,
101 (--------) (----------) (--------) ! (--------)!
102 ! fakesrc! !mpeg1parse! ! queue1 ! ! !fakesink!!
103 ! src -- sink src ---- sink src ---- sink !!
104 (--------) ! ! (--------) ! (--------)!
105 ! ! (---------------)
107 ! ! (---------------)
109 ! ! (--------) ! (--------)!
110 ! ! ! queue2 ! ! !fakesink!!
111 ! src ---- sink src ---- sink !!
112 ! ! (--------) ! (--------)!
113 (----------) (---------------)
116 this case differs from case3 in that one of the queues can be empty
117 while the other isn't. we assume queue1 is empty while queue2 isn't yet.
119 fakesrc detects the end of stream. It just sent the last buffer
120 and sets the srcpad to EOS with gst_pad_eos ().
122 the eos handler returns false because queue2 returns false on the
123 eos request. the parent removes fakesrc as an EOS provider.
125 queue2 was responsible for the EOS delay and so it gets added to the bin
126 as a possible EOS provider.
128 after the queue2 has sent its last buffer, it performs gst_pad_eos on its
130 the parent already has the queue2 in the list of EOS providers so it does not
132 queue2 finally fires the EOS signal and the parent removes the EOS provider
133 from its list, when the list is empty, the parent fires EOS.
139 (--------) (--------) (--------)
140 ! disksrc! ! mad ! !filesink!
141 ! src ----- sink src ---- sink !
142 (--------) (--------) (--------)
145 disksrc detects the end of stream. It just sent the last buffer
146 and sets the srcpad to EOS with gst_pad_eos ().
148 the eos handler returns false because mad returns false on the
149 eos request. the parent removes mad as an EOS provider.
151 mad was responsible for the EOS delay and so it gets added to the bin
152 as a possible EOS provider.
154 After mad has sent its last buffer, it performs gst_pad_eos on its
156 the parent already has mad in the list of EOS providers so it does not
158 mad finally fires the EOS signal. This time, filesink returns false on
159 the eos request. the parent removes mad as an EOS provider.
161 filesink was responsible for the EOS delay and gets added to the bin
162 as a possible EOS provider.
163 When filesink has written all of it's data and closed the output file,
165 The parent already has filesink in the list of EOS providers so it does
167 The parent removes the EOS provider
168 from its list, and since the list is empty, the parent fires EOS.
172 (--------) (--------) (--------)
173 !disksrc1! ! mad1 ! ! mixer !
174 ! src ----- sink src ---- sink1 ! (--------)
175 (--------) (--------) ! ! !filesink!
177 (--------) (--------) ! ! (--------)
178 !disksrc2! ! mad2 ! ! !
179 ! src ----- sink src ---- sink2 !
180 (--------) (--------) (--------)
182 In this case, we want to make sure the pipeline keeps running after one
183 of the two sources reaches eos. Suppose in this case that disksrc1 will
186 disksrc1 detects the end of stream. It sets eos, mad1 will return false,
187 and mad1 will be responsible for eos. When mad1 had sent out the last
188 buffer, it sends out eos.
190 The mixer intercepts eos and returns false. mad1 is removed from the
191 eos providers and mixer is added.
193 (At this point, the mixer might choose to disconnect mad1->src and
194 mixer->sink1 pads, since it's received eos on mad1->src)
196 mixer will not send out eos since it hasn't received eos from
199 After a while, disksrc2 will detect end of stream, and eos will finally
200 propagate to mixer. mixer might disconnect mad->src2, and after
201 realizing all of it's sources have reached eos, it sends out the final
202 buffer and fires EOS.
204 At this point, filesink will return false, mixer will be removed as an
205 eos provider, and filesink will write out it's final buffer and close
206 the file on disk. At this point, it fires eos, and since it's the last
207 eos provider, the parent can fire eos.