}
static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cname, bool_t muted, bool_t send_ringbacktone, bool_t use_arc){
LinphoneCore *lc=call->core;
- int jitt_comp=lc->rtp_conf.audio_jitt_comp;
int used_pt=-1;
/* look for savp stream first */
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
if (playcard && stream->max_rate>0) ms_snd_card_set_preferred_sample_rate(playcard, stream->max_rate);
if (captcard && stream->max_rate>0) ms_snd_card_set_preferred_sample_rate(captcard, stream->max_rate);
audio_stream_enable_adaptive_bitrate_control(call->audiostream,use_arc);
+ audio_stream_enable_adaptive_jittcomp(call->audiostream, linphone_core_audio_adaptive_jittcomp_enabled(lc));
audio_stream_start_full(
call->audiostream,
call->audio_profile,
stream->rtcp_addr[0]!='\0' ? stream->rtcp_addr : call->resultdesc->addr,
linphone_core_rtcp_enabled(lc) ? (stream->rtcp_port) : 0,
used_pt,
- jitt_comp,
+ linphone_core_get_audio_jittcomp(lc),
playfile,
recfile,
playcard,
video_stream_enable_adaptive_bitrate_control(call->videostream,
linphone_core_adaptive_rate_control_enabled(lc));
+ video_stream_enable_adaptive_jittcomp(call->videostream, linphone_core_video_adaptive_jittcomp_enabled(lc));
video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
video_stream_enable_self_view(call->videostream,lc->video_conf.selfview);
if (lc->video_window_id!=0)
video_stream_start(call->videostream,
call->video_profile, rtp_addr, vstream->rtp_port,
rtcp_addr, linphone_core_rtcp_enabled(lc) ? (vstream->rtcp_port) : 0,
- used_pt, lc->rtp_conf.audio_jitt_comp, cam);
+ used_pt, linphone_core_get_video_jittcomp(lc), cam);
video_stream_set_rtcp_information(call->videostream, cname,LINPHONE_RTCP_SDES_TOOL);
}
int jitt_comp;
int nortp_timeout;
bool_t rtp_no_xmit_on_audio_mute;
+ bool_t adaptive_jitt_comp_enabled;
port=lp_config_get_int(lc->config,"rtp","audio_rtp_port",7078);
linphone_core_set_audio_port(lc,port);
linphone_core_set_audio_jittcomp(lc,jitt_comp);
jitt_comp=lp_config_get_int(lc->config,"rtp","video_jitt_comp",60);
if (jitt_comp==0) jitt_comp=60;
- lc->rtp_conf.video_jitt_comp=jitt_comp;
+ linphone_core_set_video_jittcomp(lc,jitt_comp);
nortp_timeout=lp_config_get_int(lc->config,"rtp","nortp_timeout",30);
linphone_core_set_nortp_timeout(lc,nortp_timeout);
rtp_no_xmit_on_audio_mute=lp_config_get_int(lc->config,"rtp","rtp_no_xmit_on_audio_mute",FALSE);
linphone_core_set_rtp_no_xmit_on_audio_mute(lc,rtp_no_xmit_on_audio_mute);
+ adaptive_jitt_comp_enabled = lp_config_get_int(lc->config, "rtp", "audio_adaptive_jitt_comp_enabled", TRUE);
+ linphone_core_enable_audio_adaptive_jittcomp(lc, adaptive_jitt_comp_enabled);
+ adaptive_jitt_comp_enabled = lp_config_get_int(lc->config, "rtp", "video_adaptive_jitt_comp_enabled", TRUE);
+ linphone_core_enable_video_adaptive_jittcomp(lc, adaptive_jitt_comp_enabled);
}
static PayloadType * find_payload(RtpProfile *prof, const char *mime_type, int clock_rate, const char *recv_fmtp){
return lc->friends;
}
+void linphone_core_enable_audio_adaptive_jittcomp(LinphoneCore* lc, bool_t val)
+{
+ lc->rtp_conf.audio_adaptive_jitt_comp_enabled = val;
+}
+
+bool_t linphone_core_audio_adaptive_jittcomp_enabled(LinphoneCore* lc)
+{
+ return lc->rtp_conf.audio_adaptive_jitt_comp_enabled;
+}
+
/**
- * Returns the nominal jitter buffer size in milliseconds.
+ * Returns the nominal audio jitter buffer size in milliseconds.
*
* @ingroup media_parameters
**/
return lc->rtp_conf.audio_jitt_comp;
}
+void linphone_core_enable_video_adaptive_jittcomp(LinphoneCore* lc, bool_t val)
+{
+ lc->rtp_conf.video_adaptive_jitt_comp_enabled = val;
+}
+
+bool_t linphone_core_video_adaptive_jittcomp_enabled(LinphoneCore* lc)
+{
+ return lc->rtp_conf.video_adaptive_jitt_comp_enabled;
+}
+
+/**
+ * Returns the nominal video jitter buffer size in milliseconds.
+ *
+ * @ingroup media_parameters
+**/
+int linphone_core_get_video_jittcomp(LinphoneCore *lc)
+{
+ return lc->rtp_conf.video_jitt_comp;
+}
+
/**
* Returns the UDP port used for audio streaming.
*
lc->rtp_conf.audio_jitt_comp=value;
}
+/**
+ * Sets the nominal video jitter buffer size in milliseconds.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_video_jittcomp(LinphoneCore *lc, int value)
+{
+ lc->rtp_conf.video_jitt_comp=value;
+}
+
void linphone_core_set_rtp_no_xmit_on_audio_mute(LinphoneCore *lc,bool_t rtp_no_xmit_on_audio_mute){
lc->rtp_conf.rtp_no_xmit_on_audio_mute=rtp_no_xmit_on_audio_mute;
}
lp_config_set_int(lc->config,"rtp","audio_jitt_comp",config->audio_jitt_comp);
lp_config_set_int(lc->config,"rtp","video_jitt_comp",config->video_jitt_comp);
lp_config_set_int(lc->config,"rtp","nortp_timeout",config->nortp_timeout);
+ lp_config_set_int(lc->config,"rtp","audio_jitt_comp_enabled",config->audio_adaptive_jitt_comp_enabled);
+ lp_config_set_int(lc->config,"rtp","video_jitt_comp_enabled",config->video_adaptive_jitt_comp_enabled);
}
void sound_config_uninit(LinphoneCore *lc)
void linphone_core_clear_all_auth_info(LinphoneCore *lc);
+void linphone_core_enable_audio_adaptive_jittcomp(LinphoneCore *lc, bool_t enable);
+
+bool_t linphone_core_audio_adaptive_jittcomp_enabled(LinphoneCore *lc);
+
int linphone_core_get_audio_jittcomp(LinphoneCore *lc);
void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value);
+void linphone_core_enable_video_adaptive_jittcomp(LinphoneCore *lc, bool_t enable);
+
+bool_t linphone_core_video_adaptive_jittcomp_enabled(LinphoneCore *lc);
+
+int linphone_core_get_video_jittcomp(LinphoneCore *lc);
+
+void linphone_core_set_video_jittcomp(LinphoneCore *lc, int value);
+
int linphone_core_get_audio_port(const LinphoneCore *lc);
int linphone_core_get_video_port(const LinphoneCore *lc);