Merge remote-tracking branch 'origin/master' into dev_videoios

Conflicts:
	coreapi/Makefile.am
	coreapi/linphonecore.c
	mediastreamer2
This commit is contained in:
Jehan Monnier 2011-09-14 16:16:44 +02:00
commit 406c3a1019
27 changed files with 2510 additions and 1956 deletions

View file

@ -163,23 +163,40 @@ setup.exe: filelist
newdate:
cd gtk && $(MAKE) newdate
if HAVE_MD5SUM
GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$4'})
else
GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$1'})
endif
Portfile: $(top_srcdir)/scripts/Portfile.tmpl dist
sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
-e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@
Portfile-devel: $(top_srcdir)/scripts/Portfile-devel.tmpl dist
sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
-e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@
bundle:
MACAPPNAME=Linphone.app
MACAPPZIP=$(PACKAGE)-$(VERSION).app.zip
BUNDLEDIR=$(shell echo "$$HOME/Desktop/$(MACAPPNAME)")
LIBICONV_HACK=$(top_builddir)/build/macos/libiconv.2.dylib
$(LIBICONV_HACK):
cd $(top_builddir)/build/macos && \
wget http://download-mirror.savannah.gnu.org/releases/linphone/misc/libiconv.2.dylib
bundle: $(LIBICONV_HACK)
rm -rf $(INSTALLDIR)
mkdir -p $(INSTALLDIR)
make install DESTDIR=$(INSTALLDIR)
LINPHONE_INSTALL_PREFIX=$(INSTALLDIR_WITH_PREFIX) \
LIBLINPHONE_INSTALL_PREFIX=$(INSTALLDIR_WITH_PREFIX) \
ige-mac-bundler $(PACKAGE_BUNDLE_FILE)
cd $$HOME/Desktop && zip -r Linphone-$(VERSION).app.zip Linphone.app
printf "[Pango]\nModuleFiles=./etc/pango/pango.modules\n" \
> $(BUNDLEDIR)/Contents/Resources/etc/pango/pangorc
cp -f $(LIBICONV_HACK) $(BUNDLEDIR)/Contents/Resources/lib/.
cd $(BUNDLEDIR)/.. && rm -f $(MACAPPZIP) && zip -r $(MACAPPZIP) $(MACAPPNAME)

View file

@ -2,84 +2,80 @@
* Compiling linphone on macos X *
**********************************
You need:
- Xcode (download from apple or using appstore application)
- Macports: http://www.macports.org/
Download and install macports using its user friendly installer.
You have two options: using gtk-osx framework (http://gtk-osx.sourceforge.net/) which results in a Linphone GTK well integrated into Mac OS
environment. The other option is using MacPort, in which case Linphone will run as an X11 application inside Mac OS.
At the date of March 25, 2011, no video support is available yet.
Compiling using gtk-osx
=======================
Requirements:
* gtk-osx framework
* xcode (for gcc)
* macport (to retrieve dependencies easily, such as libosip2, libeXosip2, libspeex
* linphone git tree
Steps:
- Install gtk-osx jhbuild environment as described at
http://sourceforge.net/apps/trac/gtk-osx/wiki/Build
It will build gtk for osx as well as many dependencies.
- Install ige-mac-bundler following instructions here (git clone method is preferred):
http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle
- Install build time dependencies
$ port install automake autoconf libtool intltool
- Install some linphone dependencies with macports
$ port install speex-dev
$ port install osip2
$ port install eXosip2
$ port install speex
$ port install libosip2
$ port install libeXosip2
$ port install ffmpeg-devel
- Install libSDL and ffmpeg from their official git or hg repositories. At this date (2011/05/09) the macports version are too old and buggy.
- Install SDL (for video display)
Unfortunately the current (august 2011) version of sdl in macports crashes all the time. Fortunately these bugs are fixed in the development branch of SDL.
So we recommend to download SDL 1.3 with mercurial (hg) and compile it by yourself, like this:
First, make sure you have mercurial:
$ sudo port install mercurial
Fetch SDL:
$ hg clone http://hg.libsdl.org/SDL
Compile:
$ cd SDL
$ ./autogen.sh
$ ./configure --prefix=/opt/local && make -j4
$ sudo make install
- Now you can compile linphone
When this version will be integrated into macports, only this will be necessary:
$ port install sdl-devel
$ jhbuild shell
$ PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-static --disable-strict --with-gsm=/opt/local --disable-x11
#assuming you have gsm installed in /opt/local. However gsm is optional.
$ make
- Install gtk. It is recommended to use the quartz backend for better integration.
$ port install cairo +quartz +no_x11
$ port install pango +quartz +no_x11
$ port install gtk2 +quartz +no_x11
$ port install ige-mac-integration
$ port install hicolor-icon-theme
- You can generate a bundle using
$ make bundle
- Compile linphone
The bundle is generated in ~/Desktop/Linphone and can safely be exported to other places and computers.
If you got the source code from git, run ./autogen.sh first.
Compiling using MacPort
=======================
This procedure works for audio, video still not fully supported.
It was tested on macos X (leopard) on september 2009.
Requirements:
* xcode (for gcc)
* macport (GNU porting project)
* svn or git checkout'd linphone tree.
Steps:
* install with the 'port install' command the following dependencies
- automake
- autoconf
- libtool
- gettext
- intltool
- gtk2
- speex-dev
- osip2
- eXosip2
Then or otherwise, do:
* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect
* within linphone source directory, run ./autogen.sh
* run
./configure --prefix=/opt/local --disable-video --with-readline=none && make
(note: we disable readline for linphonec because it appears to hang at this time)
* install to /opt/local
sudo make install
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make
Install to /opt/local
$ sudo make install
Done.
If you want to generate a portable bundle, then install ige-mac-bundler.
The macport package of ige-mac-bundler doesn't work at all.
Use git:
$ git clone https://github.com/jralls/ige-mac-bundler.git
$ cd ige-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
Then run, inside linphone source tree:
1. Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
The resulting bundle is located in ~/Desktop, together with a zipped version.
For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect).
$ git clone https://github.com/jralls/gtk-quartz-engine.git
$ cd gtk-quartz-engine
$ autoreconf -i
$ ./configure --prefix=/opt/local && make
$ sudo make install
Generate a new bundle to have it included.

View file

@ -102,6 +102,7 @@ LOCAL_STATIC_LIBRARIES += \
endif
ifeq ($(LINPHONE_VIDEO),1)
LOCAL_LDLIBS += -lGLESv2
LOCAL_STATIC_LIBRARIES += libvpx
ifeq ($(BUILD_X264),1)
LOCAL_STATIC_LIBRARIES += \
@ -121,12 +122,12 @@ LOCAL_STATIC_LIBRARIES += libspeex
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -DHAVE_ILBC=1
LOCAL_STATIC_LIBRARIES += libmsilbc
else
LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
LOCAL_SRC_FILES += $(LIBLINPHONE_EXTENDED_SRC_FILES)
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES)
endif
LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
LOCAL_SRC_FILES += $(LIBLINPHONE_EXTENDED_SRC_FILES)
LOCAL_LDLIBS += -lGLESv2
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto

View file

@ -12,7 +12,7 @@
defined by jhbuild, so it you are not using jhbuild you can
either define your own or just hardcode the path here.
-->
<prefix name="default">${env:JHBUILD_PREFIX}</prefix>
<prefix name="default">/opt/local</prefix>
<prefix name="linphone">${env:LINPHONE_INSTALL_PREFIX}</prefix>
<prefix name="liblinphone">${env:LINPHONE_INSTALL_PREFIX}</prefix>
<prefix name="macports">/opt/local</prefix>
@ -83,6 +83,14 @@
${prefix}/lib/gdk-pixbuf-2.0
</binary>
<data>
${prefix}/share/mime/globs
</data>
<binary>
${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
</binary>
<!-- Copy in GTK+ theme engines. Note the use of the
"${pkg:module:variable}" macro, which evaluates to a pkg-config
variable in the specified module. Note that any libraries that
@ -109,7 +117,11 @@
"${bundle}", which refers to the bundle root directory.
-->
<data>
${prefix:linphone}/share
${prefix:linphone}/share/linphone
</data>
<data>
${prefix:linphone}/share/pixmaps/linphone
</data>
<!-- Copy in the themes data. You may want to trim this to save space
@ -139,8 +151,12 @@
${project}/../../gtk/gtkrc.mac
</data>
<data dest="${bundle}/Contents/Resources/share/sounds/linphone">
${prefix:linphone}/share/sounds/linphone/
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/oldphone.wav">
${prefix:linphone}/share/sounds/linphone/rings/oldphone.wav
</data>
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/ringback.wav">
${prefix:linphone}/share/sounds/linphone/ringback.wav
</data>
<!-- Icon themes to copy. The "icons" property can be either of

View file

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([linphone],[3.4.3],[linphone-developers@nongnu.org])
AC_INIT([linphone],[3.4.99.1],[linphone-developers@nongnu.org])
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
@ -41,6 +41,8 @@ AC_C_INLINE
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_CC_C_O
AC_CHECK_PROGS(MD5SUM,[md5sum md5])
AM_CONDITIONAL(HAVE_MD5SUM,test -n $MD5SUM)
case $target in
*mingw32ce)
@ -178,7 +180,7 @@ AC_ARG_ENABLE(relativeprefix,
yes) relativeprefix=yes ;;
no) relativeprefix=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-relativeprefix) ;;
esac],[relativeprefix=auto])
esac],[relativeprefix=guess])
AC_ARG_ENABLE(date,
[ --enable-date Use build date in internal version number],
@ -245,17 +247,10 @@ else
package_prefix=${prefix}
fi
if test "$relativeprefix" = "auto" ; then
case $target_os in
*darwin*)
if test "$enable_x11" = "false" ; then
relativeprefix=yes
fi
;;
*mingw*)
relativeprefix=yes
;;
esac
if test "$relativeprefix" = "guess" ; then
if test "$mingw_found" = "yes" ; then
relativeprefix="yes"
fi
fi
if test "$relativeprefix" = "yes" ; then
@ -480,6 +475,15 @@ AC_SUBST(ORTP_LIBS)
AC_SUBST([ORTP_VERSION])
AC_SUBST([ORTP_DIR])
AC_ARG_ENABLE(tests_enabled,
[ --disable-tests Disable compilation of tests],
[case "${enableval}" in
yes) tests_enabled=true ;;
no) tests_enabled=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
esac],[tests_enabled=false])
AM_CONDITIONAL(ENABLE_TESTS, test x$tests_enabled = xyes)
dnl ##################################################
dnl # Check for doxygen
dnl ##################################################

View file

@ -918,6 +918,7 @@ static void x11_apply_video_params(VideoParams *params, Window window){
const char *dname=getenv("DISPLAY");
if (display==NULL && dname!=NULL){
XInitThreads();
display=XOpenDisplay(dname);
}

View file

@ -59,9 +59,9 @@ test_lsd_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
test_ecc_SOURCES=test_ecc.c
test_ecc_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
endif
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \
$(ORTP_CFLAGS) \
$(OSIP_CFLAGS) \

View file

@ -185,3 +185,4 @@ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibration
lc->ecc=ec_calibrator_new(lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard,rate,cb,cb_data);
return 0;
}

View file

