<div dir="ltr"><div dir="ltr">Hi there,<div>I'm trying to restart webrtc gstreamer plugging without restarting the whole pipeline. The reason for that is that in pipeline I have capturing to ts files that are uploaded to server. So I can't stop whole pipeline but only webrtc branch. <br></div><div>See my pipeline below. </div><div>The steps I do to restart webrtc are the following:</div><div>1. Add blocking prob on src pads for audio and video queue after tee elements</div><div>2. Once it's blocked I remove video and audio branches elements from pipeline together with webrtcbin element and set them to NULL state</div><div>3. Create webrtcbin and video/audio branched elements and add them to pipeline</div><div>4. Link elements</div><div>5. Unblock queue src pads.</div><div><br></div><div>With this sequence I observe the following issues:</div><div>1. Sometimes queue src pads are not blocked. I see event from one pad about blocking state but not from another.  But I'm waiting both pads blocking events to proceed</div><div>2. When both are blocked. Sometime (very frequently) webrtcbin hangs in switching to NULL state. I see it tries to switch all its internal elements to NULL state and hangs somewhere inside</div><div>3. If both previous issues not happened when I start new webrtc session audio is not received on client side despite SDP data contains valid audio data</div><div><br></div><div>Do you have any idea what is the proper way to restart webrtcbin element inside pipeline and prepare it to new connection?</div><div><br></div><div>Here is my pipeline:</div><div>"webrtcbin name=webrtc " STUN_SERVER_PROP "=" STUN_1 " " STUN_SERVER_PROP "=" STUN_2 " " STUN_SERVER_PROP "=" STUN_3 " " \</div><div>                    STUN_SERVER_PROP "=" STUN_4 " " STUN_SERVER_PROP "=" STUN_5 " " TURN_SERVER_PROP "=" TURN_1 " " \</div><div>                    "mpegtsmux name=fullhdts ! hlssink max-files=100 target-duration=10 location=/mnt/ramdisk/fullhd_%09d.ts " \</div><div>                    "mpegtsmux name=vgats ! hlssink max-files=100 target-duration=10 location=/mnt/ramdisk/vga_%09d.ts " \</div><div>                    "v536videosrc sys-init=false device=1 channel=0 encoder=0 format=H264 width=1920 height=1080 ! video/x-h264, stream-format=byte-stream, alignment=au, profile=baseline ! queue ! h264parse ! fullhdts. " \</div><div>                    "v536videosrc sys-init=false device=1 channel=1 encoder=1 format=H264 width=640 height=480 ! video/x-h264, stream-format=byte-stream, alignment=au, profile=baseline ! tee name=tv ! queue ! h264parse ! vgats. " \</div><div>                    "alsasrc ! tee name=t ! queue ! avenc_aac ! aacparse ! fullhdts. " \</div><div>                    "t. ! queue ! avenc_aac ! aacparse ! vgats. " \</div><div>                    "tv. ! queue name=videoqueue leaky=downstream max-size-buffers=25 ! rtph264pay name=vrtp ! capsfilter name=vrtpcaps caps=" RTP_CAPS_H264 "96 ! webrtc. " \</div><div>                    "t. ! queue name=audioqueue leaky=downstream ! audioconvert name=aconvert ! opusenc name=opusenc ! rtpopuspay name=artp ! capsfilter name=artpcaps caps=" RTP_CAPS_OPUS "97 ! webrtc. "</div></div></div>