[Bug 750761] inputselector: Handle different duration track selection
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jun 23 03:03:27 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=750761
--- Comment #44 from kevin <kevinbing.song at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #43)
> Review of attachment 305894 [details] [review]:
>
> ::: plugins/elements/gstinputselector.c
> @@ +459,3 @@
> +static gboolean
> +gst_input_selector_eos_wait (GstInputSelector * self, GstSelectorPad * pad)
> +{
>
> So this basically blocks EOS until the pad becomes the active pad, right?
> How does that make things work correctly, and how is it different to before?
>
No, eos_wait () will block until flush or state change. So can switch track
between EOS track and non-EOS track on the fly. So can switch track:
EOS->non-EOS->EOS->non-EOS. Old code can't support this.
>
> What would now still happen is that the active EOS is forwarded, and all
> other streams are blocked on EOS until they become active. But if the active
> stream is EOS, all buffers of the inactive streams are just dropped until
> they themselves go EOS. So while we now can switch from an EOS to a non-EOS
> stream, we will most likely still have dropped a lot of data instead of
> waiting at the current time.
>
All inactive track will blocked when active reach EOS. All inactive track is
waiting active track advancing, but active no any data.
> @@ +473,3 @@
> + }
> +
> + gst_pad_push_event (self->srcpad, gst_event_new_eos ());
>
> You should ideally forward exactly the EOS event that arrived here instead
> of a new one :)
>
No, eos_wait () may send EOS event many times. it will send eos event every
time when switch track to EOS track.
> @@ -1016,3 @@
> }
>
> - if (sel->eos) {
>
> I think sel->eos is completely unused now and could go away
Still need it to indicate state change. eos_wait () need unblock. Maybe we can
change the parameter name.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list