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 -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 > 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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le Jeudi 26 octobre 2017 20h35, Stefan Sauer <[hidden email]> 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 > 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 [hidden email] 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 ? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Stefan Sauer
Hi Stefan,
I am able to perform pause/resume successfully with adder after following modification. 1) Pause -- gst_pad_add_probe (audioconvert src, GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_BUFFER, (GstPadProbeCallback) cb_have_data, NULL, NULL); -- unlinking audioconvert src and sink_0 by gst_pad_unlink -- gst_element_release_request_pad sink_0 2) Resume after some time -- Linked audioconvert src of Src1 and sink_2 ( getting by gst_element_get_request_pad(adder,"sink_%u");) by gst_pad_link -- gst_pad_remove_probe (audioconvert src ,probe_id); Regards, Avinash -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |