mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
webrtc: Change requirement to libnice 0.1.20
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3676>
This commit is contained in:
parent
5f2989d5a1
commit
069eeeb5c3
3 changed files with 2 additions and 45 deletions
|
@ -13,7 +13,7 @@ libgstwebrtcnice_headers = files([
|
||||||
|
|
||||||
libgstwebrtcnice_dep = dependency('', required : false)
|
libgstwebrtcnice_dep = dependency('', required : false)
|
||||||
|
|
||||||
libnice_dep = dependency('nice', version : '>=0.1.17', required : get_option('webrtc'),
|
libnice_dep = dependency('nice', version : '>=0.1.20', required : get_option('webrtc'),
|
||||||
fallback : ['libnice', 'libnice_dep'],
|
fallback : ['libnice', 'libnice_dep'],
|
||||||
default_options: ['tests=disabled'])
|
default_options: ['tests=disabled'])
|
||||||
|
|
||||||
|
@ -22,21 +22,6 @@ deps = [gstwebrtc_dep, libnice_dep]
|
||||||
if libnice_dep.found()
|
if libnice_dep.found()
|
||||||
libnice_version = libnice_dep.version()
|
libnice_version = libnice_dep.version()
|
||||||
libnice_c_args = []
|
libnice_c_args = []
|
||||||
if libnice_version.version_compare('<0.1.20') or libnice_version.version_compare('<0.1.19.1')
|
|
||||||
version_arr = libnice_version.split('.')
|
|
||||||
libnice_version_major = version_arr[0]
|
|
||||||
libnice_version_minor = version_arr[1]
|
|
||||||
libnice_version_micro = version_arr[2]
|
|
||||||
if version_arr.length() == 4
|
|
||||||
libnice_version_nano = version_arr[3]
|
|
||||||
else
|
|
||||||
libnice_version_nano = '0'
|
|
||||||
endif
|
|
||||||
libnice_c_args = ['-DNICE_VERSION_MAJOR=' + libnice_version_major,
|
|
||||||
'-DNICE_VERSION_MINOR=' + libnice_version_minor,
|
|
||||||
'-DNICE_VERSION_MICRO=' + libnice_version_micro,
|
|
||||||
'-DNICE_VERSION_NANO=' + libnice_version_nano ]
|
|
||||||
endif
|
|
||||||
libgstwebrtcnice = library('gstwebrtcnice-' + api_version,
|
libgstwebrtcnice = library('gstwebrtcnice-' + api_version,
|
||||||
libgstwebrtcnice_sources, libgstwebrtcnice_headers,
|
libgstwebrtcnice_sources, libgstwebrtcnice_headers,
|
||||||
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WEBRTCNICE', '-DG_LOG_DOMAIN="GStreamer-webrtcnice"'] + libnice_c_args,
|
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WEBRTCNICE', '-DG_LOG_DOMAIN="GStreamer-webrtcnice"'] + libnice_c_args,
|
||||||
|
|
|
@ -26,14 +26,6 @@
|
||||||
/* libnice */
|
/* libnice */
|
||||||
#include <agent.h>
|
#include <agent.h>
|
||||||
|
|
||||||
#ifndef NICE_CHECK_VERSION
|
|
||||||
#define NICE_CHECK_VERSION(major,minor,micro) \
|
|
||||||
(NICE_VERSION_MAJOR > (major) || \
|
|
||||||
(NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR > (minor)) || \
|
|
||||||
(NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR == (minor) && \
|
|
||||||
NICE_VERSION_MICRO >= (micro)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HTTP_PROXY_PORT_DEFAULT 3128
|
#define HTTP_PROXY_PORT_DEFAULT 3128
|
||||||
|
|
||||||
/* XXX:
|
/* XXX:
|
||||||
|
@ -1122,24 +1114,13 @@ _get_server_url (GstWebRTCNice * ice, NiceCandidate * cand)
|
||||||
{
|
{
|
||||||
switch (cand->type) {
|
switch (cand->type) {
|
||||||
case NICE_CANDIDATE_TYPE_RELAYED:{
|
case NICE_CANDIDATE_TYPE_RELAYED:{
|
||||||
#if NICE_CHECK_VERSION(0, 1, 19)
|
|
||||||
NiceAddress addr;
|
NiceAddress addr;
|
||||||
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
|
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
|
||||||
nice_candidate_relay_address (cand, &addr);
|
nice_candidate_relay_address (cand, &addr);
|
||||||
nice_address_to_string (&addr, ipaddr);
|
nice_address_to_string (&addr, ipaddr);
|
||||||
return g_strdup (ipaddr);
|
return g_strdup (ipaddr);
|
||||||
#else
|
|
||||||
static gboolean warned = FALSE;
|
|
||||||
if (!warned) {
|
|
||||||
GST_WARNING
|
|
||||||
("libnice version < 0.1.19 detected, relayed candidate server address might be wrong.");
|
|
||||||
warned = TRUE;
|
|
||||||
}
|
|
||||||
return g_strdup (gst_uri_get_host (ice->priv->turn_server));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
case NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE:{
|
case NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE:{
|
||||||
#if NICE_CHECK_VERSION(0, 1, 20)
|
|
||||||
NiceAddress addr;
|
NiceAddress addr;
|
||||||
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
|
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
|
||||||
if (nice_candidate_stun_server_address (cand, &addr)) {
|
if (nice_candidate_stun_server_address (cand, &addr)) {
|
||||||
|
@ -1148,15 +1129,6 @@ _get_server_url (GstWebRTCNice * ice, NiceCandidate * cand)
|
||||||
} else {
|
} else {
|
||||||
return g_strdup (gst_uri_get_host (ice->priv->stun_server));
|
return g_strdup (gst_uri_get_host (ice->priv->stun_server));
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static gboolean warned = FALSE;
|
|
||||||
if (!warned) {
|
|
||||||
GST_WARNING
|
|
||||||
("libnice version < 0.1.20 detected, server-reflexive candidate server "
|
|
||||||
"address might be wrong.");
|
|
||||||
warned = TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return g_strdup (gst_uri_get_host (ice->priv->stun_server));
|
return g_strdup (gst_uri_get_host (ice->priv->stun_server));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=libnice
|
directory=libnice
|
||||||
url=https://gitlab.freedesktop.org/libnice/libnice.git
|
url=https://gitlab.freedesktop.org/libnice/libnice.git
|
||||||
revision=0.1.19
|
revision=0.1.21
|
||||||
|
|
Loading…
Reference in a new issue