mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
Merge branch 'master' of git.linphone.org:linphone
This commit is contained in:
commit
0bb2646c22
5 changed files with 68 additions and 6 deletions
|
|
@ -1203,7 +1203,6 @@ static int find_crypto_index_from_tag(const SalSrtpCryptoAlgo crypto[],unsigned
|
|||
}
|
||||
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,
|
||||
|
|
@ -1263,6 +1262,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
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,
|
||||
|
|
@ -1271,7 +1271,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
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,
|
||||
|
|
@ -1351,6 +1351,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
|
|||
|
||||
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)
|
||||
|
|
@ -1387,7 +1388,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ static void rtp_config_read(LinphoneCore *lc)
|
|||
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);
|
||||
|
|
@ -635,11 +636,15 @@ static void rtp_config_read(LinphoneCore *lc)
|
|||
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){
|
||||
|
|
@ -1376,8 +1381,18 @@ const MSList * linphone_core_get_friend_list(const LinphoneCore *lc)
|
|||
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
|
||||
**/
|
||||
|
|
@ -1386,6 +1401,26 @@ int linphone_core_get_audio_jittcomp(LinphoneCore *lc)
|
|||
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.
|
||||
*
|
||||
|
|
@ -1433,6 +1468,16 @@ void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value)
|
|||
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;
|
||||
}
|
||||
|
|
@ -4474,6 +4519,8 @@ void rtp_config_uninit(LinphoneCore *lc)
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -903,10 +903,22 @@ void linphone_core_abort_authentication(LinphoneCore *lc, LinphoneAuthInfo *inf
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -369,6 +369,8 @@ typedef struct rtp_config
|
|||
int nortp_timeout;
|
||||
bool_t rtp_no_xmit_on_audio_mute;
|
||||
/* stop rtp xmit when audio muted */
|
||||
bool_t audio_adaptive_jitt_comp_enabled;
|
||||
bool_t video_adaptive_jitt_comp_enabled;
|
||||
}rtp_config_t;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b184aec8e85e094df2b9c18e0ba4bf19aa873ec9
|
||||
Subproject commit d622cd51499ad0745e519eb129ea133fa8fd168b
|
||||
Loading…
Add table
Reference in a new issue