[Bug 750761] inputselector: Handle different duration track selection

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 23 03:11:06 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750761

--- Comment #45 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to kevin from comment #44)
> (In reply to Sebastian Dröge (slomo) from comment #43)
> > Review of attachment 305894 [details] [review] [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.

Ah right, but this will break gapless playback. It should also unblock if all
streams are EOS.


> > 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.

Where are they waiting in the code? I didn't see any waiting in the chain
function related to this

> > @@ +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.

You can send the same EOS event multiple times by getting a new reference
before gst_pad_push_event()

-- 
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