@ -32,6 +32,7 @@ endif
clean-local:
rm -rf doc
if ENABLE_TESTS
#tutorials
if BUILD_TESTS
noinst_PROGRAMS=helloworld registration buddy_status chatroom
@ -57,6 +58,7 @@ chatroom_SOURCES=chatroom.c
LINPHONE_TUTOS+=$(chatroom_SOURCES)
chatroom_LDADD=$(helloworld_LDADD)
endif
endif

View file

@ -41,17 +41,14 @@ static MSWebCam *get_nowebcam_device(){
}
#endif
static const char* get_zrtp_identifier(LinphoneCore *lc){
static const char* get_hexa_zrtp_identifier(LinphoneCore *lc){
const char *confZid=lp_config_get_string(lc->config,"rtp","zid",NULL);
if (confZid != NULL) {
return confZid;
} else {
int32_t *zid=calloc(3,32);
int i=0;
for(;i<3;i++) {
zid[i]=rand();
}
lp_config_set_string(lc->config,"rtp","zid",(char*)zid);
char zidstr[128];
snprintf(zidstr,sizeof(zidstr),"%x-%x-%x",rand(),rand(),rand());
lp_config_set_string(lc->config,"rtp","zid",zidstr);
return lp_config_get_string(lc->config,"rtp","zid",NULL);
}
}
@ -103,10 +100,17 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr
#endif
static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) {
char status[255]={0};
ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted");
LinphoneCall *call = (LinphoneCall *)data;
call->audiostream_encrypted=encrypted;
if (encrypted && call->core->vtable.display_status != NULL) {
snprintf(status,sizeof(status)-1,_("Authentication token is %s"),call->auth_token);
call->core->vtable.display_status(call->core, status);
}
propagate_encryption_changed(call);
@ -116,7 +120,7 @@ static void linphone_call_audiostream_encryption_changed(void *data, bool_t encr
if (params->has_video) {
ms_message("Trying to enable encryption on video stream");
OrtpZrtpParams params;
params.zid=get_zrtp_identifier(call->core);
params.zid=get_hexa_zrtp_identifier(call->core);
params.zid_file=NULL; //unused
video_stream_enable_zrtp(call->videostream,call->audiostream,&params);
}
@ -1123,7 +1127,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
if (ortp_zrtp_available()) {
OrtpZrtpParams params;
params.zid=get_zrtp_identifier(lc);
params.zid=get_hexa_zrtp_identifier(lc);
params.zid_file=lc->zrtp_secrets_cache;
audio_stream_enable_zrtp(call->audiostream,&params);
}

View file

@ -633,17 +633,18 @@ static bool_t get_codec(LpConfig *config, const char* type, int index, PayloadTy
return TRUE;
}
#define RANK_END 10000
static const char *codec_pref_order[]={
"speex",
"iLBC",
"amr",
"gsm",
"pcmu",
"pcma",
"VP8-DRAFT-0-3-2",
"H264",
"MP4V-ES",
"theora",
"H263-1998",
"H263",
"x-snow",
NULL,
};
@ -651,9 +652,9 @@ static int find_codec_rank(const char *mime){
int i;
for(i=0;codec_pref_order[i]!=NULL;++i){
if (strcasecmp(codec_pref_order[i],mime)==0)
break;
return i;
}
return i;
return RANK_END;
}
static int codec_compare(const PayloadType *a, const PayloadType *b){
@ -678,8 +679,8 @@ static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
}
if (pt && ms_filter_codec_supported(pt->mime_type)){
if (ms_list_find(l,pt)==NULL){
/*do not enable old or experimental codecs by default*/
if (strcasecmp(pt->mime_type,"H263")!=0 && strcasecmp(pt->mime_type,"x-snow")!=0){
/*unranked codecs are disabled by default*/
if (find_codec_rank(pt->mime_type)!=RANK_END){
payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED);
}
ms_message("Adding new codec %s/%i with fmtp %s",
@ -912,22 +913,43 @@ const char * linphone_core_get_version(void){
return liblinphone_version;
}
static MSList *linphone_payload_types=NULL;
static void linphone_core_assign_payload_type(PayloadType *const_pt, int number, const char *recv_fmtp){
static void linphone_core_assign_payload_type(LinphoneCore *lc, PayloadType *const_pt, int number, const char *recv_fmtp){
PayloadType *pt;
pt=payload_type_clone(const_pt);
if (number==-1){
/*look for a free number */
MSList *elem;
int i;
for(i=lc->dyn_pt;i<=127;++i){
bool_t already_assigned=FALSE;
for(elem=lc->payload_types;elem!=NULL;elem=elem->next){
PayloadType *it=(PayloadType*)elem->data;
if (payload_type_get_number(it)==i){
already_assigned=TRUE;
break;
}
}
if (!already_assigned){
number=i;
lc->dyn_pt=i+1;
break;
}
}
if (number==-1){
ms_fatal("FIXME: too many codecs, no more free numbers.");
}
}
ms_message("assigning %s/%i payload type number %i",pt->mime_type,pt->clock_rate,number);
payload_type_set_number(pt,number);
if (recv_fmtp!=NULL) payload_type_set_recv_fmtp(pt,recv_fmtp);
rtp_profile_set_payload(&av_profile,number,pt);
linphone_payload_types=ms_list_append(linphone_payload_types,pt);
lc->payload_types=ms_list_append(lc->payload_types,pt);
}
static void linphone_core_free_payload_types(void){
ms_list_for_each(linphone_payload_types,(void (*)(void*))payload_type_destroy);
ms_list_free(linphone_payload_types);
linphone_payload_types=NULL;
static void linphone_core_free_payload_types(LinphoneCore *lc){
ms_list_for_each(lc->payload_types,(void (*)(void*))payload_type_destroy);
ms_list_free(lc->payload_types);
lc->payload_types=NULL;
}
void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message){
@ -952,17 +974,14 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
ortp_init();
linphone_core_assign_payload_type(&payload_type_pcmu8000,0,NULL);
linphone_core_assign_payload_type(&payload_type_gsm,3,NULL);
linphone_core_assign_payload_type(&payload_type_pcma8000,8,NULL);
linphone_core_assign_payload_type(&payload_type_g722,9,NULL);
linphone_core_assign_payload_type(&payload_type_lpc1015,115,NULL);
linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on");
linphone_core_assign_payload_type(&payload_type_telephone_event,101,"0-11");
linphone_core_assign_payload_type(&payload_type_ilbc,113,"mode=30");
linphone_core_assign_payload_type(&payload_type_amr,114,"octet-align=1");
lc->dyn_pt=96;
linphone_core_assign_payload_type(lc,&payload_type_pcmu8000,0,NULL);
linphone_core_assign_payload_type(lc,&payload_type_gsm,3,NULL);
linphone_core_assign_payload_type(lc,&payload_type_pcma8000,8,NULL);
linphone_core_assign_payload_type(lc,&payload_type_speex_nb,110,"vbr=on");
linphone_core_assign_payload_type(lc,&payload_type_speex_wb,111,"vbr=on");
linphone_core_assign_payload_type(lc,&payload_type_speex_uwb,112,"vbr=on");
linphone_core_assign_payload_type(lc,&payload_type_telephone_event,101,"0-11");
#if defined(ANDROID) || defined (__IPHONE_OS_VERSION_MIN_REQUIRED)
/*shorten the DNS lookup time and send more retransmissions on mobiles:
@ -977,27 +996,38 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
PayloadType *pt;
pt=payload_type_clone(&payload_type_gsm);
pt->clock_rate=11025;
rtp_profile_set_payload(&av_profile,114,pt);
linphone_payload_types=ms_list_append(linphone_payload_types,pt);
pt=payload_type_clone(&payload_type_gsm);
linphone_core_assign_payload_type(lc,pt,-1,NULL);
pt->clock_rate=22050;
rtp_profile_set_payload(&av_profile,115,pt);
linphone_payload_types=ms_list_append(linphone_payload_types,pt);
linphone_core_assign_payload_type(lc,pt,-1,NULL);
payload_type_destroy(pt);
}
#endif
#ifdef VIDEO_ENABLED
linphone_core_assign_payload_type(&payload_type_h263,34,NULL);
linphone_core_assign_payload_type(&payload_type_theora,97,NULL);
linphone_core_assign_payload_type(&payload_type_h263_1998,98,"CIF=1;QCIF=1");
linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
linphone_core_assign_payload_type(&payload_type_h264,102,"profile-level-id=428014");
linphone_core_assign_payload_type(&payload_type_vp8,103,NULL);
linphone_core_assign_payload_type(lc,&payload_type_h263,34,NULL);
linphone_core_assign_payload_type(lc,&payload_type_theora,97,NULL);
linphone_core_assign_payload_type(lc,&payload_type_h263_1998,98,"CIF=1;QCIF=1");
linphone_core_assign_payload_type(lc,&payload_type_mp4v,99,"profile-level-id=3");
linphone_core_assign_payload_type(lc,&payload_type_h264,102,"profile-level-id=428014");
linphone_core_assign_payload_type(lc,&payload_type_vp8,103,NULL);
linphone_core_assign_payload_type(lc,&payload_type_x_snow,-1,NULL);
/* due to limited space in SDP, we have to disable this h264 line which is normally no more necessary */
/* linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1;profile-level-id=428014");*/
/* linphone_core_assign_payload_type(&payload_type_h264,-1,"packetization-mode=1;profile-level-id=428014");*/
#endif
/*add all payload type for which we don't care about the number */
linphone_core_assign_payload_type(lc,&payload_type_ilbc,-1,"mode=30");
linphone_core_assign_payload_type(lc,&payload_type_amr,-1,"octet-align=1");
linphone_core_assign_payload_type(lc,&payload_type_lpc1015,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_g726_16,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_g726_24,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_g726_32,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_g726_40,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_aal2_g726_16,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_aal2_g726_24,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_aal2_g726_32,-1,NULL);
linphone_core_assign_payload_type(lc,&payload_type_aal2_g726_40,-1,NULL);
ms_init();
/* create a mediastreamer2 event queue and set it as global */
/* This allows to run event's callback in linphone_core_iterate() */
@ -1659,7 +1689,8 @@ void linphone_core_iterate(LinphoneCore *lc){
if (lc->ecc->cb)
lc->ecc->cb(lc,ecs,lc->ecc->delay,lc->ecc->cb_data);
if (ecs==LinphoneEcCalibratorDone){
lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-10,0));
int len=lp_config_get_int(lc->config,"sound","ec_tail_len",0);
lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-(len/2),0));
}
ec_calibrator_destroy(lc->ecc);
lc->ecc=NULL;
@ -3966,7 +3997,7 @@ static void linphone_core_uninit(LinphoneCore *lc)
ms_list_for_each(lc->call_logs,(void (*)(void*))linphone_call_log_destroy);
lc->call_logs=ms_list_free(lc->call_logs);
linphone_core_free_payload_types();
linphone_core_free_payload_types(lc);
ortp_exit();
linphone_core_set_state(lc,LinphoneGlobalOff,"Off");
}

View file

@ -624,6 +624,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoCancellation(J
,jboolean enable) {
linphone_core_enable_echo_cancellation((LinphoneCore*)lc,enable);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoLimiter(JNIEnv* env
,jobject thiz
,jlong lc
,jboolean enable) {
linphone_core_enable_echo_limiter((LinphoneCore*)lc,enable);
}
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isEchoCancellationEnabled(JNIEnv* env
,jobject thiz
,jlong lc

View file

@ -403,6 +403,8 @@ struct _LinphoneCore
codecs_config_t codecs_conf;
ui_config_t ui_conf;
autoreplier_config_t autoreplier_conf;
MSList *payload_types;
int dyn_pt;
LinphoneProxyConfig *default_proxy;
MSList *friends;
MSList *auth_info;

View file

@ -25,26 +25,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "sal.h"
const char* sal_transport_to_string(SalTransport transport) {
switch (transport) {
case SalTransportUDP:return "udp";
case SalTransportTCP: return "tcp";
case SalTransportTLS:return "tls";
case SalTransportDTLS:return "dtls";
default: {
ms_fatal("Unexpected transport [%i]",transport);
return NULL;
}
}
switch (transport) {
case SalTransportUDP:return "udp";
case SalTransportTCP: return "tcp";
case SalTransportTLS:return "tls";
case SalTransportDTLS:return "dtls";
default: {
ms_fatal("Unexpected transport [%i]",transport);
return NULL;
}
}
}
SalTransport sal_transport_parse(const char* param) {
if (strcasecmp("udp",param)==0) return SalTransportUDP;
if (strcasecmp("tcp",param)==0) return SalTransportTCP;
if (strcasecmp("tls",param)==0) return SalTransportTLS;
if (strcasecmp("dtls",param)==0) return SalTransportDTLS;
ms_error("Unkown transport type[%s], returning UDP", param);
return SalTransportUDP;
if (strcasecmp("udp",param)==0) return SalTransportUDP;
if (strcasecmp("tcp",param)==0) return SalTransportTCP;
if (strcasecmp("tls",param)==0) return SalTransportTLS;
if (strcasecmp("dtls",param)==0) return SalTransportDTLS;
ms_error("Unknown transport type[%s], returning UDP", param);
return SalTransportUDP;
}
SalMediaDescription *sal_media_description_new(){
SalMediaDescription *md=ms_new0(SalMediaDescription,1);
md->refcount=1;
@ -112,7 +113,8 @@ static bool_t has_dir(const SalMediaDescription *md, SalStreamDir stream_dir){
for(i=0;i<md->nstreams;++i){
const SalStreamDescription *ss=&md->streams[i];
if (ss->dir==stream_dir) return TRUE;
if (stream_dir==SalStreamSendOnly && (is_null_address(md->addr) || is_null_address(ss->addr)))
/*compatibility check for phones that only used the null address and no attributes */
if (ss->dir==SalStreamSendRecv && stream_dir==SalStreamSendOnly && (is_null_address(md->addr) || is_null_address(ss->addr)))
return TRUE;
}
return FALSE;

View file

@ -1769,6 +1769,22 @@ static bool_t registration_failure(Sal *sal, eXosip_event_t *ev){
case 407:
return process_authentication(sal,ev);
break;
case 423: /*interval too brief*/
{/*retry with greater interval */
osip_header_t *h=NULL;
osip_message_t *msg=NULL;
osip_message_header_get_byname(ev->response,"min-expires",0,&h);
if (h && h->hvalue && h->hvalue[0]!='\0'){
int val=atoi(h->hvalue);
if (val>op->expires)
op->expires=val;
}else op->expires*=2;
eXosip_lock();
eXosip_register_build_register(op->rid,op->expires,&msg);
eXosip_register_send_register(op->rid,msg);
eXosip_unlock();
}
break;
case 606: /*Not acceptable, workaround for proxies that don't like private addresses
in vias, such as ekiga.net
On the opposite, freephonie.net bugs when via are masqueraded.

View file

@ -1,42 +1,97 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 2.16 -->
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="contact">
<property name="can_focus">False</property>
<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="window_position">center-on-parent</property>
<property name="icon">linphone2.png</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox7">
<property name="visible">True</property>
<property name="can_focus">False</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 internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area7">
<property name="visible">True</property>
<property name="can_focus">False</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">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<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>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_contact_cancel" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label">gtk-ok</property>
<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>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_contact_ok" swapped="no"/>
</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="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame17">
<property name="visible">True</property>
<property name="can_focus">False</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>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment17">
<property name="visible">True</property>
<property name="can_focus">False</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="GtkVBox" id="vbox13">
<property name="visible">True</property>
<property name="can_focus">False</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="GtkTable" id="table7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<object class="GtkLabel" id="label45">
<property name="visible">True</property>
<property name="can_focus">False</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">Name</property>
</object>
@ -47,6 +102,7 @@
<child>
<object class="GtkLabel" id="label46">
<property name="visible">True</property>
<property name="can_focus">False</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">SIP Address</property>
</object>
@ -61,6 +117,10 @@
<property name="visible">True</property>
<property name="can_focus">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="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -73,6 +133,10 @@
<property name="visible">True</property>
<property name="can_focus">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="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -84,6 +148,7 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
@ -95,10 +160,13 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@ -109,10 +177,13 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@ -123,6 +194,7 @@
<child type="label">
<object class="GtkLabel" id="label47">
<property name="visible">True</property>
<property name="can_focus">False</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">&lt;b&gt;Contact information&lt;/b&gt;</property>
<property name="use_markup">True</property>
@ -130,54 +202,16 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<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">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">gtk-cancel</property>
<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>
<property name="use_stock">True</property>
<signal handler="linphone_gtk_contact_cancel" name="clicked"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label" translatable="yes">gtk-ok</property>
<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>
<property name="use_stock">True</property>
<signal handler="linphone_gtk_contact_ok" name="clicked"/>
</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>
<action-widgets>
<action-widget response="0">cancel_button</action-widget>
<action-widget response="0">ok_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -1 +1 @@
include "../../share/themes/Mac4Lin_GTK_Aqua_v1.0/gtk-2.0/gtkrc"
include "../../share/themes/Quartz/gtk-2.0/gtkrc"

View file

@ -113,6 +113,7 @@ static GOptionEntry linphone_options[]={
};
#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
#define RELATIVE_XML_DIR
#define BUILD_TREE_XML_DIR "gtk"
#ifndef WIN32
@ -257,7 +258,7 @@ static int get_ui_file(const char *name, char *path, int pathsize){
if (access(path,F_OK)!=0){
snprintf(path,pathsize,"%s/%s.ui",INSTALLED_XML_DIR,name);
if (access(path,F_OK)!=0){
g_error("Could not locate neither %s/%s.ui and %s/%s.ui .",BUILD_TREE_XML_DIR,name,
g_error("Could not locate neither %s/%s.ui nor %s/%s.ui",BUILD_TREE_XML_DIR,name,
INSTALLED_XML_DIR,name);
return -1;
}
@ -683,11 +684,7 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
gtk_widget_set_visible(button,add_call);
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),stop_active);
if (linphone_core_get_calls(lc)==NULL){
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
FALSE);
}
linphone_gtk_enable_transfer_button(lc,call_list_size>1);
update_video_title();
}
@ -755,15 +752,17 @@ void linphone_gtk_answer_clicked(GtkWidget *button){
}
}
void linphone_gtk_set_audio_video(){
linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
linphone_core_enable_video_preview(linphone_gtk_get_core(),
linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
}
void linphone_gtk_set_audio_only(){
linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
void linphone_gtk_enable_video(GtkWidget *w){
gboolean val=gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w));
GtkWidget *selfview_item=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"selfview_item");
linphone_core_enable_video(linphone_gtk_get_core(),val,val);
gtk_widget_set_sensitive(selfview_item,val);
if (val){
linphone_core_enable_video_preview(linphone_gtk_get_core(),
linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
}else{
linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
}
}
void linphone_gtk_enable_self_view(GtkWidget *w){
@ -949,9 +948,6 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
break;
case LinphoneCallStreamsRunning:
linphone_gtk_in_call_view_set_in_call(call);
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
TRUE);
break;
case LinphoneCallError:
linphone_gtk_in_call_view_terminate (call,msg);
@ -1132,13 +1128,14 @@ static void linphone_gtk_connect_digits(void){
}
static void linphone_gtk_check_menu_items(void){
bool_t audio_only=!linphone_core_video_enabled(linphone_gtk_get_core());
bool_t video_enabled=linphone_core_video_enabled(linphone_gtk_get_core());
bool_t selfview=linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT);
GtkWidget *selfview_item=linphone_gtk_get_widget(
linphone_gtk_get_main_window(),"selfview_item");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
linphone_gtk_get_main_window(),
audio_only ? "audio_only_item" : "video_item")), TRUE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
linphone_gtk_get_main_window(),"selfview_item")),selfview);
linphone_gtk_get_main_window(),"enable_video_item")), video_enabled);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(selfview_item),selfview);
gtk_widget_set_sensitive(selfview_item,video_enabled);
}
static gboolean linphone_gtk_can_manage_accounts(){
@ -1180,13 +1177,6 @@ static void linphone_gtk_configure_main_window(){
linphone_gtk_configure_window(w,"main_window");
if (title) {
gtk_window_set_title(GTK_WINDOW(w),title);
#if GTK_CHECK_VERSION(2,16,0)
#ifdef HAVE_GTK_OSX
gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),_("Windows"));
#else
gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
#endif
#endif
}
if (start_call_icon){
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"start_call")),
@ -1273,6 +1263,19 @@ gboolean linphone_gtk_close(GtkWidget *mw){
return TRUE;
}
#ifdef HAVE_GTK_OSX
static gboolean on_window_state_event(GtkWidget *w, GdkEventWindowState *event){
if ((event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) ||(event->new_window_state & GDK_WINDOW_STATE_WITHDRAWN) ){
linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
}else{
linphone_core_enable_video_preview(linphone_gtk_get_core(),
linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT) && linphone_core_video_enabled(linphone_gtk_get_core()));
}
return FALSE;
}
#endif
static void linphone_gtk_init_main_window(){
GtkWidget *main_window;
@ -1284,11 +1287,7 @@ static void linphone_gtk_init_main_window(){
linphone_gtk_show_friends();
linphone_gtk_connect_digits();
main_window=linphone_gtk_get_main_window();
linphone_gtk_enable_mute_button(GTK_BUTTON(linphone_gtk_get_widget(main_window,
"main_mute")),FALSE);
if (!linphone_gtk_use_in_call_view()) {
gtk_widget_show(linphone_gtk_get_widget(main_window, "main_mute"));
}
linphone_gtk_update_call_buttons (NULL);
/*prevent the main window from being destroyed by a user click on WM controls, instead we hide it*/
g_signal_connect (G_OBJECT (main_window), "delete-event",
@ -1302,6 +1301,7 @@ static void linphone_gtk_init_main_window(){
gtk_widget_hide(menubar);
gtk_osxapplication_ready(theMacApp);
}
g_signal_connect(G_OBJECT(main_window), "window-state-event",G_CALLBACK(on_window_state_event), NULL);
#endif
linphone_gtk_check_menu_items();
}
@ -1364,6 +1364,28 @@ static void linphone_gtk_check_soundcards(){
}
}
static void linphone_gtk_quit(void){
gdk_threads_leave();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
}
#ifdef HAVE_GTK_OSX
/*
This is not the correct way to implement block termination.
The good way would be to call gtk_main_quit(), and return TRUE.
Unfortunately this does not work, because if we return TRUE the NSApplication sometimes calls the CFRunLoop recursively, which prevents gtk_main() to exit.
As a result the program cannot exit at all.
As a workaround we do all the cleanup (unregistration and config save) within the handler.
*/
static gboolean on_block_termination(void){
gtk_main_quit();
linphone_gtk_quit();
return FALSE;
}
#endif
int main(int argc, char *argv[]){
#ifdef ENABLE_NLS
void *p;
@ -1458,7 +1480,7 @@ int main(int argc, char *argv[]){
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationDidBecomeActive",(GCallback)linphone_gtk_show_main_window,NULL);
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationWillTerminate",(GCallback)gtk_main_quit,NULL);
/*never block termination:*/
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)gtk_false,NULL);
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)on_block_termination,NULL);
#endif
the_ui=linphone_gtk_create_window("main");
@ -1487,10 +1509,7 @@ int main(int argc, char *argv[]){
linphone_gtk_check_for_new_version();
gtk_main();
gdk_threads_leave();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
linphone_gtk_quit();
#ifndef HAVE_GTK_OSX
/*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
gtk_status_icon_set_visible(icon,FALSE);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -306,6 +306,17 @@ static void linphone_gtk_init_codec_list(GtkTreeView *listview){
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
}
const char *get_codec_color(LinphoneCore *lc, PayloadType *pt){
const gchar *color;
if (linphone_core_check_payload_type_usability(lc,pt)) color="blue";
else color="red";
if (!linphone_core_payload_type_enabled(lc,pt)) {
color="grey";
}
return color;
}
static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
{
const MSList *elem;
@ -319,14 +330,16 @@ static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codecl
gchar *status;
gint rate;
gfloat bitrate;
gchar *color;
const gchar *color;
const char *params="";
struct _PayloadType *pt=(struct _PayloadType *)elem->data;
color=get_codec_color(linphone_gtk_get_core(),pt);
if (linphone_core_payload_type_enabled(linphone_gtk_get_core(),pt)) status=_("Enabled");
else status=_("Disabled");
if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
else color="red";
else {
status=_("Disabled");
}
/* get an iterator */
gtk_list_store_append(store,&iter);
bitrate=payload_type_get_bitrate(pt)/1000.0;
@ -361,13 +374,12 @@ static void linphone_gtk_check_codec_bandwidth(GtkTreeView *v){
g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
do{
PayloadType *pt=NULL;
const gchar *color;
gfloat bitrate;
gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
else color="red";
bitrate=payload_type_get_bitrate(pt)/1000.0;
gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)color,
gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)get_codec_color(linphone_gtk_get_core(),pt),
CODEC_BITRATE, bitrate,-1);
}while(gtk_tree_model_iter_next(model,&iter));
}
@ -462,7 +474,8 @@ static void linphone_gtk_codec_set_enable(GtkWidget *button, gboolean enabled){
store=GTK_LIST_STORE(mod);
gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
linphone_core_enable_payload_type(linphone_gtk_get_core(),pt,enabled);
gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"), -1);
gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"),
CODEC_COLOR,(gpointer)get_codec_color(linphone_gtk_get_core(),pt), -1);
}
}

View file

@ -1,202 +1,31 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100000</property>
<property name="lower">0</property>
<property name="page_increment">10</property>
<property name="step_increment">1</property>
<property name="page_size">10</property>
<property name="value">3600</property>
</object>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100000</property>
<property name="value">3600</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="sip_account">
<property name="can_focus">False</property>
<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="title" translatable="yes">Linphone - Configure a SIP account</property>
<property name="window_position">center-on-parent</property>
<property name="icon">linphone2.png</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkFrame" id="frame15">
<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="alignment15">
<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="GtkVBox" id="vbox11">
<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="orientation">vertical</property>
<child>
<object class="GtkTable" id="table6">
<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="n_rows">4</property>
<property name="n_columns">2</property>
<child>
<object class="GtkLabel" id="label38">
<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">Your SIP identity:</property>
<property name="justify">right</property>
</object>
</child>
<child>
<object class="GtkEntry" id="identity">
<property name="width_request">275</property>
<property name="visible">True</property>
<property name="can_focus">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="tooltip-text" translatable="yes">Looks like sip:&lt;username&gt;@&lt;domain&gt;</property>
<property name="text" translatable="yes">sip:</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label39">
<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">SIP Proxy address:</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="proxy">
<property name="visible">True</property>
<property name="can_focus">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="tooltip-text" translatable="yes">Looks like sip:&lt;proxy hostname&gt;</property>
<property name="text" translatable="yes">sip:</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label40">
<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">Route (optional):</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="route">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label41">
<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">Registration duration (sec):</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="regperiod">
<property name="visible">True</property>
<property name="can_focus">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="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="register">
<property name="label" translatable="yes">Register at startup</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="publish">
<property name="label" translatable="yes">Publish presence information</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label42">
<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">Configure a SIP account</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_area2">
<property name="visible">True</property>
<property name="can_focus">False</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">end</property>
<child>
@ -206,8 +35,9 @@
<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>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal handler="linphone_gtk_proxy_ok" name="clicked"/>
<signal name="clicked" handler="linphone_gtk_proxy_ok" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -222,8 +52,9 @@
<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>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal handler="linphone_gtk_proxy_cancel" name="clicked"/>
<signal name="clicked" handler="linphone_gtk_proxy_cancel" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -234,11 +65,220 @@
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame15">
<property name="visible">True</property>
<property name="can_focus">False</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>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<property name="can_focus">False</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="GtkVBox" id="vbox11">
<property name="visible">True</property>
<property name="can_focus">False</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="GtkTable" id="table6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
<object class="GtkLabel" id="label38">
<property name="visible">True</property>
<property name="can_focus">False</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">Your SIP identity:</property>
<property name="justify">right</property>
</object>
</child>
<child>
<object class="GtkEntry" id="identity">
<property name="width_request">275</property>
<property name="visible">True</property>
<property name="can_focus">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="tooltip_text" translatable="yes">Looks like sip:&lt;username&gt;@&lt;domain&gt;</property>
<property name="text" translatable="yes">sip:</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label39">
<property name="visible">True</property>
<property name="can_focus">False</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">SIP Proxy address:</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="proxy">
<property name="visible">True</property>
<property name="can_focus">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="tooltip_text" translatable="yes">Looks like sip:&lt;proxy hostname&gt;</property>
<property name="text" translatable="yes">sip:</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label40">
<property name="visible">True</property>
<property name="can_focus">False</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">Route (optional):</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="route">
<property name="visible">True</property>
<property name="can_focus">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="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label41">
<property name="visible">True</property>
<property name="can_focus">False</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">Registration duration (sec):</property>
<property name="justify">right</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="regperiod">
<property name="visible">True</property>
<property name="can_focus">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="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="register">
<property name="label" translatable="yes">Register at startup</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="publish">
<property name="label" translatable="yes">Publish presence information</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label42">
<property name="visible">True</property>
<property name="can_focus">False</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">Configure a SIP account</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">button6</action-widget>
<action-widget response="0">button7</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -186,18 +186,21 @@ public interface LinphoneCore {
static public class EcCalibratorStatus {
@SuppressWarnings("unchecked")
static private Vector values = new Vector();
public static final int IN_PROGRESS_STATUS=0;
public static final int DONE_STATUS=1;
public static final int FAILED_STATUS=2;
/**
* Calibration in progress
*/
static public EcCalibratorStatus InProgress = new EcCalibratorStatus(0,"InProgress");
static public EcCalibratorStatus InProgress = new EcCalibratorStatus(IN_PROGRESS_STATUS,"InProgress");
/**
* Calibration done
*/
static public EcCalibratorStatus Done = new EcCalibratorStatus(1,"Done");
static public EcCalibratorStatus Done = new EcCalibratorStatus(DONE_STATUS,"Done");
/**
* Calibration in progress
*/
static public EcCalibratorStatus Failed = new EcCalibratorStatus(2,"Failed");
static public EcCalibratorStatus Failed = new EcCalibratorStatus(FAILED_STATUS,"Failed");
private final int mValue;
private final String mStringValue;
@ -591,5 +594,6 @@ public interface LinphoneCore {
boolean pauseAllCalls();
void setZrtpSecretsCache(String file);
public void enableEchoLimiter(boolean val);
}

View file

@ -5,28 +5,16 @@ AC_ARG_WITH( osip,
[ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr] ],
[ osip_prefix=${withval}],[ osip_prefix=/usr ])
dnl FC6's compat-osip2 headers live into "/usr/include/osip2-2.2.2",
dnl while libraries are "/usr/lib/libosipparser2-2.2.2.so*".
AC_ARG_WITH( osip-version,dnl
AC_HELP_STRING([--with-osip-version=VERSION],
[Set osip legacy version @<:@empty@:>@]),
[osip_legacy_version="-${withval}"],
[osip_legacy_version=""])
osip_pkgconfig=true
osip_pkgconfig_file=libosip2
if test -n "$osip_legacy_version"; then
osip_pkgconfig_file=libosip2${osip_legacy_version}
fi
PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.0.0, ,osip_pkgconfig=false)
PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.3.0, ,osip_pkgconfig=false)
if test $osip_pkgconfig = false; then
if test -z "$osip_legacy_version"; then
if test "$osip_prefix" != "/usr" ; then
OSIP_CFLAGS="-I${osip_prefix}/include"
else
OSIP_CFLAGS="-I${osip_prefix}/include/osip2${osip_legacy_version}"
fi
dnl check osip2 headers
@ -36,7 +24,10 @@ dnl check osip2 headers
CPPFLAGS=$CPPFLAGS_save
dnl check for osip2 libs
OSIP_LIBS="-L$osip_prefix/lib -losipparser2${osip_legacy_version}"
if test "$osip_prefix" != "/usr" ; then
OSIP_LIBS="-L$osip_prefix/lib"
fi
OSIP_LIBS="$OSIP_LIBS -losipparser2"
LDFLAGS_save=$LDFLAGS
LDFLAGS=$OSIP_LIBS
LIBS_save=$LIBS
@ -49,8 +40,8 @@ dnl check for osip2 libs
;;
esac
OSIP_LIBS="$OSIP_LIBS $osip_aux_libs"
AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} $osip_aux_libs ])
AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
AC_CHECK_LIB(osip2,osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2 $osip_aux_libs ])
AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save
fi

@ -1 +1 @@
Subproject commit 96417301a643aedd56a7760f0036415ee5d2aa45
Subproject commit 021c5cd8cca603c6e905ec6688a4deefa995358c

2
oRTP

@ -1 +1 @@
Subproject commit 536ad766cf13da4115c456170afee96113de533f
Subproject commit a4e50eedc1d6b6f8855d1c600b56b116e95c5060

View file

@ -17,8 +17,14 @@ distname linphone-${version}
checksums md5 @LINPHONE_MD5@
depends_lib port:libglade2 \
port:speex-devel \
port:libeXosip2
depends_lib port:ffmpeg-devel \
port:readline \
port:speex \
port:libeXosip2 \
port:libsdl-devel \
port:gtk2 \
port:ige-mac-integration
configure.args-append --disable-x11 --with-readline=/opt/local --disable-strict
configure.args-append --disable-video --with-readline=none