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

This commit is contained in:
Jehan Monnier 2011-02-09 08:10:58 +01:00
commit 8ee93c80c9
28 changed files with 8555 additions and 11096 deletions

2
NEWS
View file

@ -1,4 +1,4 @@
linphone-3.4.0 -- February 2nd, 2011
linphone-3.4.0 -- February 7th, 2011
* implement multiple calls feature:
- call hold (with possibility to play a music file)
- call resume

View file

@ -298,7 +298,9 @@ AC_ARG_ENABLE(x11,
if test "$video" = "true"; then
if test "$enable_x11" = "true"; then
AC_CHECK_HEADERS(X11/Xlib.h)
AC_CHECK_HEADERS(X11/Xlib.h)
AC_CHECK_LIB(X11,XUnmapWindow, X11_LIBS="-lX11")
AC_SUBST(X11_LIBS)
fi
AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
fi

View file

@ -23,7 +23,8 @@ linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS) \
$(MEDIASTREAMER_LIBS) \
$(ORTP_LIBS) \
$(SPEEX_LIBS) \
$(OSIP_LIBS)
$(OSIP_LIBS) \
$(X11_LIBS)
if BUILD_WIN32
#special build of linphonec to detach from the windows console

View file

@ -277,7 +277,9 @@ SalPresenceStatus linphone_online_status_to_sal(LinphoneOnlineStatus os){
}
void linphone_friend_notify(LinphoneFriend *lf, LinphoneOnlineStatus os){
//printf("Wish to notify %p, lf->nid=%i\n",lf,lf->nid);
char *addr=linphone_address_as_string(linphone_friend_get_address(lf));
ms_message("Want to notify %s, insub=%p",addr,lf->insub);
ms_free(addr);
if (lf->insub!=NULL){
sal_notify_presence(lf->insub,linphone_online_status_to_sal(os),NULL);
}
@ -286,8 +288,6 @@ void linphone_friend_notify(LinphoneFriend *lf, LinphoneOnlineStatus os){
static void linphone_friend_unsubscribe(LinphoneFriend *lf){
if (lf->outsub!=NULL) {
sal_unsubscribe(lf->outsub);
sal_op_release(lf->outsub);
lf->outsub=NULL;
lf->subscribe_active=FALSE;
}
}
@ -296,13 +296,19 @@ void linphone_friend_close_subscriptions(LinphoneFriend *lf){
linphone_friend_unsubscribe(lf);
if (lf->insub){
sal_notify_close(lf->insub);
sal_op_release(lf->insub);
lf->insub=NULL;
}
}
void linphone_friend_destroy(LinphoneFriend *lf){
if (lf->insub) {
sal_op_release(lf->insub);
lf->insub=NULL;
}
if (lf->outsub){
sal_op_release(lf->outsub);
lf->outsub=NULL;
}
if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
if (lf->info!=NULL) buddy_info_free(lf->info);
ms_free(lf);

View file

@ -59,7 +59,7 @@ static MSList *make_codec_list(LinphoneCore *lc, const MSList *codecs, int bandw
return l;
}
SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCall *call){
static SalMediaDescription *_create_local_media_description(LinphoneCore *lc, LinphoneCall *call, unsigned int session_id, unsigned int session_ver){
MSList *l;
PayloadType *pt;
const char *me=linphone_core_get_identity(lc);
@ -67,6 +67,8 @@ SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCa
const char *username=linphone_address_get_username (addr);
SalMediaDescription *md=sal_media_description_new();
md->session_id=session_id;
md->session_ver=session_ver;
md->nstreams=1;
strncpy(md->addr,call->localip,sizeof(md->addr));
strncpy(md->username,username,sizeof(md->username));
@ -96,6 +98,22 @@ SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCa
return md;
}
void update_local_media_description(LinphoneCore *lc, LinphoneCall *call, SalMediaDescription **md){
if (*md == NULL) {
*md = _create_local_media_description(lc,call,0,0);
} else {
unsigned int id = (*md)->session_id;
unsigned int ver = (*md)->session_ver+1;
sal_media_description_unref(*md);
*md = _create_local_media_description(lc,call,id,ver);
}
}
SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCall *call){
unsigned int id=rand();
return _create_local_media_description(lc,call,id,id);
}
static int find_port_offset(LinphoneCore *lc){
int offset;
MSList *elem;

View file

@ -2196,10 +2196,8 @@ bool_t linphone_core_inc_invite_pending(LinphoneCore*lc){
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
int err=0;
if (params!=NULL){
if (call->localdesc)
sal_media_description_unref(call->localdesc);
call->params=*params;
call->localdesc=create_local_media_description (lc,call);
update_local_media_description(lc,call,&call->localdesc);
call->camera_active=params->has_video;
if (lc->vtable.display_status)
lc->vtable.display_status(lc,_("Modifying call parameters..."));
@ -3852,7 +3850,6 @@ static void linphone_core_uninit(LinphoneCore *lc)
usleep(50000);
#endif
}
if (lc->friends)
ms_list_for_each(lc->friends,(void (*)(void *))linphone_friend_close_subscriptions);
linphone_core_set_state(lc,LinphoneGlobalShutdown,"Shutting down");

View file

@ -218,22 +218,30 @@ int offer_answer_initiate_outgoing(const SalMediaDescription *local_offer,
int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities,
const SalMediaDescription *remote_offer,
SalMediaDescription *result, bool_t one_matching_codec){
int i,j;
int i;
const SalStreamDescription *ls,*rs;
for(i=0,j=0;i<remote_offer->nstreams;++i){
for(i=0;i<remote_offer->nstreams;++i){
rs=&remote_offer->streams[i];
ms_message("Processing for stream %i",i);
ls=sal_media_description_find_stream((SalMediaDescription*)local_capabilities,rs->proto,rs->type);
if (ls){
initiate_incoming(ls,rs,&result->streams[j],one_matching_codec);
++j;
initiate_incoming(ls,rs,&result->streams[i],one_matching_codec);
} else {
/* create an inactive stream for the answer, as there where no matching stream a local capability */
result->streams[i].dir=SalStreamInactive;
result->streams[i].port=0;
result->streams[i].type=rs->type;
if (rs->type==SalOther){
strncpy(result->streams[i].typeother,rs->typeother,sizeof(rs->typeother)-1);
}
}
}
result->nstreams=j;
result->nstreams=i;
strcpy(result->username, local_capabilities->username);
strcpy(result->addr,local_capabilities->addr);
result->bandwidth=local_capabilities->bandwidth;
result->session_ver=local_capabilities->session_ver;
result->session_id=local_capabilities->session_id;
return 0;
}

View file

@ -445,6 +445,7 @@ int linphone_core_get_calls_nb(const LinphoneCore *lc);
void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message);
SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCall *call);
void update_local_media_description(LinphoneCore *lc, LinphoneCall *call, SalMediaDescription **md);
void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMediaDescription *new_md);

View file

@ -103,6 +103,7 @@ typedef struct SalEndpointCandidate{
typedef struct SalStreamDescription{
SalMediaProto proto;
SalStreamType type;
char typeother[32];
char addr[64];
int port;
MSList *payloads; //<list of PayloadType
@ -120,6 +121,8 @@ typedef struct SalMediaDescription{
char username[64];
int nstreams;
int bandwidth;
unsigned int session_ver;
unsigned int session_id;
SalStreamDescription streams[SAL_MEDIA_DESCRIPTION_MAX_STREAMS];
} SalMediaDescription;

View file

@ -39,6 +39,7 @@ SalOp * sal_find_out_subscribe(Sal *sal, int sid){
op=(SalOp*)elem->data;
if (op->sid==sid) return op;
}
ms_message("No op for sid %i",sid);
return NULL;
}

View file

@ -127,14 +127,18 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc)
{
sdp_message_t *local;
int inet6;
char sessid[16];
char sessver[16];
snprintf(sessid,16,"%i",desc->session_id);
snprintf(sessver,16,"%i",desc->session_ver);
sdp_message_init (&local);
if (strchr(desc->addr,':')!=NULL){
inet6=1;
}else inet6=0;
sdp_message_v_version_set (local, osip_strdup ("0"));
sdp_message_o_origin_set (local, osip_strdup (desc->username),
osip_strdup ("123456"), osip_strdup ("654321"),
osip_strdup (sessid), osip_strdup (sessver),
osip_strdup ("IN"), inet6 ? osip_strdup("IP6") : osip_strdup ("IP4"),
osip_strdup (desc->addr));
sdp_message_s_name_set (local, osip_strdup ("A conversation"));
@ -181,11 +185,23 @@ static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt)
static void add_line(sdp_message_t *msg, int lineno, const SalStreamDescription *desc){
const char *mt=desc->type==SalAudio ? "audio" : "video";
const char *mt;
const MSList *elem;
const char *addr;
const char *dir="sendrecv";
int port;
switch (desc->type) {
case SalAudio:
mt="audio";
break;
case SalVideo:
mt="video";
break;
case SalOther:
mt=desc->typeother;
break;
}
if (desc->candidates[0].addr[0]!='\0'){
addr=desc->candidates[0].addr;
port=desc->candidates[0].port;
@ -310,7 +326,13 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc){
stream->type=SalAudio;
}else if (strcasecmp("video", mtype) == 0){
stream->type=SalVideo;
}else stream->type=SalOther;
}else {
stream->type=SalOther;
if (stream->typeother){
ms_free(stream->typeother);
}
strncpy(stream->typeother,mtype,sizeof(stream->typeother)-1);
}
for(j=0;(sbw=sdp_message_bandwidth_get(msg,i,j))!=NULL;++j){
if (strcasecmp(sbw->b_bwtype,"AS")==0) stream->bandwidth=atoi(sbw->b_bandwidth);
}

View file

@ -1,147 +0,0 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.16 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="incoming_call">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property>
<property name="type">popup</property>
<property name="title" translatable="yes">Linphone - Incoming call</property>
<property name="window_position">center-on-parent</property>
<property name="icon">linphone2.png</property>
<property name="type_hint">notification</property>
<property name="urgency_hint">True</property>
<property name="deletable">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox8">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property>
<child>
<object class="GtkFrame" id="frame16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0</property>
<child>
<object class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="left_padding">12</property>
<child>
<object class="GtkLabel" id="message">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Incoming call from</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label43">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Incoming call</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area7">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="layout_style">spread</property>
<child>
<object class="GtkButton" id="accept_call">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal handler="linphone_gtk_accept_call" name="clicked"/>
<child>
<object class="GtkHBox" id="hbox17">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkImage" id="image12">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="stock">gtk-yes</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label44">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Accept</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="decline_cal">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal handler="linphone_gtk_decline_call" name="clicked"/>
<child>
<object class="GtkHBox" id="hbox20">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkImage" id="image13">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="stock">gtk-no</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="decline_call">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Decline</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

@ -1 +1 @@
Subproject commit 0fc8db73037bab398ece764874192d1d7df6af28
Subproject commit f9c63a6e1eac26014166716baa5b33f7c2d91f3f

2
oRTP

@ -1 +1 @@
Subproject commit 6a26fdcbe2e19bad50f4c010bdd173810140ada8
Subproject commit 8604a281fc5f61a5d15e509efcf0c64f622d62bd

View file

@ -1 +1,2 @@
gtk/p2pwizard.ui

1524
po/cs.po

File diff suppressed because it is too large Load diff

1459
po/de.po

File diff suppressed because it is too large Load diff

1417
po/es.po

File diff suppressed because it is too large Load diff

1465
po/fr.po

File diff suppressed because it is too large Load diff

1460
po/hu.po

File diff suppressed because it is too large Load diff

1578
po/it.po

File diff suppressed because it is too large Load diff

1412
po/ja.po

File diff suppressed because it is too large Load diff

1466
po/nl.po

File diff suppressed because it is too large Load diff

1411
po/pl.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1647
po/ru.po

File diff suppressed because it is too large Load diff

1542
po/sv.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff