diff --git a/.gitmodules b/.gitmodules index 21941b57f..0298dd40f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,9 @@ [submodule "submodules/tunnel"] path = submodules/tunnel url = gitosis@git.linphone.org:tunnel.git +[submodule "submodules/externals/opencore-amr"] + path = submodules/externals/opencore-amr + url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr +[submodule "submodules/msamr"] + path = submodules/msamr + url = git://git.linphone.org/msamr.git diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 41bb737b9..dc44c57e0 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -64,6 +64,9 @@ NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: @"NO", @"enable_first_login_view_preference", // +#ifdef HAVE_AMR + @"YES",@"amr_8k_preference", // enable amr by default if compiled with +#endif nil]; [defaultsToRegister addEntriesFromDictionary:appDefaults]; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 5789f45d1..6577a5c0a 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -34,7 +34,9 @@ static LinphoneManager* theLinphoneManager=nil; static TunnelManager* sTunnelMgr=NULL; extern "C" void libmsilbc_init(); - +#ifdef HAVE_AMR +extern void libmsamr_init(); +#endif @implementation LinphoneManager @synthesize callDelegate; @synthesize registrationDelegate; @@ -437,6 +439,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach //read codecs from setting bundle and enable them one by one [self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000]; [self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000]; + [self configurePayloadType:"AMR" fromPrefKey:@"amr_8k_preference" withRate:8000]; [self configurePayloadType:"GSM" fromPrefKey:@"gsm_8k_preference" withRate:8000]; [self configurePayloadType:"iLBC" fromPrefKey:@"ilbc_preference" withRate:8000]; [self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000]; @@ -593,7 +596,9 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach libmsilbc_init(); - /* +#ifdef HAVE_AMR + libmsamr_init(); //load amr plugin if present from the liblinphone sdk +#endif /* * Initialize linphone core */ diff --git a/linphone-Info.plist b/linphone-Info.plist index 6fe6b4ae7..0a94d86e1 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -2,8 +2,6 @@ - UIApplicationExitsOnSuspend - CFBundleDevelopmentRegion English CFBundleDisplayName @@ -21,13 +19,15 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.3.4.2 + 3.4.2 CFBundleSignature ???? CFBundleVersion - 1.0.3.2 + 1.0.4 NSMainNibFile PhoneMainView + UIApplicationExitsOnSuspend + UIBackgroundModes voip diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index fa1d94d6f..cb710b9dc 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -29,11 +29,12 @@ linphone_configure_controls= --disable-video \ --enable-ssl-hmac=no \ --enable-ssl=yes \ --enable-macaqsnd=no \ + --enable-macsnd=no \ --enable-iounit=yes \ --with-gsm=$(prefix) \ SPEEX_CFLAGS="-I$(prefix)/include" \ SPEEXDSP_LIBS="-L$(prefix)/lib -lspeexdsp" \ - SPEEX_LIBS="$(SPEEXDSP_LIBS) -lspeex " \ + SPEEX_LIBS="-L$(prefix)/lib -lspeexdsp -lspeex " \ OPENSSL_CFLAGS="-I$(prefix)/include" \ OPENSSL_LIBS="-L$(prefix)/lib -lssl -lcrypto" @@ -67,7 +68,7 @@ endif prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host) -all: build-linphone build-msilbc +all: build-linphone build-msilbc build-msamr clean-makefile: clean-makefile-linphone clean: clean-linphone @@ -79,16 +80,16 @@ veryclean: rm -rf $(BUILDER_BUILD_DIR) .NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_BUILD_DIR)/Makefile - cd $(LINPHONE_BUILD_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install + cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig export CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install -clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl +clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl clean-msamr cd $(LINPHONE_BUILD_DIR) && make clean -veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl +veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr cd $(LINPHONE_BUILD_DIR) && make distclean cd $(LINPHONE_SRC_DIR) && rm -f configure -clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl +clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile @@ -105,7 +106,7 @@ $(LINPHONE_BUILD_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure #libphone only (asume dependencies are met) build-liblinphone: $(LINPHONE_BUILD_DIR)/Makefile - cd $(LINPHONE_BUILD_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install + cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig export CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install clean-makefile-liblinphone: cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile diff --git a/submodules/build/builders.d/msamr.mk b/submodules/build/builders.d/msamr.mk new file mode 100644 index 000000000..d251a01c7 --- /dev/null +++ b/submodules/build/builders.d/msamr.mk @@ -0,0 +1,42 @@ +############################################################################ +# msamr.mk +# Copyright (C) 2011 Belledonne Communications,Grenoble France +# +############################################################################ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################ +msamr_dir?=msamr +$(BUILDER_SRC_DIR)/$(msamr_dir)/configure: + cd $(BUILDER_SRC_DIR)/$(msamr_dir) && ./autogen.sh + +$(BUILDER_BUILD_DIR)/$(msamr_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msamr_dir)/configure + mkdir -p $(BUILDER_BUILD_DIR)/$(msamr_dir) + cd $(BUILDER_BUILD_DIR)/$(msamr_dir)/ \ + && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + $(BUILDER_SRC_DIR)/$(msamr_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} + +build-msamr: build-opencore-amr $(BUILDER_BUILD_DIR)/$(msamr_dir)/Makefile + cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install + +clean-msamr: clean-opencore-amr + cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && make clean + +veryclean-msamr: veryclean-opencore-amr + cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && make distclean && rm -f configure + +clean-makefile-msamr: clean-makefile-opencore-amr + cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && rm -f Makefile diff --git a/submodules/build/builders.d/opencore-amr.mk b/submodules/build/builders.d/opencore-amr.mk new file mode 100644 index 000000000..14eddd265 --- /dev/null +++ b/submodules/build/builders.d/opencore-amr.mk @@ -0,0 +1,44 @@ +############################################################################ +# opencore-amr.mk +# Copyright (C) 2011 Belledonne Communications,Grenoble France +# +############################################################################ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################ +ifneq (,$(findstring arm,$(host))) + opencore-amr-configure-option=--enable-gcc-armv5 +endif + +opencore-amr_dir?=externals/opencore-amr +$(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/Makefile: $(BUILDER_SRC_DIR)/$(opencore-amr_dir)/configure + mkdir -p $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) + cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/ \ + && CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + $(BUILDER_SRC_DIR)/$(opencore-amr_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} ${opencore-amr-configure-option} + +build-opencore-amr: $(BUILDER_BUILD_DIR)/$(opencore-amr_dir)/Makefile + cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install + +clean-opencore-amr: + cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make clean + +veryclean-opencore-amr: + cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && make distclean + cd $(BUILDER_SRC_DIR)/$(opencore-amr_dir) && rm -f configure + +clean-makefile-opencore-amr: + cd $(BUILDER_BUILD_DIR)/$(opencore-amr_dir) && rm -f Makefile diff --git a/submodules/externals/opencore-amr b/submodules/externals/opencore-amr new file mode 160000 index 000000000..cf4409e03 --- /dev/null +++ b/submodules/externals/opencore-amr @@ -0,0 +1 @@ +Subproject commit cf4409e03ec56b1cd85a2f9532f58bc1fa9db274 diff --git a/submodules/msamr b/submodules/msamr new file mode 160000 index 000000000..17391e324 --- /dev/null +++ b/submodules/msamr @@ -0,0 +1 @@ +Subproject commit 17391e32465c25feec9b3b44b6967775ea9a56a9