webrtc: nice: Remove unused libnice utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
This commit is contained in:
parent
0017384ae2
commit
aa15eb30ff
@ -605,79 +605,6 @@ gst_webrtc_nice_find_transport (GstWebRTCICE * ice, GstWebRTCICEStream * stream,
|
||||
return gst_webrtc_ice_stream_find_transport (item->stream, component);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* TODO don't rely on libnice to (de)serialize candidates */
|
||||
static NiceCandidateType
|
||||
_candidate_type_from_string (const gchar * s)
|
||||
{
|
||||
if (g_strcmp0 (s, "host") == 0) {
|
||||
return NICE_CANDIDATE_TYPE_HOST;
|
||||
} else if (g_strcmp0 (s, "srflx") == 0) {
|
||||
return NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE;
|
||||
} else if (g_strcmp0 (s, "prflx") == 0) { /* FIXME: is the right string? */
|
||||
return NICE_CANDIDATE_TYPE_PEER_REFLEXIVE;
|
||||
} else if (g_strcmp0 (s, "relay") == 0) {
|
||||
return NICE_CANDIDATE_TYPE_RELAY;
|
||||
} else {
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
_candidate_type_to_string (NiceCandidateType type)
|
||||
{
|
||||
switch (type) {
|
||||
case NICE_CANDIDATE_TYPE_HOST:
|
||||
return "host";
|
||||
case NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE:
|
||||
return "srflx";
|
||||
case NICE_CANDIDATE_TYPE_PEER_REFLEXIVE:
|
||||
return "prflx";
|
||||
case NICE_CANDIDATE_TYPE_RELAY:
|
||||
return "relay";
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static NiceCandidateTransport
|
||||
_candidate_transport_from_string (const gchar * s)
|
||||
{
|
||||
if (g_strcmp0 (s, "UDP") == 0) {
|
||||
return NICE_CANDIDATE_TRANSPORT_UDP;
|
||||
} else if (g_strcmp0 (s, "TCP tcptype") == 0) {
|
||||
return NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE;
|
||||
} else if (g_strcmp0 (s, "tcp-passive") == 0) { /* FIXME: is the right string? */
|
||||
return NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE;
|
||||
} else if (g_strcmp0 (s, "tcp-so") == 0) {
|
||||
return NICE_CANDIDATE_TRANSPORT_TCP_SO;
|
||||
} else {
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
_candidate_type_to_string (NiceCandidateType type)
|
||||
{
|
||||
switch (type) {
|
||||
case NICE_CANDIDATE_TYPE_HOST:
|
||||
return "host";
|
||||
case NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE:
|
||||
return "srflx";
|
||||
case NICE_CANDIDATE_TYPE_PEER_REFLEXIVE:
|
||||
return "prflx";
|
||||
case NICE_CANDIDATE_TYPE_RELAY:
|
||||
return "relay";
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* parse the address for possible resolution */
|
||||
static gboolean
|
||||
get_candidate_address (const gchar * candidate, gchar ** prefix,
|
||||
|
Loading…
x
Reference in New Issue
Block a user