mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 15:18:11 +00:00
add spcial apis for IOS to manage special dtmf ringer
This commit is contained in:
parent
9901e230db
commit
827da0b49d
3 changed files with 28 additions and 2 deletions
|
|
@ -917,7 +917,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
|
|||
{
|
||||
memset (lc, 0, sizeof (LinphoneCore));
|
||||
lc->data=userdata;
|
||||
|
||||
lc->ringstream_autorelease=TRUE;
|
||||
|
||||
memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable));
|
||||
|
||||
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
|
||||
|
|
@ -1662,7 +1663,7 @@ void linphone_core_iterate(LinphoneCore *lc){
|
|||
lc_callback_obj_invoke(&lc->preview_finished_cb,lc);
|
||||
}
|
||||
|
||||
if (lc->ringstream && lc->dmfs_playing_start_time!=0
|
||||
if (lc->ringstream && lc->ringstream_autorelease && lc->dmfs_playing_start_time!=0
|
||||
&& (curtime-lc->dmfs_playing_start_time)>5){
|
||||
ring_stop(lc->ringstream);
|
||||
lc->ringstream=NULL;
|
||||
|
|
@ -4088,3 +4089,15 @@ void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable) {
|
|||
bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc) {
|
||||
return sal_get_keepalive_period(lc->sal) > 0;
|
||||
}
|
||||
|
||||
void linphone_core_start_dtmf_stream(LinphoneCore* lc) {
|
||||
get_dtmf_gen(lc); /*make sure ring stream is started*/
|
||||
lc->ringstream_autorelease=FALSE; /*disable autorelease mode*/
|
||||
}
|
||||
|
||||
void linphone_core_stop_dtmf_stream(LinphoneCore* lc) {
|
||||
if (lc->ringstream) ring_stop(lc->ringstream);
|
||||
lc->ringstream=NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ typedef void (*LinphoneEcCalibrationCallback)(LinphoneCore *lc, LinphoneEcCalibr
|
|||
* Start an echo calibration of the sound devices, in order to find adequate settings for the echo canceller automatically.
|
||||
**/
|
||||
int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data);
|
||||
#if TARGET_OS_IPHONE
|
||||
/**
|
||||
* IOS special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must be called before entering BG mode
|
||||
*/
|
||||
void linphone_core_start_dtmf_stream(const LinphoneCore* lc);
|
||||
/**
|
||||
* IOS special function to stop dtmf feed back function. Must be called before entering BG mode
|
||||
*/
|
||||
void linphone_core_stop_dtmf_stream(const LinphoneCore* lc);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ struct _LinphoneCore
|
|||
bool_t auto_net_state_mon;
|
||||
bool_t network_reachable;
|
||||
bool_t use_preview_window;
|
||||
bool_t ringstream_autorelease;
|
||||
};
|
||||
|
||||
bool_t linphone_core_can_we_add_call(LinphoneCore *lc);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue