FS-9581: [windows] DEBUG_ESTIMATORS symbol conflict in windows

This commit is contained in:
Mike Jerris 2016-10-05 11:08:45 -04:00
parent 0d56945f71
commit 7d6c66ad48
1 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@
//#define DEBUG_MISSED_SEQ //#define DEBUG_MISSED_SEQ
//#define DEBUG_EXTRA //#define DEBUG_EXTRA
//#define DEBUG_RTCP //#define DEBUG_RTCP
#define DEBUG_ESTIMATORS #define DEBUG_ESTIMATORS_
#include <switch.h> #include <switch.h>
#ifndef _MSC_VER #ifndef _MSC_VER
@ -6068,7 +6068,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
if (rtp_session->flags[SWITCH_RTP_FLAG_ADJ_BITRATE_CAP] && rtp_session->flags[SWITCH_RTP_FLAG_ESTIMATORS] && !rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) { if (rtp_session->flags[SWITCH_RTP_FLAG_ADJ_BITRATE_CAP] && rtp_session->flags[SWITCH_RTP_FLAG_ESTIMATORS] && !rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
/* SWITCH_RTP_FLAG_ADJ_BITRATE_CAP : Can the codec change its bitrate on the fly per API command ? */ /* SWITCH_RTP_FLAG_ADJ_BITRATE_CAP : Can the codec change its bitrate on the fly per API command ? */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "Current packet loss: [%d %%] Current RTT: [%f ms]\n", percent_fraction, rtt_now); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "Current packet loss: [%d %%] Current RTT: [%f ms]\n", percent_fraction, rtt_now);
#endif #endif
@ -6076,7 +6076,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
if (switch_kalman_cusum_detect_change(rtp_session->detectors[EST_RTT], rtt_now, rtp_session->estimators[EST_RTT]->val_estimate_last)) { if (switch_kalman_cusum_detect_change(rtp_session->detectors[EST_RTT], rtt_now, rtp_session->estimators[EST_RTT]->val_estimate_last)) {
/* sudden change in the mean value of RTT */ /* sudden change in the mean value of RTT */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of RTT !\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of RTT !\n");
#endif #endif
rtt_increase = 1; rtt_increase = 1;
@ -6086,12 +6086,12 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
if (switch_kalman_cusum_detect_change(rtp_session->detectors[EST_LOSS], percent_fraction, rtp_session->estimators[EST_LOSS]->val_estimate_last)){ if (switch_kalman_cusum_detect_change(rtp_session->detectors[EST_LOSS], percent_fraction, rtp_session->estimators[EST_LOSS]->val_estimate_last)){
/* sudden change in the mean value of packet loss */ /* sudden change in the mean value of packet loss */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of packet loss!\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of packet loss!\n");
#endif #endif
packet_loss_increase = 1; packet_loss_increase = 1;
} }
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "ESTIMATORS: Packet loss will be: [%f] RTT will be: [%f ms]\n", switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "ESTIMATORS: Packet loss will be: [%f] RTT will be: [%f ms]\n",
rtp_session->estimators[EST_LOSS]->val_estimate_last, rtp_session->estimators[EST_RTT]->val_estimate_last); rtp_session->estimators[EST_LOSS]->val_estimate_last, rtp_session->estimators[EST_RTT]->val_estimate_last);
#endif #endif
@ -6101,7 +6101,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
if (switch_kalman_is_slow_link(rtp_session->estimators[EST_LOSS], if (switch_kalman_is_slow_link(rtp_session->estimators[EST_LOSS],
rtp_session->estimators[EST_RTT])) { rtp_session->estimators[EST_RTT])) {
/* going to minimum bitrate */ /* going to minimum bitrate */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "Slow link conditions: Loss average: [%d %%], Previous loss: [%d %%]. \ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "Slow link conditions: Loss average: [%d %%], Previous loss: [%d %%]. \
Going to minimum bitrate!",rtp_session->rtcp_frame.reports[i].loss_avg, old_avg); Going to minimum bitrate!",rtp_session->rtcp_frame.reports[i].loss_avg, old_avg);
#endif #endif
@ -6115,7 +6115,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
SWITCH_IO_WRITE, SCC_AUDIO_ADJUST_BITRATE, SWITCH_IO_WRITE, SCC_AUDIO_ADJUST_BITRATE,
SCCT_STRING, "decrease", SCCT_STRING, "decrease",
SCCT_NONE, NULL, NULL, NULL); SCCT_NONE, NULL, NULL, NULL);
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of packet loss percentage !\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"Sudden change in the mean value of packet loss percentage !\n");
#endif #endif
switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO, switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO,
@ -6125,7 +6125,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
} else if (!rtt_increase && rtp_session->estimators[EST_LOSS]->val_estimate_last >= rtp_session->rtcp_frame.reports[i].loss_avg ) { } else if (!rtt_increase && rtp_session->estimators[EST_LOSS]->val_estimate_last >= rtp_session->rtcp_frame.reports[i].loss_avg ) {
/* lossy because of congestion (queues full somewhere -> some packets are dropped , but RTT is good ), packet loss with many small gaps */ /* lossy because of congestion (queues full somewhere -> some packets are dropped , but RTT is good ), packet loss with many small gaps */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "packet loss, but RTT is not bad\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "packet loss, but RTT is not bad\n");
#endif #endif
switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO, switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO,
@ -6134,7 +6134,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
SCCT_NONE, NULL, NULL, NULL); SCCT_NONE, NULL, NULL, NULL);
} else if ((rtp_session->estimators[EST_LOSS]->val_estimate_last < 1) && packet_loss_increase) { } else if ((rtp_session->estimators[EST_LOSS]->val_estimate_last < 1) && packet_loss_increase) {
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "small packet loss average\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3, "small packet loss average\n");
#endif #endif
/*small loss_avg*/ /*small loss_avg*/
@ -6164,7 +6164,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t
} else { } else {
/* *do nothing about bitrate, just pass the packet loss to the codec */ /* *do nothing about bitrate, just pass the packet loss to the codec */
#ifdef DEBUG_ESTIMATORS #ifdef DEBUG_ESTIMATORS_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"do nothing about bitrate, just pass the packet loss to the codec\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,"do nothing about bitrate, just pass the packet loss to the codec\n");
#endif #endif
switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO, switch_core_media_codec_control(rtp_session->session, SWITCH_MEDIA_TYPE_AUDIO,