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'],
default_options: ['tests=disabled'])
if libnice_dep.found()
libnice_version = libnice_dep.version()
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_sources, libgstwebrtcnice_headers,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WEBRTCNICE', '-DG_LOG_DOMAIN="GStreamer-webrtcnice"'] + libnice_c_args,
/* libnice */
#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
/* XXX:
{
switch (cand->type) {
case NICE_CANDIDATE_TYPE_RELAYED:{
-#if NICE_CHECK_VERSION(0, 1, 19)
NiceAddress addr;
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
nice_candidate_relay_address (cand, &addr);
nice_address_to_string (&addr, 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:{
-#if NICE_CHECK_VERSION(0, 1, 20)
NiceAddress addr;
gchar ipaddr[NICE_ADDRESS_STRING_LEN];
if (nice_candidate_stun_server_address (cand, &addr)) {
} else {
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));
}
default: