forked from mirrors/linphone-iphone
add new api to detect replacing call
This commit is contained in:
parent
6fdd6a3ef0
commit
45d559cb4f
6 changed files with 24 additions and 5 deletions
|
|
@ -473,6 +473,20 @@ int linphone_call_get_duration(const LinphoneCall *call){
|
|||
return time(NULL)-call->media_start_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the call object this call is replacing, if any.
|
||||
* Call replacement can occur during call transfers.
|
||||
* By default, the core automatically terminates the replaced call and accept the new one.
|
||||
* This function allows the application to know whether a new incoming call is a one that replaces another one.
|
||||
**/
|
||||
LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call){
|
||||
SalOp *op=sal_call_get_replaces(call->op);
|
||||
if (op){
|
||||
return (LinphoneCall*)sal_op_get_user_pointer(op);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether camera input should be sent to remote end.
|
||||
**/
|
||||
|
|
@ -505,21 +519,21 @@ int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns TRUE if camera pictures are sent to the remote party.
|
||||
**/
|
||||
bool_t linphone_call_camera_enabled (const LinphoneCall *call){
|
||||
return call->camera_active;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enable video stream.
|
||||
**/
|
||||
void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled){
|
||||
cp->has_video=enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns whether video is enabled.
|
||||
**/
|
||||
bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp){
|
||||
return cp->has_video;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val);
|
|||
#define LOCAL_RING "rings/oldphone.wav"
|
||||
/* same for remote ring (ringback)*/
|
||||
#define REMOTE_RING "ringback.wav"
|
||||
#define HOLD_MUSIC "rings/toy-mono.wav"
|
||||
|
||||
|
||||
extern SalCallbacks linphone_sal_callbacks;
|
||||
|
||||
|
|
@ -452,6 +454,8 @@ static void sound_config_read(LinphoneCore *lc)
|
|||
tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
|
||||
}
|
||||
linphone_core_set_ringback(lc,tmpbuf);
|
||||
|
||||
linphone_core_set_play_file(lc,lp_config_get_string(lc->config,"sound","hold_music",PACKAGE_SOUND_DIR "/" HOLD_MUSIC));
|
||||
check_sound_device(lc);
|
||||
lc->sound_conf.latency=0;
|
||||
|
||||
|
|
@ -3696,7 +3700,7 @@ void sip_config_uninit(LinphoneCore *lc)
|
|||
linphone_proxy_config_write_to_config_file(lc->config,NULL,i);
|
||||
|
||||
for (i=0;i<20;i++){
|
||||
linphone_core_iterate(lc);
|
||||
sal_iterate(lc->sal);
|
||||
#ifndef WIN32
|
||||
usleep(100000);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ void linphone_call_unref(LinphoneCall *call);
|
|||
LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call);
|
||||
const char *linphone_call_get_refer_to(const LinphoneCall *call);
|
||||
bool_t linphone_call_has_transfer_pending(const LinphoneCall *call);
|
||||
LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
|
||||
int linphone_call_get_duration(const LinphoneCall *call);
|
||||
const LinphoneCallParams * linphone_call_get_current_params(const LinphoneCall *call);
|
||||
void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ LINPHONE_RINGS=rings/orig.wav \
|
|||
rings/oldphone-mono-30s.caf \
|
||||
rings/rock.wav \
|
||||
rings/bigben.wav \
|
||||
rings/toy.wav \
|
||||
rings/toy-mono.wav \
|
||||
rings/sweet.wav \
|
||||
rings/synth.wav \
|
||||
rings/tapping.wav
|
||||
|
|
|
|||
BIN
share/rings/toy-mono.wav
Normal file
BIN
share/rings/toy-mono.wav
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue