[Bug 759470] input-selector: add mode that waits for keyframe before switching inputs

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Dec 16 07:41:44 PST 2015


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

--- Comment #11 from Tapas Kumar Kundu <tapascst at gmail.com> ---
(In reply to Thiago Sousa Santos from comment #10)
> (In reply to Tapas Kumar Kundu from comment #9)
> > (In reply to Sebastian Dröge (slomo) from comment #8)
> > > I think the check/switching should happen around
> > > http://cgit.freedesktop.org/gstreamer/gstreamer/tree/plugins/elements/
> > > gstinputselector.c#n988
> > 
> > Thanks.  here is the code which i am going to put soon just below line #988:
> > 
> > active_sinkpad = gst_input_selector_get_active_sinkpad (sel); // line 988
> > if (active_sinkpad == pad) { //line 989
> >  // this pad is active sink pad so check for DELTA UNIT and discard.
> >  // buf is passed as pointer of GstBuf in arguments to this chain func.
> >  // so check for DELTA UNIT flag in buf.
> >  if (// buf has DELTA UNIT) 
> >    goto ignore; 
> > }
> 
> This will make it stall anyway, you need to keep pushing buffers from the
> previous active pad. This code will drop buffers until the next keyframe
> which cause a stall just like it does currently.

No it should not . Chain function is invoked for both active and inactive pads
and i am checking whether this is invoked for active pad or not. If it is
invoked on active pad and then only I am dropping for 'delta unit'
> 
> 2) Check the set_active_pad() that is the function that switches the
> active_pad value. In your case you don't want that to happen until the
> to-be-activated pad has a non-delta-unit buffer.
> 

If we do it in this way then the code which will use gst-input-selector, needs
to activate same pad again and again untill it sees for activation is success. 

Please correct me if I am wrong. Thanks for your help

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