mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
This commit is contained in:
commit
6ed021b4be
5 changed files with 40 additions and 24 deletions
|
|
@ -193,21 +193,26 @@ static void call_received(SalOp *h){
|
|||
}else{
|
||||
/*TODO : play a tone within the context of the current call */
|
||||
}
|
||||
|
||||
|
||||
linphone_call_ref(call); /*prevent the call from being destroyed while we are notifying, if the user declines within the state callback */
|
||||
linphone_call_set_state(call,LinphoneCallIncomingReceived,"Incoming call");
|
||||
|
||||
sal_call_notify_ringing(h,propose_early_media || ringback_tone!=NULL);
|
||||
if (call->state==LinphoneCallIncomingReceived){
|
||||
sal_call_notify_ringing(h,propose_early_media || ringback_tone!=NULL);
|
||||
|
||||
if (propose_early_media || ringback_tone!=NULL){
|
||||
linphone_call_set_state(call,LinphoneCallIncomingEarlyMedia,"Incoming call early media");
|
||||
linphone_core_update_streams(lc,call,md);
|
||||
if (propose_early_media || ringback_tone!=NULL){
|
||||
linphone_call_set_state(call,LinphoneCallIncomingEarlyMedia,"Incoming call early media");
|
||||
linphone_core_update_streams(lc,call,md);
|
||||
}
|
||||
if (sal_call_get_replaces(call->op)!=NULL && lp_config_get_int(lc->config,"sip","auto_answer_replacing_calls",1)){
|
||||
linphone_core_accept_call(lc,call);
|
||||
}
|
||||
}
|
||||
linphone_call_unref(call);
|
||||
|
||||
ms_free(barmesg);
|
||||
ms_free(tmp);
|
||||
|
||||
|
||||
if (sal_call_get_replaces(call->op)!=NULL && lp_config_get_int(lc->config,"sip","auto_answer_replacing_calls",1)){
|
||||
linphone_core_accept_call(lc,call);
|
||||
}
|
||||
}
|
||||
|
||||
static void call_ringing(SalOp *h){
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class TutorialRegistration implements LinphoneCoreListener {
|
|||
* Registration state notification listener
|
||||
*/
|
||||
public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg,RegistrationState cstate, String smessage) {
|
||||
write(cfg.getIdentity() + " : "+smessage+"\n");
|
||||
write(cfg.getIdentity() + " : "+smessage);
|
||||
}
|
||||
|
||||
public void show(LinphoneCore lc) {}
|
||||
|
|
|
|||
|
|
@ -777,6 +777,10 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
const char *tool="linphone-" LINPHONE_VERSION;
|
||||
char *cname;
|
||||
int used_pt=-1;
|
||||
#ifdef VIDEO_ENABLED
|
||||
const SalStreamDescription *vstream=sal_media_description_find_stream(call->resultdesc,
|
||||
SalProtoRtpAvp,SalVideo);
|
||||
#endif
|
||||
|
||||
if(call->audiostream == NULL)
|
||||
{
|
||||
|
|
@ -800,6 +804,8 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
const char *playfile=lc->play_file;
|
||||
const char *recfile=lc->rec_file;
|
||||
call->audio_profile=make_profile(call,call->resultdesc,stream,&used_pt);
|
||||
bool_t use_ec;
|
||||
|
||||
if (used_pt!=-1){
|
||||
if (playcard==NULL) {
|
||||
ms_warning("No card defined for playback !");
|
||||
|
|
@ -827,6 +833,12 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
captcard=NULL;
|
||||
playcard=NULL;
|
||||
}
|
||||
use_ec=captcard==NULL ? FALSE : linphone_core_echo_cancellation_enabled(lc);
|
||||
#if defined(VIDEO_ENABLED) && defined(ANDROID)
|
||||
/*On android we have to disable the echo canceller to preserve CPU for video codecs */
|
||||
if (vstream && vstream->dir!=SalStreamInactive && vstream->payloads!=NULL)
|
||||
use_ec=FALSE;
|
||||
#endif
|
||||
audio_stream_start_full(
|
||||
call->audiostream,
|
||||
call->audio_profile,
|
||||
|
|
@ -839,7 +851,8 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
recfile,
|
||||
playcard,
|
||||
captcard,
|
||||
captcard==NULL ? FALSE : linphone_core_echo_cancellation_enabled(lc));
|
||||
use_ec
|
||||
);
|
||||
post_configure_audio_streams(call);
|
||||
if (all_inputs_muted && !send_ringbacktone){
|
||||
audio_stream_set_mic_gain(call->audiostream,0);
|
||||
|
|
@ -853,8 +866,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
}
|
||||
#ifdef VIDEO_ENABLED
|
||||
{
|
||||
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
|
||||
SalProtoRtpAvp,SalVideo);
|
||||
|
||||
used_pt=-1;
|
||||
/* shutdown preview */
|
||||
if (lc->previewstream!=NULL) {
|
||||
|
|
@ -862,9 +874,9 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
lc->previewstream=NULL;
|
||||
}
|
||||
call->current_params.has_video=FALSE;
|
||||
if (stream && stream->dir!=SalStreamInactive) {
|
||||
const char *addr=stream->addr[0]!='\0' ? stream->addr : call->resultdesc->addr;
|
||||
call->video_profile=make_profile(call,call->resultdesc,stream,&used_pt);
|
||||
if (vstream && vstream->dir!=SalStreamInactive) {
|
||||
const char *addr=vstream->addr[0]!='\0' ? vstream->addr : call->resultdesc->addr;
|
||||
call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt);
|
||||
if (used_pt!=-1){
|
||||
VideoStreamDir dir=VideoStreamSendRecv;
|
||||
MSWebCam *cam=lc->video_conf.device;
|
||||
|
|
@ -880,12 +892,12 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
video_stream_set_native_preview_window_id (call->videostream,lc->preview_window_id);
|
||||
video_stream_use_preview_video_window (call->videostream,lc->use_preview_window);
|
||||
|
||||
if (stream->dir==SalStreamSendOnly && lc->video_conf.capture ){
|
||||
if (vstream->dir==SalStreamSendOnly && lc->video_conf.capture ){
|
||||
cam=get_nowebcam_device();
|
||||
dir=VideoStreamSendOnly;
|
||||
}else if (stream->dir==SalStreamRecvOnly && lc->video_conf.display ){
|
||||
}else if (vstream->dir==SalStreamRecvOnly && lc->video_conf.display ){
|
||||
dir=VideoStreamRecvOnly;
|
||||
}else if (stream->dir==SalStreamSendRecv){
|
||||
}else if (vstream->dir==SalStreamSendRecv){
|
||||
if (lc->video_conf.display && lc->video_conf.capture)
|
||||
dir=VideoStreamSendRecv;
|
||||
else if (lc->video_conf.display)
|
||||
|
|
@ -903,8 +915,8 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
if (!is_inactive){
|
||||
video_stream_set_direction (call->videostream, dir);
|
||||
video_stream_start(call->videostream,
|
||||
call->video_profile, addr, stream->port,
|
||||
stream->port+1,
|
||||
call->video_profile, addr, vstream->port,
|
||||
vstream->port+1,
|
||||
used_pt, jitt_comp, cam);
|
||||
video_stream_set_rtcp_information(call->videostream, cname,tool);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -993,7 +993,6 @@ extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv*
|
|||
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoWindowId(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
@ -1084,7 +1083,7 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDownloadBandwidth(JNI
|
|||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setUploadBandwidth(JNIEnv *env, jobject thiz, jlong lc, jint bw){
|
||||
linphone_core_set_upload_bandwidth((LinphoneCore *)lc, (int) bw);
|
||||
|
||||
}
|
||||
extern "C" int Java_org_linphone_core_LinphoneProxyConfigImpl_getState(JNIEnv* env,jobject thiz,jlong ptr) {
|
||||
return (int) linphone_proxy_config_get_state((const LinphoneProxyConfig *) ptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit dbde0ad6f4b7a21f99d1e0e5a5ddd9bf6cfe4692
|
||||
Subproject commit 983babc1ee79425212486a9c0896e6acaf3fa5f8
|
||||
Loading…
Add table
Reference in a new issue