Pause/Resume with adder

philippe renon philippe_renon at yahoo.fr
Thu Oct 26 20:19:06 UTC 2017


 

    Le Jeudi 26 octobre 2017 20h35, Stefan Sauer <ensonic at hora-obscura.de> a écrit :
 

 On 10/25/2017 01:43 PM, avinashgst wrote:
> Hi,
>
> I have the pipeline in which need to mix 2 audio at run time.
>
> when single file src1:
> filesrc ! decodebin ! audioresample ! audioconvert ! (sink_0) adder !
> audioconvert ! autoaudiosink
>
> During runtime adding one more file src2:
> filesrc ! decodebin ! audioresample ! audioconvert ! --->
>                                                                              
> (sink_0) (sink_01) adder ! audioconvert ! autoaudiosink
> filesrc ! decodebin ! audioresample ! audioconvert !---->
>
> This is working fine. 
>
> To pause src1:
>      unlinking audioconvert src and  sink_0 by gst_pad_unlink and called
> gst_element_release_request_pad  for sink_0.
>      and setting filesrc, decodebin, audioresample, audioconvert to
> GST_STATE_PAUSE
> Src2 is continue to play and its working as expected.
>
> Now after some time wants to resume the src1 while src2 still playing.
> filesrc ! decodebin ! audioresample ! audioconvert ! --->
>                                                                              
> (sink_01) (sink_02) adder ! audioconvert ! autoaudiosink
> filesrc ! decodebin ! audioresample ! audioconvert !---->
>
>          linked audioconvert src and  sink_2 by gst_pad_link and setting
> filesrc, decodebin, audioresample, audioconvert to GST_STATE_PLAYING
>
> In that case Src2 also stopped playing and getting underflow error.
> From gstreamer log its seems that src1 is not pushing any data after setting
> elements to GST_STATE_PLAYING
>
> Any suggestion how to achieve pause/resume operation with adder element.  
>
> Regards,
> Avinash
>
If you pause/unpause branches you might want to try liveadder. Also you
don't describe how you re-link src1. Are you using pad-probes? We have
some examples under gst-plugins-base/tests/examples/dynamic/

Stefan
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

You can try to set provide-clock to false on your audio sink.

Which version of GStreamer are you using and on which OS ?   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171026/aea7c2bf/attachment.html>


More information about the gstreamer-devel mailing list