Webrtcbin hangs when switched to READY state

Vladimir Tyutin vladimir.tyutin at gmail.com
Fri Jan 15 10:43:03 UTC 2021


Hi all,
I have the issue when webrtcbin hangs when I remove it from pipeline and
move to NULL state.
I log I see it hangs when it's switching to READY state.

What I do:
My pipeline looks like this:
videosource -> tee -> queue -> rtppay -> capsfilter -> webrtcbin
audiosource -> tee -> queue -> opusenc -> rtppay -> capsfilter -> webrtcbin

1. I block tee src pad for video and audio branch
2. I unlink all elements for both video and audio branches starting from
tee (via unlink_many call for tee, queue, rtppay, capfilter, webrtc)
3. I remove unlinked elements and set state to NULL (I start from queues
and end by webrtcbin)
4. All elements are removed and switched to NULL successfully. But
webrtcbin is removed with no error but when it switches to NULL state it
hangs

My log is below:
on_server_message:
BYE
[CAMERA_DEBUG]  iterate pipeline
[CAMERA_DEBUG] element: webrtc[transportreceivebin1]
[CAMERA_DEBUG] element: transportreceivebin1[funnel9]
[CAMERA_DEBUG] element: transportreceivebin1[funnel8]
[CAMERA_DEBUG] element: transportreceivebin1[funnel7]
[CAMERA_DEBUG] element: transportreceivebin1[nicesrc3]
[CAMERA_DEBUG] element: transportreceivebin1[capsfilter5]
[CAMERA_DEBUG] element: transportreceivebin1[queue7]
[CAMERA_DEBUG] element: transportreceivebin1[dtlssrtpdec3]
[CAMERA_DEBUG] element: dtlssrtpdec3[srtpdec3]
[CAMERA_DEBUG] element: dtlssrtpdec3[dtlsdec3]
[CAMERA_DEBUG] element: dtlssrtpdec3[dtlssrtpdemux3]
[CAMERA_DEBUG] element: transportreceivebin1[nicesrc2]
[CAMERA_DEBUG] element: transportreceivebin1[capsfilter4]
[CAMERA_DEBUG] element: transportreceivebin1[queue6]
[CAMERA_DEBUG] element: transportreceivebin1[dtlssrtpdec2]
[CAMERA_DEBUG] element: dtlssrtpdec2[srtpdec2]
[CAMERA_DEBUG] element: dtlssrtpdec2[dtlsdec2]
[CAMERA_DEBUG] element: dtlssrtpdec2[dtlssrtpdemux2]
[CAMERA_DEBUG] element: webrtc[transportsendbin1]
[CAMERA_DEBUG] element: transportsendbin1[nicesink3]
[CAMERA_DEBUG] element: transportsendbin1[dtlssrtpenc3]
[CAMERA_DEBUG] element: dtlssrtpenc3[funnel6]
[CAMERA_DEBUG] element: dtlssrtpenc3[srtpenc3]
[CAMERA_DEBUG] element: dtlssrtpenc3[dtlsenc3]
[CAMERA_DEBUG] element: transportsendbin1[nicesink2]
[CAMERA_DEBUG] element: transportsendbin1[dtlssrtpenc2]
[CAMERA_DEBUG] element: dtlssrtpenc2[clocksync_0]
[CAMERA_DEBUG] element: dtlssrtpenc2[funnel5]
[CAMERA_DEBUG] element: dtlssrtpenc2[srtpenc2]
[CAMERA_DEBUG] element: dtlssrtpenc2[dtlsenc2]
[CAMERA_DEBUG] element: transportsendbin1[outputselector1]
[CAMERA_DEBUG] element: webrtc[transportreceivebin0]
[CAMERA_DEBUG] element: transportreceivebin0[funnel4]
[CAMERA_DEBUG] element: transportreceivebin0[funnel3]
[CAMERA_DEBUG] element: transportreceivebin0[funnel2]
[CAMERA_DEBUG] element: transportreceivebin0[nicesrc1]
[CAMERA_DEBUG] element: transportreceivebin0[capsfilter3]
[CAMERA_DEBUG] element: transportreceivebin0[queue5]
[CAMERA_DEBUG] element: transportreceivebin0[dtlssrtpdec1]
[CAMERA_DEBUG] element: dtlssrtpdec1[srtpdec1]
[CAMERA_DEBUG] element: dtlssrtpdec1[dtlsdec1]
[CAMERA_DEBUG] element: dtlssrtpdec1[dtlssrtpdemux1]
[CAMERA_DEBUG] element: transportreceivebin0[nicesrc0]
[CAMERA_DEBUG] element: transportreceivebin0[capsfilter2]
[CAMERA_DEBUG] element: transportreceivebin0[queue4]
[CAMERA_DEBUG] element: transportreceivebin0[dtlssrtpdec0]
[CAMERA_DEBUG] element: dtlssrtpdec0[srtpdec0]
[CAMERA_DEBUG] element: dtlssrtpdec0[dtlsdec0]
[CAMERA_DEBUG] element: dtlssrtpdec0[dtlssrtpdemux0]
[CAMERA_DEBUG] element: webrtc[transportsendbin0]
[CAMERA_DEBUG] element: transportsendbin0[nicesink1]
[CAMERA_DEBUG] element: transportsendbin0[dtlssrtpenc1]
[CAMERA_DEBUG] element: dtlssrtpenc1[funnel1]
[CAMERA_DEBUG] element: dtlssrtpenc1[srtpenc1]
[CAMERA_DEBUG] element: dtlssrtpenc1[dtlsenc1]
[CAMERA_DEBUG] element: transportsendbin0[nicesink0]
[CAMERA_DEBUG] element: transportsendbin0[dtlssrtpenc0]
[CAMERA_DEBUG] element: dtlssrtpenc0[clocksync_0]
[CAMERA_DEBUG] element: dtlssrtpenc0[funnel0]
[CAMERA_DEBUG] element: dtlssrtpenc0[srtpenc0]
[CAMERA_DEBUG] element: dtlssrtpenc0[dtlsenc0]
[CAMERA_DEBUG] element: transportsendbin0[outputselector0]
[CAMERA_DEBUG] element: webrtc[rtpbin]
[CAMERA_DEBUG] element: rtpbin[rtpptdemux1]
[CAMERA_DEBUG] element: rtpbin[rtpjitterbuffer1]
[CAMERA_DEBUG] element: rtpbin[rtpptdemux0]
[CAMERA_DEBUG] element: rtpbin[rtpjitterbuffer0]
[CAMERA_DEBUG] element: rtpbin[rtpstorage1]
[CAMERA_DEBUG] element: rtpbin[rtpssrcdemux1]
[CAMERA_DEBUG] element: rtpbin[rtpsession1]
[CAMERA_DEBUG] element: rtpbin[rtpstorage0]
[CAMERA_DEBUG] element: rtpbin[rtpssrcdemux0]
[CAMERA_DEBUG] element: rtpbin[rtpsession0]
[CAMERA_DEBUG]  restart webrtc async
[CAMERA_DEBUG] webrtcbin sink pad: sink_0
0:00:24.226477004  2600  0x30d6b20 LOG                webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:1354:_check_if_negotiation_is_needed:<webrtc>
checking if negotiation is needed
0:00:24.226687545  2600  0x30d6b20 LOG                webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:1504:_check_if_negotiation_is_needed:<webrtc>
no negotiation needed
0:00:24.228415793  2600  0x3199bb0 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5640:on_rtpbin_sender_ssrc_active:<webrtc>
session 0 ssrc 1503644076 sender ssrc active
0:00:24.228859750  2600  0x3199bb0 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5624:on_rtpbin_timeout:<webrtc>
session 0 ssrc 1503644076 timeout
[CAMERA_DEBUG] webrtcbin sink pad: sink_1
0:00:24.229811082  2600  0x30d6b20 LOG                webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:1354:_check_if_negotiation_is_needed:<webrtc>
checking if negotiation is needed
0:00:24.230393290  2600  0x30d6b20 LOG                webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:1504:_check_if_negotiation_is_needed:<webrtc>
no negotiation needed
[CAMERA_DEBUG] block tee pads
[CAMERA_DEBUG]  block pad with name: src_1
[CAMERA_DEBUG]  block pad with name: src_2
[CAMERA_DEBUG] unlink incomming audio
[CAMERA_DEBUG] unlink video branch
[CAMERA_DEBUG] unlink audio branch
[CAMERA_DEBUG] remove element: videoqueue
[CAMERA_DEBUG] set state NULL for element: videoqueue
0:00:24.236387073  2600  0x3103290 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5640:on_rtpbin_sender_ssrc_active:<webrtc>
session 1 ssrc 1609958542 sender ssrc active
0:00:24.236876739  2600  0x3103290 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5624:on_rtpbin_timeout:<webrtc>
session 1 ssrc 1609958542 timeout
0:00:24.237587780  2600  0x3199bb0 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5632:on_rtpbin_new_sender_ssrc:<webrtc>
session 0 ssrc 1503644076 new sender ssrc
0:00:24.238524487  2600  0x3199bb0 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5640:on_rtpbin_sender_ssrc_active:<webrtc>
session 0 ssrc 1503644076 sender ssrc active
[CAMERA_DEBUG] remove element: vrtp
[CAMERA_DEBUG] set state NULL for element: vrtp
[CAMERA_DEBUG] remove element: vrtpcaps
[CAMERA_DEBUG] set state NULL for element: vrtpcaps
[CAMERA_DEBUG] remove element: audioqueue
[CAMERA_DEBUG] set state NULL for element: audioqueue
[CAMERA_DEBUG] remove element: aconvert
[CAMERA_DEBUG] set state NULL for element: aconvert
[CAMERA_DEBUG] remove element: opusenc
[CAMERA_DEBUG] set state NULL for element: opusenc
[CAMERA_DEBUG] remove element: artp
[CAMERA_DEBUG] set state NULL for element: artp
[CAMERA_DEBUG] remove element: artpcaps
[CAMERA_DEBUG] set state NULL for element: artpcaps
[CAMERA_DEBUG] remove element: decodebin1
[CAMERA_DEBUG] set state NULL for element: decodebin1
[CAMERA_DEBUG] remove element: queue8
[CAMERA_DEBUG] set state NULL for element: queue8
[CAMERA_DEBUG] remove element: audioconvert0
[CAMERA_DEBUG] set state NULL for element: audioconvert0
[CAMERA_DEBUG] remove element: audioresample0
[CAMERA_DEBUG] set state NULL for element: audioresample0
[CAMERA_DEBUG] remove element: autoaudiosink0
[CAMERA_DEBUG] set state NULL for element: autoaudiosink0
0:00:24.391078814  2600  0x3103290 INFO               webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5632:on_rtpbin_new_sender_ssrc:<webrtc>
session 1 ssrc 1609958542 new sender ssrc
<=== [tvv777/get/discovery]: []
===> [tvv777/get/discovery/response/0]: [type=doorbell_zrt_t30
device_id=tvv777
ip=192.168.1.14
state=1
]
[CAMERA_DEBUG] remove element: webrtc
[CAMERA_DEBUG] set state NULL for element: webrtc
0:00:24.490655175  2600  0x30d6b20 DEBUG              webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5737:gst_webrtc_bin_change_state:
changing state: PLAYING => PAUSED
0:00:24.490904258  2600  0x30d6b20 DEBUG   webrtctransportsendbin
gst-plugins-bad-1.18.2/ext/webrtc/transportsendbin.c:195:transport_send_bin_change_state:<transportsendbin1>
changing state: PLAYING => PAUSED
0:00:24.491645632  2600  0x30d6b20 DEBUG   webrtctransportsendbin
gst-plugins-bad-1.18.2/ext/webrtc/transportsendbin.c:195:transport_send_bin_change_state:<transportsendbin0>
changing state: PLAYING => PAUSED
0:00:24.492981046  2600  0x30d6b20 DEBUG   webrtctransportreceivebin
gst-plugins-bad-1.18.2/ext/webrtc/transportreceivebin.c:236:transport_receive_bin_change_state:
changing state: PLAYING => PAUSED
0:00:24.493846087  2600  0x30d6b20 DEBUG   webrtctransportreceivebin
gst-plugins-bad-1.18.2/ext/webrtc/transportreceivebin.c:236:transport_receive_bin_change_state:
changing state: PLAYING => PAUSED
0:00:24.494728002  2600  0x30d6b20 DEBUG              webrtcbin
gst-plugins-bad-1.18.2/ext/webrtc/gstwebrtcbin.c:5737:gst_webrtc_bin_change_state:
changing state: PAUSED => READY
================ Here it hangs ================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210115/4e2f5cb1/attachment-0001.htm>


More information about the gstreamer-devel mailing list