Sending EOS through element?

Nicolas Dufresne nicolas at ndufresne.ca
Tue Sep 19 20:27:03 UTC 2017


Le mardi 19 septembre 2017 à 09:51 -0700, killerrats a écrit :
>           - - - - queue1 - - - rtph264depay - - - - h264parse - - - - vtee -
> - - - - - - - - - - - - - - - -
>          /                                                                                                                                 
> \  ____
> rtspsrc                                                                                                                                    
> > A | 
> 
>          \                                                                                                                                 
> /
>            - - - - queue2 - - - rtpjitterbuffer - - - rtpmp4gdepay - - -
> aacparse - - - atee - - - - - - - -
> 
> ___
> > A|
> 
> queue3- - - - \ 
> 	            avimux - - appsink
> queue4 - - - -/
> 
> The classes are how they are structured. I am trying to send eos through
> avimux but it freezes there. If I  send through srcPipeline it's successful.
> I have look through the code but haven't come up with an answer. what i want
> to do is send eos through unlink the  queue3,queue4,avimux and appsink. then
> i will relink them back. I have done this before but don't understand why it
> doesn't want to send through avimux. anyone know? I also have faksinks
> connected to the vtee and atee for continuous play.

Make sure you don't push EOS on the same thread you are pulling data
from the appsink. For the EOS to end, you need to keep pulling on the
appsink. avimux also need special handling on the GstElement for that.
Sending eos on each input pad (e.g. blocking the pad with a probe,
sending the EOS), seems far more likely to work with the benefit that
you will be sending EOS from the streaming thread.

For the sources, the base class have special handling so that it tries
at best to not block on EOS.
> 
> videoRecClass.cpp
> ---------------------
> GstElement* srcPipeline;
> deletepipeline();
> linkpipeline();
> setuppipeline();
> unlinkpipeline();
> 
> PipelineClass.cpp
> ---------------------
> _videoRecClass;
> 
> sendEosThroughAviMux(PipelineClass* pipe)
> {
>       GstElement* avimux =
> gst_bin_get_by_name(GST_BIN(pipe->_videoRecClass.srcPipeline),"avimux");
>       if(!gst_element_send_event(avimux,gst_event_new_eos()))
> 	{
>                 ImmediateLoopQuit();
> 	}
> }
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list