From 9977f8e2526a195039d18e7f30b47e6bfd2b0053 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 1 Jan 2001 19:54:01 +0000 Subject: [PATCH] Added some more TODOs Original commit message from CVS: Added some more TODOs Added a proposition for eos propagation --- docs/random/TODO-post-0.1.0 | 4 ++ docs/random/eos | 133 ++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 docs/random/eos diff --git a/docs/random/TODO-post-0.1.0 b/docs/random/TODO-post-0.1.0 index 26ec01e826..afc256c6a5 100644 --- a/docs/random/TODO-post-0.1.0 +++ b/docs/random/TODO-post-0.1.0 @@ -5,3 +5,7 @@ - Convert to GObject - Get editor working better + +- make autoplugging algorithms pluggable + +- make scheduling algorithms pluggable diff --git a/docs/random/eos b/docs/random/eos new file mode 100644 index 0000000000..6c1ead9e20 --- /dev/null +++ b/docs/random/eos @@ -0,0 +1,133 @@ + +case 1) + + (--------) (--------) (--------) + ! fakesrc! !identity! !fakesink! + ! src ----- sink src ---- sink ! + (--------) (--------) (--------) + + + + fakesrc detects the end of stream. It just sent the last buffer + and sets the srcpad to EOS with gst_pad_eos (). + + gst_pad_eos() will notify the parent about the plugins attempt to + signal eos. the parent adds the element to its possible EOS + providers. + + gst_pad_eos() will by default propagate to identy and to fakesink. + none of these plugins override the default behaviour so gst_pad_eos + returns TRUE and fakesrc signals EOS with the value TRUE. + + The parent looks in the list of EOS providers and finds the faksrc + element that is now signaling EOS. all EOS providers are now in EOS + and so the bin fires EOS. + + + +case 2) + (---------------) + !thread ! + (--------) (--------) (--------) ! (--------)! + ! fakesrc! !identity! ! queue ! ! !fakesink!! + ! src ----- sink src ---- sink src ---- sink !! + (--------) (--------) (--------) ! (--------)! + (---------------) + + + fakesrc detects the end of stream. It just sent the last buffer + and sets the srcpad to EOS with gst_pad_eos (). + + gst_pad_eos() will notify the parent about the plugins attempt to + signal eos. the parent adds the element to its possible EOS + providers. + + gst_pad_eos() will by default propagate to identy and to queue. + queue overrides the eos handler and returns false on the eos + request. fakesrc signals EOS with a value of false and the parent + bin removes the EOS provider from its list. + + after the queue has sent out the last buffer, its calls eos on its + src pad. queue is added to the top level bin as an eos provider and + the default eos handler signals EOS with a value of TRUE to the parent. + + the parent sees that all the eos providers are in eos now and signals + EOS. + + +case 3) + (---------------) + !thread ! + (--------) (--------) (--------) ! (--------)! + ! fakesrc! ! tee ! ! queue1 ! ! !fakesink!! + ! src ----- sink src ---- sink src ---- sink !! + (--------) ! ! (--------) ! (--------)! + ! ! (---------------) + ! ! + ! ! (---------------) + ! ! !thread ! + ! ! (--------) ! (--------)! + ! ! ! queue2 ! ! !fakesink!! + ! src ---- sink src ---- sink !! + ! ! (--------) ! (--------)! + (--------) (---------------) + + + fakesrc detects the end of stream. It just sent the last buffer + and sets the srcpad to EOS with gst_pad_eos (). + + the eos handler returns false because both queues return false on the + eos request. the parent removes fakesrc as an EOS provider. + + queue1 and queue2 were responisble for the EOS delay and so they get + added to the bin as possible EOS providers. + + after the queues have sent out their last buffer, they calls eos on their + src pads. + the parent allready has the two queues in the EOS provider list so they dont + get added twice. + the two queues perform gst_pad_eos () on their pads when the queue is empty, + the parent removes the EOS providers from its list, when the list is empty, + the parent fires EOS. + + +case 4) + + (---------------) + !thread ! + (--------) (----------) (--------) ! (--------)! + ! fakesrc! !mpeg1parse! ! queue1 ! ! !fakesink!! + ! src -- sink src ---- sink src ---- sink !! + (--------) ! ! (--------) ! (--------)! + ! ! (---------------) + ! ! + ! ! (---------------) + ! ! !thread ! + ! ! (--------) ! (--------)! + ! ! ! queue2 ! ! !fakesink!! + ! src ---- sink src ---- sink !! + ! ! (--------) ! (--------)! + (----------) (---------------) + + + this case differs from case3 in that one of the queues can be empty + while the other isn't. we assume queue1 is empty while queue2 isn't yet. + + fakesrc detects the end of stream. It just sent the last buffer + and sets the srcpad to EOS with gst_pad_eos (). + + the eos handler returns false because queue2 return false on the + eos request. the parent removes fakesrc as an EOS provider. + + queue2 was responisble for the EOS delay and so it gets added to the bin + as a possible EOS provider. + + after the queue2 has sent its last buffer, it performs gst_pad_eos on its + src pad. + the parent allready has the queue2 in the list of EOS providers so it does not + get added twice. + queue2 finally fires the EOS signal and the parent removes the EOS provider + from its list, when the list is empty, the parent fires EOS. + + +