Commit 9a8ee6dd authored by Simon Morlat's avatar Simon Morlat

update for new ortp logging api

parent fbc08fa1
......@@ -17,7 +17,7 @@ if test "$LINPHONE_EXTRA_VERSION" != "" ;then
LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
fi
LIBLINPHONE_SO_CURRENT=8 dnl increment this number when you add/change/remove an interface
LIBLINPHONE_SO_CURRENT=9 dnl increment this number when you add/change/remove an interface
LIBLINPHONE_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
LIBLINPHONE_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
......
......@@ -82,8 +82,8 @@ void _belle_sip_log(belle_sip_log_level lev, const char *fmt, va_list args) {
ortp_level=ORTP_DEBUG;
break;
}
if (ortp_log_level_enabled(ortp_level)){
ortp_logv(ortp_level,fmt,args);
if (ortp_log_level_enabled("belle-sip", ortp_level)){
ortp_logv("belle-sip", ortp_level,fmt,args);
}
}
......
......@@ -289,7 +289,7 @@ static void tunnelLogHandler(int level, const char *fmt, va_list l){
ms_fatal("Unexepcted tunnel log %i: %s",level,fmt);
break;
}
tunnelOrtpLogHandler(ortp_level,fmt,l);
tunnelOrtpLogHandler("tunnel", ortp_level,fmt,l);
}
}
......@@ -330,8 +330,8 @@ bool_t linphone_tunnel_sip_enabled(const LinphoneTunnel *tunnel) {
return bcTunnel(tunnel)->tunnelizeSipPacketsEnabled() ? TRUE : FALSE;
}
static void my_ortp_logv(OrtpLogLevel level, const char *fmt, va_list args){
ortp_logv(level,fmt,args);
static void my_ortp_logv(const char *domain, OrtpLogLevel level, const char *fmt, va_list args){
ortp_logv(domain, level,fmt,args);
}
......
......@@ -527,22 +527,19 @@ static void setup_rtcp_fb(LinphoneCall *call, SalMediaDescription *md) {
if (!sal_stream_description_active(&md->streams[i])) continue;
md->streams[i].rtcp_fb.generic_nack_enabled = lp_config_get_int(lc->config, "rtp", "rtcp_fb_generic_nack_enabled", 0);
md->streams[i].rtcp_fb.tmmbr_enabled = lp_config_get_int(lc->config, "rtp", "rtcp_fb_tmmbr_enabled", 0);
md->streams[i].implicit_rtcp_fb = call->params->implicit_rtcp_fb;
for (pt_it = md->streams[i].payloads; pt_it != NULL; pt_it = pt_it->next) {
md->streams[i].implicit_rtcp_fb = call->params->implicit_rtcp_fb;
for (pt_it = md->streams[i].payloads; pt_it != NULL; pt_it = pt_it->next) {
pt = (PayloadType *)pt_it->data;
if (call->params->avpf_enabled == FALSE && call->params->implicit_rtcp_fb == FALSE) {
payload_type_unset_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
memset(&avpf_params, 0, sizeof(avpf_params));
}
else {
payload_type_set_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
avpf_params = payload_type_get_avpf_params(pt);
avpf_params.trr_interval = call->params->avpf_rr_interval;
}
if (call->params->avpf_enabled == FALSE && call->params->implicit_rtcp_fb == FALSE) {
payload_type_unset_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
memset(&avpf_params, 0, sizeof(avpf_params));
}else {
payload_type_set_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
avpf_params = payload_type_get_avpf_params(pt);
avpf_params.trr_interval = call->params->avpf_rr_interval;
}
payload_type_set_avpf_params(pt, avpf_params);
}
}
......
......@@ -163,7 +163,7 @@ const LinphoneAddress *linphone_core_get_current_call_remote_address(struct _Lin
return linphone_call_get_remote_address(call);
}
static void linphone_core_log_collection_handler(OrtpLogLevel level, const char *fmt, va_list args);
static void linphone_core_log_collection_handler(const char *domain, OrtpLogLevel level, const char *fmt, va_list args);
void linphone_core_set_log_handler(OrtpLogFunc logfunc) {
if (ortp_logv_out == linphone_core_log_collection_handler) {
......@@ -200,7 +200,7 @@ void linphone_core_set_log_level(OrtpLogLevel loglevel) {
}
void linphone_core_set_log_level_mask(OrtpLogLevel loglevel) {
ortp_set_log_level_mask(loglevel);
ortp_set_log_level_mask(NULL, loglevel);
if (loglevel == 0) {
sal_disable_log();
} else {
......@@ -263,7 +263,7 @@ static void _close_log_collection_file(void) {
}
}
static void linphone_core_log_collection_handler(OrtpLogLevel level, const char *fmt, va_list args) {
static void linphone_core_log_collection_handler(const char *domain, OrtpLogLevel level, const char *fmt, va_list args) {
const char *lname="undef";
char *msg;
struct timeval tp;
......@@ -275,12 +275,12 @@ static void linphone_core_log_collection_handler(OrtpLogLevel level, const char
#ifndef _WIN32
va_list args_copy;
va_copy(args_copy, args);
liblinphone_log_func(level, fmt, args_copy);
liblinphone_log_func(domain, level, fmt, args_copy);
va_end(args_copy);
#else
/* This works on 32 bits, luckily. */
/* TODO: va_copy is available in Visual Studio 2013. */
liblinphone_log_func(level, fmt, args);
liblinphone_log_func(domain, level, fmt, args);
#endif
}
......
......@@ -189,7 +189,7 @@ void linphone_upnp_igd_print(void *cookie, upnp_igd_print_level level, const cha
default:
break;
}
ortp_logv(ortp_level, fmt, list);
ortp_logv(ORTP_LOG_DOMAIN, ortp_level, fmt, list);
}
void linphone_upnp_igd_callback(void *cookie, upnp_igd_event event, void *arg) {
......
......@@ -1888,7 +1888,7 @@ static void linphone_gtk_init_main_window(void){
#endif
}
void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
void linphone_gtk_log_handler(const char*domain, OrtpLogLevel lev, const char *fmt, va_list args){
if (verbose){
const char *lname="undef";
char *msg;
......@@ -2199,6 +2199,8 @@ core_start:
linphone_gtk_create_log_window();
linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
/*it is possible to filter in or out some logs by configuring per log domain:*/
/*ortp_set_log_level_mask("belle-sip", ORTP_ERROR);*/
chat_messages_db_file=linphone_gtk_message_storage_get_db_file(NULL);
call_logs_db_file = linphone_gtk_call_logs_storage_get_db_file(NULL);
......
mediastreamer2 @ 2e78b351
Subproject commit d948afeba99b3203d5dfeb967a9b7950d3be91f8
Subproject commit 2e78b3514324ae6311f437926e5ff2fc2da09344
oRTP @ 0c8d9dda
Subproject commit d51e5aa8c24a8dd9e3a7bd9995a9f6fb070bda06
Subproject commit 0c8d9ddaea8c1afdc0e9b8c37a31c9d158e57efd
......@@ -73,7 +73,7 @@ void liblinphone_android_log_handler(int prio, const char *fmt, va_list args) {
}
}
static void liblinphone_android_ortp_log_handler(OrtpLogLevel lev, const char *fmt, va_list args) {
static void liblinphone_android_ortp_log_handler(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) {
int prio;
switch(lev){
case ORTP_DEBUG: prio = ANDROID_LOG_DEBUG; break;
......@@ -151,7 +151,7 @@ static void log_handler(int lev, const char *fmt, va_list args) {
va_end(cap);
#endif
if (log_file){
ortp_logv_out(lev, fmt, args);
ortp_logv_out(ORTP_LOG_DOMAIN, lev, fmt, args);
}
}
......
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