Pause/Resume with adder
Stefan Sauer
ensonic at hora-obscura.de
Thu Oct 26 18:34:57 UTC 2017
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
More information about the gstreamer-devel
mailing list