From 8fb0c59da9704d2f4935a630aea95596efcac962 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 15 Feb 2012 13:01:16 +0100 Subject: [PATCH 1/6] Add rule to make ipa --- submodules/build/Makefile | 7 +++++++ submodules/build/builder-iphone-os.mk | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/submodules/build/Makefile b/submodules/build/Makefile index 91f9d7d86..e0bf689c2 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -46,10 +46,17 @@ build: && make -f builder-iphone-simulator.mk all enable_gpl_third_parties=$(enable_gpl_third_parties)\ && make -f builder-iphone-os.mk host=armv7-apple-darwin all enable_gpl_third_parties=$(enable_gpl_third_parties)\ && make -f builder-iphone-os.mk delivery-sdk + +ipa: + make -f builder-iphone-simulator.mk ipa \ + && make -f builder-iphone-os.mk ipa \ + && make -f builder-iphone-os.mk host=armv7-apple-darwin ipa + clean: make -f builder-iphone-simulator.mk clean \ && make -f builder-iphone-os.mk clean \ && make -f builder-iphone-os.mk host=armv7-apple-darwin clean + clean-makefile: make -f builder-iphone-simulator.mk clean-makefile \ && make -f builder-iphone-os.mk clean-makefile \ diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index d87ad6390..441b68ff4 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -326,4 +326,8 @@ delivery: -x linphone-iphone/build\* \ -x \*.git\* +ipa: all + cd $(BUILDER_SRC_DIR)/../ \ + && xcodebuild -configuration DistributionAdhoc \ + && xcrun -sdk iphoneos PackageApplication -v build/DistributionAdhoc-iphoneos/linphone.app -o $(BUILDER_SRC_DIR)/../linphone-iphone.ipa From 0de57c7d280bdb3558c3bad0c9e3f8570805b991 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 15 Feb 2012 14:12:08 +0100 Subject: [PATCH 2/6] Fix ipa rule --- submodules/build/Makefile | 2 +- submodules/build/builder-iphone-os.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/build/Makefile b/submodules/build/Makefile index e0bf689c2..311aaa4fd 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -47,7 +47,7 @@ build: && make -f builder-iphone-os.mk host=armv7-apple-darwin all enable_gpl_third_parties=$(enable_gpl_third_parties)\ && make -f builder-iphone-os.mk delivery-sdk -ipa: +ipa: build make -f builder-iphone-simulator.mk ipa \ && make -f builder-iphone-os.mk ipa \ && make -f builder-iphone-os.mk host=armv7-apple-darwin ipa diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 441b68ff4..22362824a 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -326,7 +326,7 @@ delivery: -x linphone-iphone/build\* \ -x \*.git\* -ipa: all +ipa: cd $(BUILDER_SRC_DIR)/../ \ && xcodebuild -configuration DistributionAdhoc \ && xcrun -sdk iphoneos PackageApplication -v build/DistributionAdhoc-iphoneos/linphone.app -o $(BUILDER_SRC_DIR)/../linphone-iphone.ipa From 41a2a3366684da1a04733ada416d7d3f21d162b2 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 16 Feb 2012 15:46:45 +0100 Subject: [PATCH 3/6] g729A integration based on bcg729 --- .gitmodules | 3 ++ Classes/LinphoneAppDelegate.m | 4 +- Classes/LinphoneUI/LinphoneManager.m | 8 ++++ PhoneMainView.xib | 6 +-- README | 6 +-- linphone.xcodeproj/project.pbxproj | 8 ++++ submodules/bcg729 | 1 + submodules/build/builder-iphone-os.mk | 8 ++-- submodules/build/builders.d/msbcg729.mk | 61 +++++++++++++++++++++++++ 9 files changed, 93 insertions(+), 12 deletions(-) create mode 160000 submodules/bcg729 create mode 100644 submodules/build/builders.d/msbcg729.mk diff --git a/.gitmodules b/.gitmodules index 8ba0b2856..48fa6c484 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,3 +46,6 @@ [submodule "submodules/externals/srtp"] path = submodules/externals/srtp url = git://git.linphone.org/srtp.git +[submodule "submodules/bcg729"] + path = submodules/bcg729 + url = git://git.linphone.org/bcg729.git diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 52d29b56b..000ccd476 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -107,7 +107,9 @@ #ifdef HAVE_AMR @"YES",@"amr_8k_preference", // enable amr by default if compiled with #endif - @"NO",@"debugenable_preference", +#ifdef HAVE_G729 + @"YES",@"g729_preference", // enable amr by default if compiled with +#endif @"NO",@"debugenable_preference", //@"+33",@"countrycode_preference", nil]; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index dcbb3af1a..295aa96c0 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -46,6 +46,9 @@ extern void libmsx264_init(); extern void libmssilk_init(); #endif +#if HAVE_G729 +extern void libmsbcg729_init(); +#endif @implementation LinphoneManager @synthesize callDelegate; @synthesize registrationDelegate; @@ -623,6 +626,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach [self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000]; [self configurePayloadType:"PCMA" fromPrefKey:@"pcma_preference" withRate:8000]; [self configurePayloadType:"G722" fromPrefKey:@"g722_preference" withRate:8000]; + [self configurePayloadType:"G729" fromPrefKey:@"g729_preference" withRate:8000]; //get video codecs from linphonerc const MSList *videoCodecs=linphone_core_get_video_codecs(theLinphoneCore); @@ -791,6 +795,10 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach #ifdef HAVE_X264 libmsx264_init(); //load x264 plugin if present from the liblinphone sdk #endif + +#if HAVE_G729 + libmsbcg729_init(); // load g729 plugin +#endif /* Initialize linphone core*/ theLinphoneCore = linphone_core_new (&linphonec_vtable diff --git a/PhoneMainView.xib b/PhoneMainView.xib index 3953ea8da..b4c3174c1 100644 --- a/PhoneMainView.xib +++ b/PhoneMainView.xib @@ -47,6 +47,7 @@ {320, 480} + 1 MSAxIDEAA @@ -140,6 +141,7 @@ 266 {{0, 431}, {320, 49}} + 3 MCAwAA @@ -366,10 +368,6 @@ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 diff --git a/README b/README index 69c6e6e7e..b2deec6fc 100644 --- a/README +++ b/README @@ -63,9 +63,9 @@ After the SDK is built, just open the linphone xcode project with Xcode, and pre * Note regarding third party components subject to license -The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK and X264 codecs. -Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_X264 positioned in xcode project. -Before embeding these 3 codecs in the final application, make sure to have the right to do so. +The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and X264 codecs. +Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_X264 positioned in xcode project. +Before embeding these 4 codecs in the final application, make sure to have the right to do so. LIMITATIONS, KNOWN BUGS diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index d5a94982e..a1a9668f2 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -93,6 +93,8 @@ 226183B0147259670037138E /* libmssilk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AF147259670037138E /* libmssilk.a */; }; 2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; }; 226B563F13CAF1CD00921595 /* audio.plist in Resources */ = {isa = PBXBuildFile; fileRef = 226B563E13CAF1CD00921595 /* audio.plist */; }; + 226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADD14E2D0B800513B67 /* libbcg729.a */; }; + 226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADE14E2D0B800513B67 /* libmsbcg729.a */; }; 226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */; }; 226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */; }; 226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED51344B0EF00F6EF27 /* libmsamr.a */; }; @@ -482,6 +484,8 @@ 226183AF147259670037138E /* libmssilk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmssilk.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmssilk.a"; sourceTree = ""; }; 2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 226B563E13CAF1CD00921595 /* audio.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = audio.plist; path = Settings.bundle/audio.plist; sourceTree = ""; }; + 226CDADD14E2D0B800513B67 /* libbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/libbcg729.a"; sourceTree = ""; }; + 226CDADE14E2D0B800513B67 /* libmsbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsbcg729.a"; sourceTree = ""; }; 226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrwb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrwb.a"; sourceTree = ""; }; 226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrnb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrnb.a"; sourceTree = ""; }; 226F2ED51344B0EF00F6EF27 /* libmsamr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsamr.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsamr.a"; sourceTree = ""; }; @@ -649,6 +653,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */, + 226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */, 344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */, 344ABDF214850AE9007420B6 /* libstdc++.6.dylib in Frameworks */, 344ABDE81484E723007420B6 /* libzrtpcpp.a in Frameworks */, @@ -1110,6 +1116,8 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 226CDADD14E2D0B800513B67 /* libbcg729.a */, + 226CDADE14E2D0B800513B67 /* libmsbcg729.a */, 344ABDEF14850AE9007420B6 /* libc++.1.dylib */, 344ABDF014850AE9007420B6 /* libstdc++.6.dylib */, 344ABDE71484E723007420B6 /* libzrtpcpp.a */, diff --git a/submodules/bcg729 b/submodules/bcg729 new file mode 160000 index 000000000..1ad5aa5ab --- /dev/null +++ b/submodules/bcg729 @@ -0,0 +1 @@ +Subproject commit 1ad5aa5abdf23bb260595b07f0705c9ede1a37d2 diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 22362824a..e89de143d 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -45,7 +45,7 @@ BUILDER_BUILD_DIR?=$(shell pwd)/../build-$(host) LINPHONE_SRC_DIR=$(BUILDER_SRC_DIR)/linphone LINPHONE_BUILD_DIR=$(BUILDER_BUILD_DIR)/linphone -all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk +all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk build-msbcg729 $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties: mkdir -p $(LINPHONE_BUILD_DIR) @@ -93,13 +93,13 @@ endif prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host) -clean-makefile: clean-makefile-linphone -clean: clean-linphone +clean-makefile: clean-makefile-linphone clean-makefile-msbcg729 +clean: clean-linphone clean-msbcg729 init: mkdir -p $(prefix)/include mkdir -p $(prefix)/lib/pkgconfig -veryclean: veryclean-linphone +veryclean: veryclean-linphone veryclean-msbcg729 rm -rf $(BUILDER_BUILD_DIR) diff --git a/submodules/build/builders.d/msbcg729.mk b/submodules/build/builders.d/msbcg729.mk new file mode 100644 index 000000000..727be6148 --- /dev/null +++ b/submodules/build/builders.d/msbcg729.mk @@ -0,0 +1,61 @@ +############################################################################ +# msbcg729.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. +# +############################################################################ +msbcg729_dir?=bcg729 +enable_bcg729?=yes + +$(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure: + @echo -e "\033[01;32m Running autogen for msbcg729 in $(BUILDER_SRC_DIR)/$(msbcg729_dir) \033[0m" + cd $(BUILDER_SRC_DIR)/$(msbcg729_dir) && ./autogen.sh + +$(BUILDER_BUILD_DIR)/$(msbcg729_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure + @echo -e "\033[01;32m Running configure in $(BUILDER_BUILD_DIR)/$(msbcg729_dir) \033[0m" + mkdir -p $(BUILDER_BUILD_DIR)/$(msbcg729_dir) + cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/ \ + && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + $(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \ + --enable-static + +ifeq ($(enable_bcg729),yes) + +build-msbcg729: $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/Makefile + @echo -e "\033[01;32m building bcg729 \033[0m" + cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) \ + && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig \ + CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + make -j1 && make install + + +else +build-msbcg729: + @echo "G729 is disabled" + +endif + +clean-msbcg729: + -cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && make clean + +veryclean-msbcg729: + -cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && make distclean + rm -f $(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure + +clean-makefile-msbcg729: + -cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && rm -f Makefile From 873e35a4995a744a93842af8fdef5d17fd23e155 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 17 Feb 2012 10:34:16 +0100 Subject: [PATCH 4/6] set mtu to 1300 (so that it works over romanichel.net 3G network) --- linphonerc | 2 +- linphonerc-ipad | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linphonerc b/linphonerc index f0dff0146..ef80ec31e 100644 --- a/linphonerc +++ b/linphonerc @@ -2,7 +2,7 @@ download_bw=380 upload_bw=380 firewall_policy=0 -mtu=0 +mtu=1300 [sip] sip_random_port=1 diff --git a/linphonerc-ipad b/linphonerc-ipad index 59853ab38..402f17b15 100644 --- a/linphonerc-ipad +++ b/linphonerc-ipad @@ -2,7 +2,7 @@ download_bw=512 upload_bw=512 firewall_policy=0 -mtu=0 +mtu=1300 [sip] sip_random_port=1 From 00e990836a4985e7cda3e8841512b7ffcfd97e16 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 23 Feb 2012 16:03:04 +0100 Subject: [PATCH 5/6] update linphone submodule --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 11d7c7be8..3483b5de7 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 11d7c7be849174db1d18faeec8e20b56301f678c +Subproject commit 3483b5de70ccac30257eb3816927ecd530d270d8 From 71b02e4e14682af45d6d71d374b7290c066bac13 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 23 Feb 2012 17:39:12 +0100 Subject: [PATCH 6/6] update linphone submodules (bugfixes and updated doc) --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 3483b5de7..20d21f4b5 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 3483b5de70ccac30257eb3816927ecd530d270d8 +Subproject commit 20d21f4b5be4f54afca58c134426a6f7cb72ef56