mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 15:18:11 +00:00
bugfixing in lsd.
This commit is contained in:
parent
7fa19445c2
commit
9bd55d0b34
8 changed files with 38 additions and 1210 deletions
|
|
@ -249,8 +249,10 @@ static void call_terminated(SalOp *op, const char *from){
|
|||
lc->ringstream=NULL;
|
||||
}
|
||||
linphone_core_stop_media_streams(lc,lc->call);
|
||||
lc->vtable.show(lc);
|
||||
lc->vtable.display_status(lc,_("Call terminated."));
|
||||
if (lc->vtable.show!=NULL)
|
||||
lc->vtable.show(lc);
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("Call terminated."));
|
||||
gstate_new_state(lc, GSTATE_CALL_END, NULL);
|
||||
if (lc->vtable.bye_recv!=NULL){
|
||||
LinphoneAddress *addr=linphone_address_new(from);
|
||||
|
|
|
|||
1189
coreapi/exevents.c
1189
coreapi/exevents.c
File diff suppressed because it is too large
Load diff
|
|
@ -313,7 +313,8 @@ void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call){
|
|||
info=ortp_strdup_printf(ngettext("You have missed %i call.",
|
||||
"You have missed %i calls.", lc->missed_calls),
|
||||
lc->missed_calls);
|
||||
lc->vtable.display_status(lc,info);
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,info);
|
||||
ms_free(info);
|
||||
}
|
||||
else calllog->status=LinphoneCallAborted;
|
||||
|
|
@ -1479,14 +1480,14 @@ void linphone_core_set_user_agent(const char *name, const char *ver){
|
|||
*
|
||||
* @ingroup network_parameters
|
||||
**/
|
||||
void linphone_core_set_sip_port(LinphoneCore *lc,int port)
|
||||
int linphone_core_set_sip_port(LinphoneCore *lc,int port)
|
||||
{
|
||||
const char *anyaddr;
|
||||
int err=0;
|
||||
if (port==lc->sip_conf.sip_port) return;
|
||||
if (port==lc->sip_conf.sip_port) return 0;
|
||||
lc->sip_conf.sip_port=port;
|
||||
|
||||
if (lc->sal==NULL) return;
|
||||
if (lc->sal==NULL) return -1;
|
||||
|
||||
if (lc->sip_conf.ipv6_enabled)
|
||||
anyaddr="::0";
|
||||
|
|
@ -1496,11 +1497,13 @@ void linphone_core_set_sip_port(LinphoneCore *lc,int port)
|
|||
if (err<0){
|
||||
char *msg=ortp_strdup_printf("UDP port %i seems already in use ! Cannot initialize.",port);
|
||||
ms_warning(msg);
|
||||
lc->vtable.display_warning(lc,msg);
|
||||
if (lc->vtable.display_warning)
|
||||
lc->vtable.display_warning(lc,msg);
|
||||
ms_free(msg);
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
apply_user_agent(lc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1541,7 +1544,8 @@ static void display_bandwidth(RtpSession *as, RtpSession *vs){
|
|||
}
|
||||
|
||||
static void linphone_core_disconnected(LinphoneCore *lc){
|
||||
lc->vtable.display_warning(lc,_("Remote end seems to have disconnected, the call is going to be closed."));
|
||||
if (lc->vtable.display_warning!=NULL)
|
||||
lc->vtable.display_warning(lc,_("Remote end seems to have disconnected, the call is going to be closed."));
|
||||
linphone_core_terminate_call(lc,NULL);
|
||||
}
|
||||
|
||||
|
|
@ -1754,9 +1758,11 @@ LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char *url)
|
|||
LinphoneAddress *uri;
|
||||
|
||||
if (is_enum(url,&enum_domain)){
|
||||
lc->vtable.display_status(lc,_("Looking for telephone number destination..."));
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("Looking for telephone number destination..."));
|
||||
if (enum_lookup(enum_domain,&enumres)<0){
|
||||
lc->vtable.display_status(lc,_("Could not resolve this number."));
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("Could not resolve this number."));
|
||||
ms_free(enum_domain);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1944,12 +1950,14 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphonePro
|
|||
sal_call_set_local_media_description(call->op,call->localdesc);
|
||||
}
|
||||
barmsg=ortp_strdup_printf("%s %s", _("Contacting"), real_url);
|
||||
lc->vtable.display_status(lc,barmsg);
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,barmsg);
|
||||
ms_free(barmsg);
|
||||
|
||||
if (err<0){
|
||||
ms_warning("Could not initiate call.");
|
||||
lc->vtable.display_status(lc,_("could not call"));
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("could not call"));
|
||||
linphone_core_stop_media_streams(lc,call);
|
||||
linphone_call_destroy(call);
|
||||
lc->call=NULL;
|
||||
|
|
@ -2410,7 +2418,8 @@ int linphone_core_accept_call(LinphoneCore *lc, const char *url)
|
|||
sal_op_set_contact(call->op,contact);
|
||||
|
||||
sal_call_accept(call->op);
|
||||
lc->vtable.display_status(lc,_("Connected."));
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("Connected."));
|
||||
gstate_new_state(lc, GSTATE_CALL_IN_CONNECTED, NULL);
|
||||
call->resultdesc=sal_call_get_final_media_description(call->op);
|
||||
if (call->resultdesc){
|
||||
|
|
@ -2444,7 +2453,8 @@ int linphone_core_terminate_call(LinphoneCore *lc, const char *url)
|
|||
lc->ringstream=NULL;
|
||||
}
|
||||
linphone_core_stop_media_streams(lc,call);
|
||||
lc->vtable.display_status(lc,_("Call ended") );
|
||||
if (lc->vtable.display_status!=NULL)
|
||||
lc->vtable.display_status(lc,_("Call ended") );
|
||||
gstate_new_state(lc, GSTATE_CALL_END, NULL);
|
||||
linphone_call_destroy(call);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc);
|
|||
|
||||
int linphone_core_get_sip_port(LinphoneCore *lc);
|
||||
|
||||
void linphone_core_set_sip_port(LinphoneCore *lc,int port);
|
||||
int linphone_core_set_sip_port(LinphoneCore *lc,int port);
|
||||
|
||||
ortp_socket_t linphone_core_get_sip_socket(LinphoneCore *lc);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ int lsd_player_stop(LsdPlayer *p);
|
|||
void lsd_player_enable_loop(LsdPlayer *p, bool_t loopmode);
|
||||
bool_t lsd_player_loop_enabled(const LsdPlayer *p);
|
||||
void lsd_player_set_gain(LsdPlayer *p, float gain);
|
||||
LinphoneSoundDaemon lsd_player_get_daemon(const LsdPlayer *p);
|
||||
LinphoneSoundDaemon *lsd_player_get_daemon(const LsdPlayer *p);
|
||||
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname);
|
||||
LsdPlayer * linphone_sound_daemon_get_player(LinphoneSoundDaemon *lsd);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ struct _LinphoneSoundDaemon {
|
|||
|
||||
static MSFilter *create_writer(MSSndCard *c){
|
||||
LinphoneSoundDaemon *lsd=(LinphoneSoundDaemon*)c->data;
|
||||
lsd->itcsink=ms_filter_new(MS_ITC_SINK_ID);
|
||||
ms_filter_call_method(lsd->itcsink,MS_ITC_SINK_CONNECT,lsd->branches[0].player);
|
||||
return lsd->itcsink;
|
||||
}
|
||||
|
||||
|
|
@ -104,6 +106,10 @@ void linphone_sound_daemon_release_player(LinphoneSoundDaemon *obj, LsdPlayer *
|
|||
}
|
||||
}
|
||||
|
||||
LinphoneSoundDaemon *lsd_player_get_daemon(const LsdPlayer *p){
|
||||
return p->lsd;
|
||||
}
|
||||
|
||||
int lsd_player_stop(LsdPlayer *p){
|
||||
ms_filter_call_method_noarg(p->player,MS_PLAYER_PAUSE);
|
||||
return 0;
|
||||
|
|
@ -245,8 +251,6 @@ LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname){
|
|||
|
||||
lsd->proxycard=ms_snd_card_new(&proxycard);
|
||||
lsd->proxycard->data=lsd;
|
||||
|
||||
ms_filter_call_method(lsd->itcsink,MS_ITC_SINK_CONNECT,lsd->branches[0].player);
|
||||
|
||||
return lsd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeState ss, Sal
|
|||
tmp=linphone_address_as_string(friend);
|
||||
lf->status=estatus;
|
||||
lf->subscribe_active=TRUE;
|
||||
lc->vtable.notify_presence_recv(lc,(LinphoneFriend*)lf);
|
||||
if (lc->vtable.notify_presence_recv)
|
||||
lc->vtable.notify_presence_recv(lc,(LinphoneFriend*)lf);
|
||||
ms_free(tmp);
|
||||
}else{
|
||||
ms_message("But this person is not part of our friend list, so we don't care.");
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ static void play_finished(LsdPlayer *p){
|
|||
const char *filename=(const char *)lsd_player_get_user_pointer (p);
|
||||
ms_message("Playing of %s is finished.",filename);
|
||||
if (!lsd_player_loop_enabled (p)){
|
||||
linphone_sound_daemon_release_player (lsd_player_get_daemon(p));
|
||||
linphone_sound_daemon_release_player (lsd_player_get_daemon(p),p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue