I have a pipeline that contains audio/video streams muxing to ts files and webrtc for p2p video chat with iOS and Android clients.
The idea is that ts files are capturing all the time and should be interrupted and webrtc call should start by request from client side.
Everything works fine the first time. But when client stops the webrtc session I need webrtcbin to be reset and ready for new connection. But I need to do it without restarting whole pipeline. How to do this?
I tried to block src pads for video and audio queues and then remove webrtcbin from pipeline and create it again. But it doesn't work.
If I block queue src pads it hangs in call:
gst_element_set_state (webrtc, GST_STATE_NULL);
If I unblock pads before this call it does not hangs and everything seems to be ok but then I see errors that nice element is not linked.
So please advice the proper way to reset webrtcbin element without restarting whole pipeline.