From 448f6a7108e0ef9cb498fa225e18ac6fc5a53bbb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 16 Sep 2015 22:31:44 +0200 Subject: [PATCH] disable jitter buffer by default for rtp local IO. --- coreapi/linphonecall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 9b9b0a824..741f59b82 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2561,6 +2561,7 @@ static RtpSession * create_audio_rtp_io_session(LinphoneCall *call) { int ptnum = lp_config_get_int(lc->config, "sound", "rtp_ptnum", 0); const char *rtpmap = lp_config_get_string(lc->config, "sound", "rtp_map", "pcmu/8000/1"); int symmetric = lp_config_get_int(lc->config, "sound", "rtp_symmetric", 0); + int jittcomp = lp_config_get_int(lc->config, "sound", "rtp_jittcomp", 0); /* 0 means no jitter buffer*/ RtpSession *rtp_session = NULL; pt = rtp_profile_get_payload_from_rtpmap(call->audio_profile, rtpmap); if (pt != NULL) { @@ -2571,7 +2572,8 @@ static RtpSession * create_audio_rtp_io_session(LinphoneCall *call) { rtp_session_set_remote_addr_and_port(rtp_session, remote_ip, remote_port, -1); rtp_session_enable_rtcp(rtp_session, FALSE); rtp_session_set_payload_type(rtp_session, ptnum); - rtp_session_set_jitter_compensation(rtp_session, linphone_core_get_audio_jittcomp(lc)); + rtp_session_set_jitter_compensation(rtp_session, jittcomp); + rtp_session_enable_jitter_buffer(rtp_session, jittcomp>0); rtp_session_set_symmetric_rtp(rtp_session, (bool_t)symmetric); } return rtp_session; @@ -2748,6 +2750,7 @@ static RtpSession * create_video_rtp_io_session(LinphoneCall *call) { int ptnum = lp_config_get_int(lc->config, "video", "rtp_ptnum", 0); const char *rtpmap = lp_config_get_string(lc->config, "video", "rtp_map", "vp8/90000/1"); int symmetric = lp_config_get_int(lc->config, "video", "rtp_symmetric", 0); + int jittcomp = lp_config_get_int(lc->config, "video", "rtp_jittcomp", 0); /* 0 means no jitter buffer*/ RtpSession *rtp_session = NULL; pt = rtp_profile_get_payload_from_rtpmap(call->video_profile, rtpmap); if (pt != NULL) { @@ -2759,6 +2762,8 @@ static RtpSession * create_video_rtp_io_session(LinphoneCall *call) { rtp_session_enable_rtcp(rtp_session, FALSE); rtp_session_set_payload_type(rtp_session, ptnum); rtp_session_set_symmetric_rtp(rtp_session, (bool_t)symmetric); + rtp_session_set_jitter_compensation(rtp_session, jittcomp); + rtp_session_enable_jitter_buffer(rtp_session, jittcomp>0); } return rtp_session; }