Commit 4967b614 authored by Simon Morlat's avatar Simon Morlat
Browse files

Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone

Conflicts:
	mediastreamer2
parents 603b6fa9 7818dee6
...@@ -917,7 +917,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta ...@@ -917,7 +917,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
{ {
memset (lc, 0, sizeof (LinphoneCore)); memset (lc, 0, sizeof (LinphoneCore));
lc->data=userdata; lc->data=userdata;
lc->ringstream_autorelease=TRUE;
memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable)); memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable));
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up"); linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
...@@ -1662,7 +1663,7 @@ void linphone_core_iterate(LinphoneCore *lc){ ...@@ -1662,7 +1663,7 @@ void linphone_core_iterate(LinphoneCore *lc){
lc_callback_obj_invoke(&lc->preview_finished_cb,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){ && (curtime-lc->dmfs_playing_start_time)>5){
ring_stop(lc->ringstream); ring_stop(lc->ringstream);
lc->ringstream=NULL; lc->ringstream=NULL;
...@@ -4088,3 +4089,15 @@ void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable) { ...@@ -4088,3 +4089,15 @@ void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable) {
bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc) { bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc) {
return sal_get_keepalive_period(lc->sal) > 0; 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 ...@@ -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. * 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); 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 #ifdef __cplusplus
} }
#endif #endif
......
...@@ -435,6 +435,7 @@ struct _LinphoneCore ...@@ -435,6 +435,7 @@ struct _LinphoneCore
bool_t auto_net_state_mon; bool_t auto_net_state_mon;
bool_t network_reachable; bool_t network_reachable;
bool_t use_preview_window; bool_t use_preview_window;
bool_t ringstream_autorelease;
}; };
bool_t linphone_core_can_we_add_call(LinphoneCore *lc); bool_t linphone_core_can_we_add_call(LinphoneCore *lc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment