mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 07:38:09 +00:00
enforce graph syntax
fix msrtp computation (could not work with 44100 Hz streams). git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@383 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
5260ecf29a
commit
b2126d647f
6 changed files with 45 additions and 24 deletions
|
|
@ -60,16 +60,6 @@ bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj){
|
|||
return obj->registered;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void linphone_proxy_config_register(LinphoneProxyConfig *obj){
|
||||
osip_message_t *msg;
|
||||
eXosip_lock();
|
||||
eXosip_register_build_register(obj->rid,obj->expires,&msg);
|
||||
eXosip_register_send_register(obj->rid,msg);
|
||||
eXosip_unlock();
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_proxy_config_register_again_with_updated_contact(LinphoneProxyConfig *obj, osip_message_t *orig_request, osip_message_t *last_answer){
|
||||
osip_message_t *msg;
|
||||
const char *rport,*received;
|
||||
|
|
@ -255,7 +245,6 @@ int linphone_proxy_config_done(LinphoneProxyConfig *obj)
|
|||
{
|
||||
if (!linphone_proxy_config_check(obj->lc,obj)) return -1;
|
||||
obj->commit=TRUE;
|
||||
linphone_proxy_config_register(obj);
|
||||
linphone_proxy_config_write_all_to_config_file(obj->lc);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -590,22 +579,35 @@ LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LpConfig *config
|
|||
static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){
|
||||
SipSetupContext *ssc;
|
||||
SipSetup *ss=sip_setup_lookup(cfg->type);
|
||||
LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
|
||||
unsigned int caps;
|
||||
if (!ss) return ;
|
||||
ssc=sip_setup_context_new(ss,cfg);
|
||||
|
||||
cfg->ssctx=ssc;
|
||||
if (cfg->reg_identity==NULL){
|
||||
ms_error("Invalid identity for this proxy configuration.");
|
||||
return;
|
||||
}
|
||||
if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)==0){
|
||||
if (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_PROXY_PROVIDER){
|
||||
char proxy[256];
|
||||
if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){
|
||||
linphone_proxy_config_set_server_addr(cfg,proxy);
|
||||
caps=sip_setup_context_get_capabilities(ssc);
|
||||
if (caps & SIP_SETUP_CAP_ACCOUNT_MANAGER){
|
||||
if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)!=0){
|
||||
if (lc->vtable.display_warning){
|
||||
char *tmp=ms_strdup_printf(_("Could not login as %s"),cfg->reg_identity);
|
||||
lc->vtable.display_warning(lc,tmp);
|
||||
ms_free(tmp);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
cfg->ssctx=ssc;
|
||||
if (caps & SIP_SETUP_CAP_PROXY_PROVIDER){
|
||||
char proxy[256];
|
||||
if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){
|
||||
linphone_proxy_config_set_server_addr(cfg,proxy);
|
||||
}else{
|
||||
ms_error("Could not retrieve proxy uri !");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
|
||||
|
|
@ -613,6 +615,7 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
|
|||
if (cfg->type && cfg->ssctx==NULL){
|
||||
linphone_proxy_config_activate_sip_setup(cfg);
|
||||
}
|
||||
linphone_proxy_config_register(cfg);
|
||||
cfg->commit=FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,7 +328,11 @@ static void set_video_window_decorations(GdkWindow *w){
|
|||
static gboolean linphone_gtk_iterate(LinphoneCore *lc){
|
||||
unsigned long id;
|
||||
static unsigned long previd=0;
|
||||
|
||||
static gboolean in_iterate=FALSE;
|
||||
|
||||
/*avoid reentrancy*/
|
||||
if (in_iterate) return TRUE;
|
||||
in_iterate=TRUE;
|
||||
linphone_core_iterate(lc);
|
||||
id=linphone_core_get_native_video_window_id(lc);
|
||||
if (id!=previd){
|
||||
|
|
@ -344,6 +348,7 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){
|
|||
else ms_error("gdk_window_foreign_new() failed");
|
||||
}
|
||||
}
|
||||
in_iterate=FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, co
|
|||
GtkWidget *w;
|
||||
switch(ws){
|
||||
case LinphoneWaitingStart:
|
||||
gdk_threads_enter();
|
||||
w=linphone_gtk_create_window("waiting");
|
||||
gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
|
||||
gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
|
||||
|
|
@ -40,10 +41,12 @@ void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, co
|
|||
gtk_widget_show(w);
|
||||
/*g_message("Creating waiting window");*/
|
||||
run_gtk();
|
||||
gdk_threads_leave();
|
||||
return w;
|
||||
break;
|
||||
case LinphoneWaitingProgress:
|
||||
w=(GtkWidget*)ctx;
|
||||
gdk_threads_enter();
|
||||
if (progress>=0){
|
||||
gtk_progress_bar_set_fraction(
|
||||
GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
|
||||
|
|
@ -57,12 +60,16 @@ void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, co
|
|||
}
|
||||
/*g_message("Updating progress");*/
|
||||
run_gtk();
|
||||
gdk_threads_leave();
|
||||
g_usleep(50000);
|
||||
return w;
|
||||
break;
|
||||
case LinphoneWaitingFinished:
|
||||
w=(GtkWidget*)ctx;
|
||||
gdk_threads_enter();
|
||||
gtk_widget_destroy(w);
|
||||
run_gtk();
|
||||
gdk_threads_leave();
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ dnl check for various codecs libraries
|
|||
dnl *************************************
|
||||
|
||||
dnl check for installed version of speex
|
||||
PKG_CHECK_MODULES(SPEEX, speex >= 1.1.12,
|
||||
PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3,
|
||||
[ AC_DEFINE(HAVE_SPEEX_NOISE,1,[tells whether the noise arg of speex_echo_cancel can be used]) ],
|
||||
[try_other_speex=yes]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ static int sender_set_relay_session_id(MSFilter *f, void*arg){
|
|||
static uint32_t get_cur_timestamp(MSFilter * f, uint32_t packet_ts)
|
||||
{
|
||||
SenderData *d = (SenderData *) f->data;
|
||||
uint32_t curts = (uint32_t)(f->ticker->time * (d->rate/1000));
|
||||
uint32_t curts = (uint32_t)( (f->ticker->time*(uint64_t)d->rate)/(uint64_t)1000) ;
|
||||
int diff;
|
||||
int delta = d->rate / 50; /*20 ms at 8000Hz */
|
||||
uint32_t netts;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ void ms_ticker_destroy(MSTicker *ticker){
|
|||
}
|
||||
|
||||
static void find_filters(MSList **filters, MSFilter *f ){
|
||||
int i;
|
||||
int i,found;
|
||||
MSQueue *link;
|
||||
if (f==NULL) ms_fatal("Bad graph.");
|
||||
/*ms_message("seeing %s, seen=%i",f->desc->name,f->seen);*/
|
||||
|
|
@ -95,9 +95,15 @@ static void find_filters(MSList **filters, MSFilter *f ){
|
|||
if (link!=NULL) find_filters(filters,link->prev.filter);
|
||||
}
|
||||
/* go downstream */
|
||||
for(i=0;i<f->desc->noutputs;i++){
|
||||
for(i=0,found=0;i<f->desc->noutputs;i++){
|
||||
link=f->outputs[i];
|
||||
if (link!=NULL) find_filters(filters,link->next.filter);
|
||||
if (link!=NULL) {
|
||||
found++;
|
||||
find_filters(filters,link->next.filter);
|
||||
}
|
||||
}
|
||||
if (f->desc->noutputs>=1 && found==0){
|
||||
ms_fatal("Bad graph: filter %s has %i outputs, none is connected.",f->desc->name,f->desc->noutputs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue