webrtc: Remove non rtcp-mux code 23/262623/1
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 3 Nov 2020 00:49:55 +0000 (19:49 -0500)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 17 Aug 2021 02:15:44 +0000 (11:15 +0900)
RTCP mux is now always required by the WebRTC spec

Change-Id: I5a2112c84280d4ea7bf9969b5d2e7485855b9aaf
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1765>
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
ext/webrtc/gstwebrtcbin.c
ext/webrtc/nicetransport.c
gst-libs/gst/webrtc/rtpsender.h

index e59350fad8fe3dea352e8770b6965009de0cf8c5..5e16bb3e99bd37f642810f046511f6c842cf0e7d 100644 (file)
@@ -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);
 
index f922ec0371b3ed6d846b652bb7786c010ce1fbeb..ebd08793e51ea48cb32e5fca23996233292f8179 100644 (file)
@@ -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;
index ca7296b26581135f193ca397b205827355b3f75b..f8fa9f93e4833350dd7c3e45b12c7f583f1fd585 100644 (file)
@@ -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)