From: Olivier CrĂȘte Date: Tue, 3 Nov 2020 00:49:55 +0000 (-0500) Subject: webrtc: Remove non rtcp-mux code X-Git-Tag: submit/tizen/20210818.024548~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd78dd7a234358ccd25a13ccac8575faf713f5ed;p=platform%2Fupstream%2Fgst-plugins-bad.git webrtc: Remove non rtcp-mux code RTCP mux is now always required by the WebRTC spec Change-Id: I5a2112c84280d4ea7bf9969b5d2e7485855b9aaf Part-of: Signed-off-by: Sangchul Lee --- diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c index e59350fad..5e16bb3e9 100644 --- a/ext/webrtc/gstwebrtcbin.c +++ b/ext/webrtc/gstwebrtcbin.c @@ -1029,6 +1029,8 @@ _collate_peer_connection_states (GstWebRTCBin * webrtc) for (i = 0; i < webrtc->priv->transceivers->len; i++) { GstWebRTCRTPTransceiver *rtp_trans = g_ptr_array_index (webrtc->priv->transceivers, i); + WebRTCTransceiver *trans = WEBRTC_TRANSCEIVER (rtp_trans); + TransportStream *stream = trans->stream; GstWebRTCDTLSTransport *transport; GstWebRTCICEConnectionState ice_state; GstWebRTCDTLSTransportState dtls_state; @@ -1635,7 +1637,7 @@ _on_sending_rtcp (GObject * internal_session, GstBuffer * buffer, pad_name = g_strdup_printf ("send_rtcp_src_%u", - rtp_trans->sender->rtcp_transport->session_id); + rtp_trans->sender->transport->session_id); pad = gst_element_get_static_pad (webrtc->rtpbin, pad_name); g_free (pad_name); if (pad) { @@ -1826,8 +1828,6 @@ gst_webrtc_bin_attach_tos (GstWebRTCBin * webrtc) gst_webrtc_bin_attach_probe_to_ice_sink (webrtc, stream->transport->transport); - gst_webrtc_bin_attach_probe_to_ice_sink (webrtc, - stream->rtcp_transport->transport); } gst_webrtc_bin_update_sctp_priority (webrtc); @@ -1885,18 +1885,6 @@ _create_transport_channel (GstWebRTCBin * webrtc, guint session_id) if (webrtc->priv->tos_attached) gst_webrtc_bin_attach_probe_to_ice_sink (webrtc, transport->transport); - if ((transport = ret->rtcp_transport)) { - g_signal_connect (G_OBJECT (transport->transport), - "notify::state", G_CALLBACK (_on_ice_transport_notify_state), webrtc); - g_signal_connect (G_OBJECT (transport->transport), - "notify::gathering-state", - G_CALLBACK (_on_ice_transport_notify_gathering_state), webrtc); - g_signal_connect (G_OBJECT (transport), "notify::state", - G_CALLBACK (_on_dtls_transport_notify_state), webrtc); - if (webrtc->priv->tos_attached) - gst_webrtc_bin_attach_probe_to_ice_sink (webrtc, transport->transport); - } - GST_TRACE_OBJECT (webrtc, "Create transport %" GST_PTR_FORMAT " for session %u", ret, session_id); diff --git a/ext/webrtc/nicetransport.c b/ext/webrtc/nicetransport.c index f922ec037..ebd08793e 100644 --- a/ext/webrtc/nicetransport.c +++ b/ext/webrtc/nicetransport.c @@ -171,7 +171,6 @@ gst_webrtc_nice_transport_finalize (GObject * object) void gst_webrtc_nice_transport_update_buffer_size (GstWebRTCNiceTransport * nice) { - GstWebRTCICETransport *ice = GST_WEBRTC_ICE_TRANSPORT (nice); NiceAgent *agent = NULL; GPtrArray *sockets; guint i; @@ -179,8 +178,7 @@ gst_webrtc_nice_transport_update_buffer_size (GstWebRTCNiceTransport * nice) g_object_get (nice->stream->ice, "agent", &agent, NULL); g_assert (agent != NULL); - sockets = nice_agent_get_sockets (agent, nice->stream->stream_id, - ice->component + 1); + sockets = nice_agent_get_sockets (agent, nice->stream->stream_id, 1); if (sockets == NULL) { g_object_unref (agent); return; diff --git a/gst-libs/gst/webrtc/rtpsender.h b/gst-libs/gst/webrtc/rtpsender.h index ca7296b26..f8fa9f93e 100644 --- a/gst-libs/gst/webrtc/rtpsender.h +++ b/gst-libs/gst/webrtc/rtpsender.h @@ -75,9 +75,8 @@ GST_WEBRTC_API void gst_webrtc_rtp_sender_set_transport (GstWebRTCRTPSender * sender, GstWebRTCDTLSTransport * transport); GST_WEBRTC_API -void gst_webrtc_rtp_sender_set_rtcp_transport (GstWebRTCRTPSender * sender, - GstWebRTCDTLSTransport * transport); - +void gst_webrtc_rtp_sender_set_priority (GstWebRTCRTPSender *sender, + GstWebRTCPriorityType priority); G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstWebRTCRTPSender, gst_object_unref)