Commit df8d29e9 authored by Olivier Crête's avatar Olivier Crête 👻 Committed by GStreamer Marge Bot
Browse files

webrtcbin: Remove remnant of non-rtcp-mux mode

There was some code left that wasn't used anymore.

Part-of: <gstreamer/gst-plugins-bad!1930>
parent 3c3e8930
......@@ -949,7 +949,6 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc)
GstWebRTCDTLSTransport *dtls_transport;
GstWebRTCICETransport *transport;
GstWebRTCICEGatheringState ice_state;
gboolean rtcp_mux = FALSE;
if (rtp_trans->stopped || stream == NULL) {
GST_TRACE_OBJECT (webrtc, "transceiver %p stopped or unassociated",
......@@ -963,8 +962,6 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc)
GST_TRACE_OBJECT (webrtc, "transceiver %p has no mid", rtp_trans);
}
g_object_get (stream, "rtcp-mux", &rtcp_mux, NULL);
dtls_transport = webrtc_transceiver_get_dtls_transport (rtp_trans);
if (dtls_transport == NULL) {
GST_WARNING ("Transceiver %p has no DTLS transport", rtp_trans);
......@@ -1023,12 +1020,9 @@ _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;
gboolean rtcp_mux = FALSE;
if (rtp_trans->stopped) {
GST_TRACE_OBJECT (webrtc, "transceiver %p stopped", rtp_trans);
......@@ -1039,7 +1033,6 @@ _collate_peer_connection_states (GstWebRTCBin * webrtc)
continue;
}
g_object_get (stream, "rtcp-mux", &rtcp_mux, NULL);
transport = webrtc_transceiver_get_dtls_transport (rtp_trans);
/* get transport state */
......@@ -2137,8 +2130,6 @@ _get_or_create_data_channel_transports (GstWebRTCBin * webrtc, guint session_id)
webrtc->priv->data_channel_transport = stream;
g_object_set (stream, "rtcp-mux", TRUE, NULL);
if (!(sctp_transport = webrtc->priv->sctp_transport)) {
sctp_transport = gst_webrtc_sctp_transport_new ();
sctp_transport->transport =
......@@ -4028,7 +4019,7 @@ _update_transceiver_from_sdp_media (GstWebRTCBin * webrtc,
GstWebRTCRTPTransceiverDirection new_dir;
const GstSDPMedia *media = gst_sdp_message_get_media (sdp, media_idx);
GstWebRTCDTLSSetup new_setup;
gboolean new_rtcp_mux, new_rtcp_rsize;
gboolean new_rtcp_rsize;
ReceiveState receive_state = RECEIVE_STATE_UNSET;
int i;
......@@ -4098,8 +4089,6 @@ _update_transceiver_from_sdp_media (GstWebRTCBin * webrtc,
}
if (!bundled || bundle_idx == media_idx) {
new_rtcp_mux = _media_has_attribute_key (local_media, "rtcp-mux")
&& _media_has_attribute_key (remote_media, "rtcp-mux");
new_rtcp_rsize = _media_has_attribute_key (local_media, "rtcp-rsize")
&& _media_has_attribute_key (remote_media, "rtcp-rsize");
......@@ -4112,8 +4101,6 @@ _update_transceiver_from_sdp_media (GstWebRTCBin * webrtc,
g_object_unref (session);
}
}
g_object_set (stream, "rtcp-mux", new_rtcp_mux, NULL);
}
}
......@@ -4319,7 +4306,7 @@ _update_data_channel_from_sdp_media (GstWebRTCBin * webrtc,
/* data channel is always rtcp-muxed to avoid generating ICE candidates
* for RTCP */
g_object_set (stream, "rtcp-mux", TRUE, "dtls-client",
g_object_set (stream, "dtls-client",
new_setup == GST_WEBRTC_DTLS_SETUP_ACTIVE, NULL);
local_port = _get_sctp_port_from_media (local_media);
......
......@@ -138,35 +138,6 @@ _stop_thread (GstWebRTCICE * ice)
g_thread_unref (ice->priv->thread);
}
#if 0
static NiceComponentType
_webrtc_component_to_nice (GstWebRTCICEComponent comp)
{
switch (comp) {
case GST_WEBRTC_ICE_COMPONENT_RTP:
return NICE_COMPONENT_TYPE_RTP;
case GST_WEBRTC_ICE_COMPONENT_RTCP:
return NICE_COMPONENT_TYPE_RTCP;
default:
g_assert_not_reached ();
return 0;
}
}
static GstWebRTCICEComponent
_nice_component_to_webrtc (NiceComponentType comp)
{
switch (comp) {
case NICE_COMPONENT_TYPE_RTP:
return GST_WEBRTC_ICE_COMPONENT_RTP;
case NICE_COMPONENT_TYPE_RTCP:
return GST_WEBRTC_ICE_COMPONENT_RTCP;
default:
g_assert_not_reached ();
return 0;
}
}
#endif
struct NiceStreamItem
{
guint session_id;
......@@ -380,16 +351,6 @@ _add_turn_server (GstWebRTCICE * ice, struct NiceStreamItem *item,
g_free (uri);
break;
}
ret = nice_agent_set_relay_info (ice->priv->nice_agent,
item->nice_stream_id, NICE_COMPONENT_TYPE_RTCP,
gst_uri_get_host (turn_server), gst_uri_get_port (turn_server),
user, pass, relays[i]);
if (!ret) {
gchar *uri = gst_uri_to_string (turn_server);
GST_ERROR_OBJECT (ice, "Failed to set TURN server '%s'", uri);
g_free (uri);
break;
}
}
g_free (user);
g_free (pass);
......
......@@ -69,7 +69,6 @@ enum
{
PROP_0,
PROP_STREAM,
PROP_RTCP_MUX,
};
#define TSB_GET_LOCK(tsb) (&tsb->lock)
......
......@@ -59,7 +59,6 @@ struct _TransportSendBin
/*
struct pad_block *rtp_block;
struct pad_block *rtcp_mux_block;
struct pad_block *rtp_nice_block;
struct pad_block *rtcp_block;
......
......@@ -36,7 +36,6 @@ enum
PROP_0,
PROP_WEBRTC,
PROP_SESSION_ID,
PROP_RTCP_MUX,
PROP_DTLS_CLIENT,
};
......@@ -124,9 +123,6 @@ transport_stream_set_property (GObject * object, guint prop_id,
case PROP_SESSION_ID:
stream->session_id = g_value_get_uint (value);
break;
case PROP_RTCP_MUX:
stream->rtcp_mux = g_value_get_boolean (value);
break;
case PROP_DTLS_CLIENT:
stream->dtls_client = g_value_get_boolean (value);
break;
......@@ -148,9 +144,6 @@ transport_stream_get_property (GObject * object, guint prop_id,
case PROP_SESSION_ID:
g_value_set_uint (value, stream->session_id);
break;
case PROP_RTCP_MUX:
g_value_set_boolean (value, stream->rtcp_mux);
break;
case PROP_DTLS_CLIENT:
g_value_set_boolean (value, stream->dtls_client);
break;
......@@ -270,12 +263,6 @@ transport_stream_class_init (TransportStreamClass * klass)
0, G_MAXUINT, 0,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_RTCP_MUX,
g_param_spec_boolean ("rtcp-mux", "RTCP Mux",
"Whether RTCP packets are muxed with RTP packets",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_DTLS_CLIENT,
g_param_spec_boolean ("dtls-client", "DTLS client",
......
......@@ -52,9 +52,6 @@ struct _TransportStream
GstObject parent;
guint session_id; /* session_id */
gboolean rtcp;
gboolean rtcp_mux;
gboolean rtcp_rsize;
gboolean dtls_client;
gboolean active; /* TRUE if any mline in the bundle/transport is active */
TransportSendBin *send_bin; /* bin containing all the sending transport elements */
......
......@@ -63,7 +63,6 @@ void webrtc_transceiver_set_transport (WebRTCTransceiver *
TransportStream * stream);
GstWebRTCDTLSTransport * webrtc_transceiver_get_dtls_transport (GstWebRTCRTPTransceiver * trans);
GstWebRTCDTLSTransport * webrtc_transceiver_get_rtcp_dtls_transport (GstWebRTCRTPTransceiver * trans);
G_END_DECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment