From dc75c68520c150618cef22e37e2a53d117d2ab84 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 6 Feb 2012 15:37:58 +0100 Subject: [PATCH 01/26] update exosip for bugfix --- submodules/externals/exosip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index c3da03035..12dde4bdc 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit c3da0303519ad3120355cb85baee9cf6d0e4d1c2 +Subproject commit 12dde4bdc18ee6dddbb6ff407345ede5a277936d From 122fa2601d7a08984d22fe93a1ae574e4e8ff424 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 9 Feb 2012 10:27:15 +0100 Subject: [PATCH 02/26] replace PKG_CONFIG_PATH by PKG_CONFIG_LIBDIR --- submodules/build/builder-iphone-os.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 38748afd1..d87ad6390 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -104,7 +104,7 @@ veryclean: veryclean-linphone .NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg build-libvpx detect_gpl_mode_switch $(LINPHONE_BUILD_DIR)/Makefile - 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 + cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_LIBDIR=$(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-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr clean-mssilk clean-ffmpeg clean-libvpx clean-msx264 cd $(LINPHONE_BUILD_DIR) && make clean @@ -122,18 +122,18 @@ $(LINPHONE_SRC_DIR)/configure: $(LINPHONE_BUILD_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure mkdir -p $(LINPHONE_BUILD_DIR) - echo -e "\033[1mPKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + echo -e "\033[1mPKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ $(LINPHONE_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \ ${linphone_configure_controls}\033[0m" cd $(LINPHONE_BUILD_DIR) && \ - PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ CFLAGS="$(CFLAGS) -DMS2_MINIMAL_SIZE" $(LINPHONE_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \ ${linphone_configure_controls} #libphone only (asume dependencies are met) build-liblinphone: $(LINPHONE_BUILD_DIR)/Makefile - 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 + cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_LIBDIR=$(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 @@ -152,7 +152,7 @@ $(BUILDER_BUILD_DIR)/$(osip_dir)/Makefile: $(BUILDER_SRC_DIR)/$(osip_dir)/config $(BUILDER_SRC_DIR)/$(osip_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} build-osip2: $(BUILDER_BUILD_DIR)/$(osip_dir)/Makefile - cd $(BUILDER_BUILD_DIR)/$(osip_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install + cd $(BUILDER_BUILD_DIR)/$(osip_dir) && PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install clean-osip2: cd $(BUILDER_BUILD_DIR)/$(osip_dir) && make clean @@ -171,12 +171,12 @@ $(BUILDER_SRC_DIR)/$(eXosip_dir)/configure: $(BUILDER_BUILD_DIR)/$(eXosip_dir)/Makefile: $(BUILDER_SRC_DIR)/$(eXosip_dir)/configure mkdir -p $(BUILDER_BUILD_DIR)/$(eXosip_dir) cd $(BUILDER_BUILD_DIR)/$(eXosip_dir)/\ - && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + && PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ $(BUILDER_SRC_DIR)/$(eXosip_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} CFLAGS="-I$(prefix)/include -L$(prefix)/lib -lcrypto" --enable-openssl --disable-tools build-eXosip2: $(BUILDER_BUILD_DIR)/$(eXosip_dir)/Makefile cd $(BUILDER_BUILD_DIR)/$(eXosip_dir) \ - && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + && PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ make DEFS="-DHAVE_CONFIG_H -include $(BUILDER_SRC_DIR)/$(eXosip_dir)/include/eXosip2/eXosip_transport_hook.h" && make install clean-eXosip2: @@ -243,7 +243,7 @@ $(MSILBC_SRC_DIR)/configure: $(MSILBC_BUILD_DIR)/Makefile: $(MSILBC_SRC_DIR)/configure mkdir -p $(MSILBC_BUILD_DIR) cd $(MSILBC_BUILD_DIR) && \ - PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ $(MSILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode) build-msilbc: build-libilbc $(MSILBC_BUILD_DIR)/Makefile @@ -267,7 +267,7 @@ $(LIBILBC_SRC_DIR)/configure: $(LIBILBC_BUILD_DIR)/Makefile: $(LIBILBC_SRC_DIR)/configure mkdir -p $(LIBILBC_BUILD_DIR) cd $(LIBILBC_BUILD_DIR) && \ - PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ + PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \ $(LIBILBC_SRC_DIR)/configure -prefix=$(prefix) --host=$(host) $(library_mode) build-libilbc: $(LIBILBC_BUILD_DIR)/Makefile From 9beec4eaf2f3d5cafea077a8273227fb490de8a9 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Feb 2012 10:37:10 +0100 Subject: [PATCH 03/26] Update silk and linphone --- submodules/linphone | 2 +- submodules/mssilk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/linphone b/submodules/linphone index 026077112..286dc6983 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 02607711286be03ac9e074dde0ac02ba03025266 +Subproject commit 286dc6983555a81b8c2bb73fee09e9c611015b05 diff --git a/submodules/mssilk b/submodules/mssilk index a0ad1cca9..498a7c526 160000 --- a/submodules/mssilk +++ b/submodules/mssilk @@ -1 +1 @@ -Subproject commit a0ad1cca900afc17204856fd7c2de7e8d511eaad +Subproject commit 498a7c526192392e402e72b7e9f2c6c381bdb7fd From 674fa69838ade510202a4975e34e808f87660a49 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 10 Feb 2012 11:18:37 +0100 Subject: [PATCH 04/26] Update linphone --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 286dc6983..11d7c7be8 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 286dc6983555a81b8c2bb73fee09e9c611015b05 +Subproject commit 11d7c7be849174db1d18faeec8e20b56301f678c From 8fb0c59da9704d2f4935a630aea95596efcac962 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 15 Feb 2012 13:01:16 +0100 Subject: [PATCH 05/26] 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 06/26] 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 07/26] 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 08/26] 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 09/26] 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 10/26] 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 From 40e91a47067afea0693b8802fb371d8fe80f5982 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 1 Mar 2012 10:23:22 +0100 Subject: [PATCH 11/26] Restore iOS target to 4.0 --- linphone.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index d5a94982e..27fe08fbd 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -1569,7 +1569,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "linphone-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1637,7 +1637,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "linphone-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1915,7 +1915,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "linphone-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", @@ -1983,7 +1983,7 @@ submodules/externals/speex/include, ); INFOPLIST_FILE = "linphone-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; LIBRARY_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)", "\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"", From 07229315820935df99da2de1aeb6799bf4b0dfe5 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 1 Mar 2012 10:47:21 +0100 Subject: [PATCH 12/26] Fix crash on FastAddressBook dealloc --- Classes/LinphoneUI/FastAddressBook.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/LinphoneUI/FastAddressBook.m b/Classes/LinphoneUI/FastAddressBook.m index 1f88a0077..17ea43cd3 100644 --- a/Classes/LinphoneUI/FastAddressBook.m +++ b/Classes/LinphoneUI/FastAddressBook.m @@ -89,7 +89,7 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void -(id) initWithRecord:(ABRecordRef) aRecord ofType:(NSString*) type { if ((self = [super init])) { record=CFRetain(aRecord); - numberType= type?[type retain]:@"unkown"; + numberType= [type?type:@"unknown" retain]; } return self; } From 23d8337a0a2e0479f923fba1b9337492da275ea1 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 2 Mar 2012 15:31:15 +0100 Subject: [PATCH 13/26] Update linphone and exosip --- submodules/externals/exosip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index 12dde4bdc..8483ca292 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit 12dde4bdc18ee6dddbb6ff407345ede5a277936d +Subproject commit 8483ca292c10e4bca3331040dd9babf8431d0393 diff --git a/submodules/linphone b/submodules/linphone index 20d21f4b5..dc0361975 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 20d21f4b5be4f54afca58c134426a6f7cb72ef56 +Subproject commit dc0361975b2b845e66a88e58c8559758b1bd21e1 From 1ba66ca345e1f75d5768d3dc64cd88de11dccfe4 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 5 Mar 2012 15:34:34 +0100 Subject: [PATCH 14/26] switch to CLANG --- Classes/LinphoneAppDelegate.m | 7 ++++ linphone.xcodeproj/project.pbxproj | 65 ++++++++++++++---------------- 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 000ccd476..d84fa8dd9 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -29,6 +29,13 @@ #include "LinphoneManager.h" #include "linphonecore.h" +#if __clang__ && TARGET_OS_IPHONE +extern int __divsi3(int a, int b); +int __aeabi_idiv(int a, int b) { + return __divsi3(a,b); +} +#endif + @implementation linphoneAppDelegate @synthesize window; diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index cd573f5c3..19af5b48b 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -1294,8 +1294,11 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0430; + }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "linphone" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -1552,7 +1555,6 @@ "$(ARCHS_STANDARD_32_BIT)", armv6, ); - CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1565,7 +1567,8 @@ HAVE_X264, HAVE_SILK, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1586,7 +1589,6 @@ ORDER_FILE = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = linphone; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1597,7 +1599,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: jehan monnier (E8MYPN2NXL)"; + CODE_SIGN_IDENTITY = "iPhone Distribution: jehan monnier"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1605,8 +1607,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 3.1; LIBRARY_SEARCH_PATHS = ""; LINK_WITH_STANDARD_LIBRARIES = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "DD608A20-B0EC-49C6-BFD1-815C97DF3844"; + PROVISIONING_PROFILE = "7EBE410C-11B9-4346-9977-2C3BEE43ED16"; SDKROOT = iphoneos; }; name = DistributionAdhoc; @@ -1620,7 +1621,6 @@ armv6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1633,7 +1633,8 @@ HAVE_X264, HAVE_SILK, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1654,7 +1655,6 @@ ORDER_FILE = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = linphone; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1669,7 +1669,7 @@ "$(ARCHS_STANDARD_32_BIT)", arm6, ); - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1680,7 +1680,7 @@ IN_LINPHONE, VIDEO_ENABLED, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1706,7 +1706,6 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1733,7 +1732,7 @@ IN_LINPHONE, VIDEO_ENABLED, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1775,7 +1774,7 @@ arm6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1786,7 +1785,7 @@ IN_LINPHONE, VIDEO_ENABLED, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1812,7 +1811,6 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1828,7 +1826,7 @@ arm6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1839,7 +1837,7 @@ IN_LINPHONE, VIDEO_ENABLED, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1865,7 +1863,6 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1876,7 +1873,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1884,7 +1881,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 3.1; LIBRARY_SEARCH_PATHS = ""; LINK_WITH_STANDARD_LIBRARIES = YES; - PREBINDING = NO; + PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; }; name = Release; @@ -1897,8 +1894,7 @@ "$(ARCHS_STANDARD_32_BIT)", armv6, ); - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1911,7 +1907,8 @@ HAVE_X264, HAVE_SILK, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1932,7 +1929,7 @@ ORDER_FILE = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = linphone; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1943,7 +1940,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: jehan monnier"; + CODE_SIGN_IDENTITY = "iPhone Distribution: jehan monnier"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1951,8 +1948,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 3.1; LIBRARY_SEARCH_PATHS = ""; LINK_WITH_STANDARD_LIBRARIES = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "09801E17-63DB-47FD-A203-166EDD1E55A1"; + PROVISIONING_PROFILE = "075921BC-C7D8-42E1-B864-F05FD9BF841C"; SDKROOT = iphoneos; }; name = Distribution; @@ -1966,7 +1962,6 @@ armv6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: jehan monnier"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1979,7 +1974,8 @@ HAVE_X264, HAVE_SILK, ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -2000,7 +1996,6 @@ ORDER_FILE = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = linphone; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "075921BC-C7D8-42E1-B864-F05FD9BF841C"; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2011,7 +2006,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -2019,7 +2014,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 3.1; LIBRARY_SEARCH_PATHS = ""; LINK_WITH_STANDARD_LIBRARIES = YES; - PREBINDING = NO; + PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; }; name = Debug; From 9d72cc900e0dfc12b73e62b5d39d2cfef401613d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 5 Mar 2012 17:10:07 +0100 Subject: [PATCH 15/26] update exosip and liblinphone for eXosip_trylock() improvemnt --- submodules/externals/exosip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index 8483ca292..d49a578ac 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit 8483ca292c10e4bca3331040dd9babf8431d0393 +Subproject commit d49a578ac4907418ec365404c3589d26459a942d diff --git a/submodules/linphone b/submodules/linphone index dc0361975..4006baf28 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit dc0361975b2b845e66a88e58c8559758b1bd21e1 +Subproject commit 4006baf2895166f78b8fe4c2721fa77656607988 From 90a3c76cc636c54230481abce0e40efedd5cc6fd Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 6 Mar 2012 09:26:44 +0100 Subject: [PATCH 16/26] fix code signing --- linphone.xcodeproj/project.pbxproj | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 19af5b48b..248799e19 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -1669,7 +1669,7 @@ "$(ARCHS_STANDARD_32_BIT)", arm6, ); - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1706,6 +1706,7 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; + PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1720,8 +1721,7 @@ "$(ARCHS_STANDARD_32_BIT)", arm6, ); - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1758,7 +1758,7 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1774,7 +1774,7 @@ arm6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "iPhone Distribution: jehan monnier"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1811,6 +1811,7 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; + PROVISIONING_PROFILE = "075921BC-C7D8-42E1-B864-F05FD9BF841C"; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1826,7 +1827,7 @@ arm6, ); CODE_SIGN_ENTITLEMENTS = untitled.plist; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "iPhone Distribution: jehan monnier"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; @@ -1863,6 +1864,7 @@ mediastreamer, ); PRODUCT_NAME = "linphone-no-gpl-thirdparties"; + PROVISIONING_PROFILE = "7EBE410C-11B9-4346-9977-2C3BEE43ED16"; SDKROOT = iphoneos; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic; TARGETED_DEVICE_FAMILY = "1,2"; From 1bcf4455dc6b831255c7f6fd351b4b3e03a21a63 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 6 Mar 2012 11:17:47 +0100 Subject: [PATCH 17/26] update exosip --- submodules/externals/exosip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index d49a578ac..b3e55a3c9 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit d49a578ac4907418ec365404c3589d26459a942d +Subproject commit b3e55a3c93b39af43666acec45191b41f2016fa0 From a4b699b50b5de17b2384f9be32d119b5faaeec1d Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 6 Mar 2012 11:35:37 +0100 Subject: [PATCH 18/26] FastAddressBook: call super dealloc at the end of Contact::dealloc --- Classes/LinphoneUI/FastAddressBook.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/LinphoneUI/FastAddressBook.m b/Classes/LinphoneUI/FastAddressBook.m index 17ea43cd3..e1e3334c6 100644 --- a/Classes/LinphoneUI/FastAddressBook.m +++ b/Classes/LinphoneUI/FastAddressBook.m @@ -94,8 +94,8 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void return self; } - (void)dealloc { - [super dealloc]; CFRelease(record); [numberType release]; + [super dealloc]; } @end From cdc7c80a6ae6c696048c0e69b414c49edd81f7b3 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 6 Mar 2012 14:20:32 +0100 Subject: [PATCH 19/26] User cannot start a SIP call if a GSM call exists --- Classes/LinphoneUI/UICallButton.m | 15 +++++++++++++++ linphone.xcodeproj/project.pbxproj | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index 58ddac124..8ab033b6d 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -19,6 +19,7 @@ #import "UICallButton.h" #import "LinphoneManager.h" +#import "CoreTelephony/CTCallCenter.h" @implementation UICallButton @@ -33,6 +34,20 @@ [error release]; return; } + + CTCallCenter* ct = [[CTCallCenter alloc] init]; + if ([ct.currentCalls count] > 0) { + ms_error("GSM call in progress, cancelling outgoing SIP call request"); + UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil) + message:NSLocalizedString(@"Please terminate GSM call",nil) + delegate:nil + cancelButtonTitle:NSLocalizedString(@"Continue",nil) + otherButtonTitles:nil]; + [error show]; + [error release]; + return; + } + if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) { LinphoneProxyConfig* proxyCfg; //get default proxy diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 248799e19..43720f891 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -216,6 +216,8 @@ 22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; }; 22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; }; 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 340751971506459A00B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; }; + 34075199150645A300B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; }; 340A75B014C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */; }; 340A75B114C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */; }; 3418843714C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */; }; @@ -611,6 +613,7 @@ 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = ""; }; + 340751961506459A00B89C47 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ConferenceCallDetailView-ipad.xib"; sourceTree = ""; }; 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = nowebcamCIF.jpg; path = submodules/linphone/mediastreamer2/src/nowebcamCIF.jpg; sourceTree = ""; }; 3418844514C6CAD300EA48C7 /* StatusSubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatusSubViewController.h; sourceTree = ""; }; @@ -653,6 +656,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 340751971506459A00B89C47 /* CoreTelephony.framework in Frameworks */, 226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */, 226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */, 344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */, @@ -705,6 +709,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 34075199150645A300B89C47 /* CoreTelephony.framework in Frameworks */, 22D8F15B147548E2008C97DB /* libvpx.a in Frameworks */, 22D8F15C147548E2008C97DB /* QuartzCore.framework in Frameworks */, 22D8F15D147548E2008C97DB /* OpenGLES.framework in Frameworks */, @@ -1116,6 +1121,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 340751961506459A00B89C47 /* CoreTelephony.framework */, 226CDADD14E2D0B800513B67 /* libbcg729.a */, 226CDADE14E2D0B800513B67 /* libmsbcg729.a */, 344ABDEF14850AE9007420B6 /* libc++.1.dylib */, From 37dd2841ddbf252b8a6688345b47ca90aa70a89b Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 6 Mar 2012 17:05:45 +0100 Subject: [PATCH 20/26] Forbid SIP calls if GSM call is active --- Classes/LinphoneAppDelegate.m | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index d84fa8dd9..08ab9de54 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -22,6 +22,9 @@ #import "ContactPickerDelegate.h" #import "AddressBook/ABPerson.h" +#import "CoreTelephony/CTCallCenter.h" +#import "CoreTelephony/CTCall.h" + #import "ConsoleViewController.h" #import "MoreViewController.h" #include "CallHistoryTableViewController.h" @@ -175,9 +178,44 @@ int __aeabi_idiv(int a, int b) { [[LinphoneManager instance] setCallDelegate:myPhoneViewController]; [[LinphoneManager instance] startLibLinphone]; - + [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound]; - + + UIDevice* device = [UIDevice currentDevice]; + BOOL backgroundSupported = false; + if ([device respondsToSelector:@selector(isMultitaskingSupported)]){ + backgroundSupported = device.multitaskingSupported; + } + if(backgroundSupported){ + [[LinphoneManager instance] kickOffBackgroundTCPConnection]; + NSLog(@"We are using my method"); + } + + CTCallCenter* ct = [[CTCallCenter alloc] init]; + ct.callEventHandler = ^(CTCall* call) { + @synchronized([LinphoneManager instance]) { + if (call.callState == CTCallStateDisconnected) { + NSLog(@"GSM call disconnected"); + if ([ct.currentCalls count] > 0) { + NSLog(@"There are still some ongoing GSM call: disable SIP calls"); + linphone_core_set_max_calls([LinphoneManager getLc], 0); + } else { + NSLog(@"Re-enabling SIP calls"); + linphone_core_set_max_calls([LinphoneManager getLc], 3); + } + } else { + NSLog(@"GSM call existing"); + /* pause current call, if any */ + LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); + if (call) { + NSLog(@"Pausing SIP call"); + linphone_core_pause_call([LinphoneManager getLc], call); + } + NSLog(@"Disabling SIP calls"); + linphone_core_set_max_calls([LinphoneManager getLc], 0); + } + } + }; return YES; } From 579a7d89726bdcb0b4be22479bae44e0d75e0103 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 7 Mar 2012 11:39:31 +0100 Subject: [PATCH 21/26] Fix warnings --- Classes/LinphoneAppDelegate.m | 13 ++----------- Classes/LinphoneUI/LinphoneManager.m | 1 + Classes/LinphoneUI/UICallButton.m | 2 ++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 08ab9de54..eaaa51ece 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -119,7 +119,8 @@ int __aeabi_idiv(int a, int b) { #endif #ifdef HAVE_G729 @"YES",@"g729_preference", // enable amr by default if compiled with -#endif @"NO",@"debugenable_preference", +#endif + @"NO",@"debugenable_preference", //@"+33",@"countrycode_preference", nil]; @@ -181,16 +182,6 @@ int __aeabi_idiv(int a, int b) { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound]; - UIDevice* device = [UIDevice currentDevice]; - BOOL backgroundSupported = false; - if ([device respondsToSelector:@selector(isMultitaskingSupported)]){ - backgroundSupported = device.multitaskingSupported; - } - if(backgroundSupported){ - [[LinphoneManager instance] kickOffBackgroundTCPConnection]; - NSLog(@"We are using my method"); - } - CTCallCenter* ct = [[CTCallCenter alloc] init]; ct.callEventHandler = ^(CTCall* call) { @synchronized([LinphoneManager instance]) { diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 295aa96c0..c4d073c6a 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -362,6 +362,7 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin cancelButtonTitle:NSLocalizedString(@"Continue",nil) otherButtonTitles:nil ,nil]; [error show]; + [error release]; } } diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index 8ab033b6d..9b1fbf68d 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -45,8 +45,10 @@ otherButtonTitles:nil]; [error show]; [error release]; + [ct release]; return; } + [ct release]; if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) { LinphoneProxyConfig* proxyCfg; From b864902567dc7b72dc39d0dd21e792e0f5d807fb Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 7 Mar 2012 11:51:37 +0100 Subject: [PATCH 22/26] Fix linker error __divsi3 for i386 --- Classes/LinphoneAppDelegate.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index eaaa51ece..bea3ed987 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -32,7 +32,7 @@ #include "LinphoneManager.h" #include "linphonecore.h" -#if __clang__ && TARGET_OS_IPHONE +#if __clang__ && __arm__ extern int __divsi3(int a, int b); int __aeabi_idiv(int a, int b) { return __divsi3(a,b); From c4d938d1fb809ec3e3cc0117d7097ee3e5af1bc4 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 7 Mar 2012 15:43:59 +0100 Subject: [PATCH 23/26] Fix ipad video layout --- Classes/VideoViewController-ipad.xib | 45 +++++++++++++++------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/Classes/VideoViewController-ipad.xib b/Classes/VideoViewController-ipad.xib index 6aee67bb2..01b0daa4c 100644 --- a/Classes/VideoViewController-ipad.xib +++ b/Classes/VideoViewController-ipad.xib @@ -35,9 +35,10 @@ 274 - {768, 1004} + {768, 1024} + 4 MAA @@ -51,10 +52,10 @@ 292 - {{-9, 0}, {777, 1004}} + {768, 1024} - + _NS:569 NO IBIPadFramework @@ -62,7 +63,7 @@ 292 - {{329, 942}, {108, 62}} + {{329, 962}, {108, 62}} @@ -105,7 +106,7 @@ 292 - {{223, 942}, {108, 62}} + {{223, 962}, {108, 62}} @@ -126,9 +127,10 @@ 292 - {{598, 779}, {170, 225}} + {{598, 799}, {170, 225}} + 3 MQA @@ -141,7 +143,7 @@ 292 - {{436, 942}, {108, 62}} + {{436, 962}, {108, 62}} @@ -164,15 +166,16 @@ 292 - {{20, 956}, {28, 28}} + {{20, 976}, {28, 28}} + _NS:567 NO IBIPadFramework - {768, 1004} + {768, 1024} @@ -190,7 +193,7 @@ 292 - {1004, 768} + {1024, 768} @@ -201,7 +204,7 @@ 292 - {{779, 598}, {225, 170}} + {{799, 598}, {225, 170}} @@ -214,7 +217,7 @@ 292 - {{341, 706}, {108, 62}} + {{351, 706}, {108, 62}} @@ -235,7 +238,7 @@ 292 - {{448, 706}, {108, 62}} + {{458, 706}, {108, 62}} @@ -257,7 +260,7 @@ 292 - {{555, 706}, {108, 62}} + {{565, 706}, {108, 62}} @@ -288,7 +291,7 @@ IBIPadFramework - {1004, 768} + {1024, 768} @@ -310,7 +313,7 @@ 292 - {1004, 768} + {1024, 768} @@ -321,7 +324,7 @@ 292 - {{779, 598}, {225, 170}} + {{799, 598}, {225, 170}} @@ -334,7 +337,7 @@ 292 - {{341, 706}, {108, 62}} + {{351, 706}, {108, 62}} @@ -355,7 +358,7 @@ 292 - {{448, 706}, {108, 62}} + {{458, 706}, {108, 62}} @@ -377,7 +380,7 @@ 292 - {{555, 706}, {108, 62}} + {{565, 706}, {108, 62}} @@ -408,7 +411,7 @@ IBIPadFramework - {1004, 768} + {1024, 768} From ddd82ee25358fe2bb1ba8757636a3c39dd96eefa Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 8 Mar 2012 11:07:55 +0100 Subject: [PATCH 24/26] Better handling of GSM call (with or without bg mode enabled) --- Classes/LinphoneAppDelegate.h | 4 +- Classes/LinphoneAppDelegate.m | 71 ++++++++++++++++++---------- Classes/LinphoneUI/LinphoneManager.h | 2 +- Classes/LinphoneUI/LinphoneManager.m | 10 ++-- Classes/StatusSubViewController.m | 2 +- Classes/StatusSubViewController.xib | 6 +-- 6 files changed, 60 insertions(+), 35 deletions(-) diff --git a/Classes/LinphoneAppDelegate.h b/Classes/LinphoneAppDelegate.h index 0de437353..cf01f937c 100644 --- a/Classes/LinphoneAppDelegate.h +++ b/Classes/LinphoneAppDelegate.h @@ -20,6 +20,7 @@ #import #import +#import "CoreTelephony/CTCallCenter.h" #define DIALER_TAB_INDEX 1 #define CONTACTS_TAB_INDEX 2 @@ -39,7 +40,8 @@ IBOutlet PhoneViewController* myPhoneViewController; CallHistoryTableViewController* myCallHistoryTableViewController; ContactPickerDelegate* myContactPickerDelegate; - + + CTCallCenter* callCenter; } @property (nonatomic, retain) IBOutlet UIWindow *window; diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index bea3ed987..8cbd45e2c 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -46,6 +46,24 @@ int __aeabi_idiv(int a, int b) { @synthesize myPeoplePickerController; @synthesize myPhoneViewController; +-(void) handleGSMCallInteration: (id) cCenter { + CTCallCenter* ct = (CTCallCenter*) cCenter; + + int callCount = [ct.currentCalls count]; + if (!callCount) { + NSLog(@"No GSM call -> enabling SIP calls"); + linphone_core_set_max_calls([LinphoneManager getLc], 3); + } else { + NSLog(@"%d GSM call(s) -> disabling SIP calls", callCount); + /* pause current call, if any */ + LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); + if (call) { + NSLog(@"Pausing SIP call"); + linphone_core_pause_call([LinphoneManager getLc], call); + } + linphone_core_set_max_calls([LinphoneManager getLc], 0); + } +} -(void)applicationWillResignActive:(UIApplication *)application { LinphoneCore* lc = [LinphoneManager getLc]; @@ -65,11 +83,31 @@ int __aeabi_idiv(int a, int b) { } - (void)applicationDidEnterBackground:(UIApplication *)application { - [[LinphoneManager instance] enterBackgroundMode]; + if (![[LinphoneManager instance] enterBackgroundMode]) { + // destroying eventHandler if app cannot go in background. + // Otherwise if a GSM call happen and Linphone is resumed, + // the handler will be called before LinphoneCore is built. + // Then handler will be restored in appDidBecomeActive cb + callCenter.callEventHandler = nil; + [callCenter release]; + callCenter = nil; + } } - (void)applicationDidBecomeActive:(UIApplication *)application { [[LinphoneManager instance] becomeActive]; + if (callCenter == nil) { + callCenter = [[CTCallCenter alloc] init]; + callCenter.callEventHandler = ^(CTCall* call) { + // post on main thread + [self performSelectorOnMainThread:@selector(handleGSMCallInteration:) + withObject:callCenter + waitUntilDone:YES]; + }; + } + // check call state at startup + [self handleGSMCallInteration:callCenter]; + LinphoneCore* lc = [LinphoneManager getLc]; LinphoneCall* call = linphone_core_get_current_call(lc); if (call == NULL) @@ -130,6 +168,7 @@ int __aeabi_idiv(int a, int b) { [[NSUserDefaults standardUserDefaults] synchronize]; } + - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ /* @@ -182,30 +221,12 @@ int __aeabi_idiv(int a, int b) { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound]; - CTCallCenter* ct = [[CTCallCenter alloc] init]; - ct.callEventHandler = ^(CTCall* call) { - @synchronized([LinphoneManager instance]) { - if (call.callState == CTCallStateDisconnected) { - NSLog(@"GSM call disconnected"); - if ([ct.currentCalls count] > 0) { - NSLog(@"There are still some ongoing GSM call: disable SIP calls"); - linphone_core_set_max_calls([LinphoneManager getLc], 0); - } else { - NSLog(@"Re-enabling SIP calls"); - linphone_core_set_max_calls([LinphoneManager getLc], 3); - } - } else { - NSLog(@"GSM call existing"); - /* pause current call, if any */ - LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); - if (call) { - NSLog(@"Pausing SIP call"); - linphone_core_pause_call([LinphoneManager getLc], call); - } - NSLog(@"Disabling SIP calls"); - linphone_core_set_max_calls([LinphoneManager getLc], 0); - } - } + callCenter = [[CTCallCenter alloc] init]; + callCenter.callEventHandler = ^(CTCall* call) { + // post on main thread + [self performSelectorOnMainThread:@selector(handleGSMCallInteration:) + withObject:callCenter + waitUntilDone:YES]; }; return YES; } diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index 95aaa8d60..d31962ddb 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -69,7 +69,7 @@ typedef struct _CallContext { -(BOOL) isNotIphone3G; -(void) destroyLibLinphone; --(void) enterBackgroundMode; +-(BOOL) enterBackgroundMode; -(void) becomeActive; -(void) kickOffNetworkConnection; -(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index c4d073c6a..beef0ac13 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -693,6 +693,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach AVAudioSession *audioSession = [AVAudioSession sharedInstance]; [audioSession setDelegate:nil]; if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization + NSLog(@"Destroy linphonecore"); linphone_core_destroy(theLinphoneCore); theLinphoneCore = nil; SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); @@ -704,7 +705,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } //**********************BG mode management*************************/////////// --(void) enterBackgroundMode { +-(BOOL) enterBackgroundMode { LinphoneProxyConfig* proxyCfg; linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg); linphone_core_stop_dtmf_stream(theLinphoneCore); @@ -744,11 +745,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) { ms_error("cannot get current transport"); } - + return YES; } else { ms_warning("Entering lite bg mode"); [self destroyLibLinphone]; + return NO; } } @@ -802,6 +804,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach #endif /* Initialize linphone core*/ + NSLog(@"Create linphonecore"); theLinphoneCore = linphone_core_new (&linphonec_vtable , [confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]] , [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]] @@ -891,13 +894,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } -(void) becomeActive { - if (theLinphoneCore == nil) { //back from standby and background mode is disabled [self startLibLinphone]; } else { if (![self reconfigureLinphoneIfNeeded:currentSettings]) { - ms_message("becomming active with no config modification, make sure we are registered"); + ms_message("becoming active with no config modification, make sure we are registered"); linphone_core_refresh_registers(theLinphoneCore);//just to make sure REGISTRATION is up to date } diff --git a/Classes/StatusSubViewController.m b/Classes/StatusSubViewController.m index e0d1cadcb..f1eaa2423 100644 --- a/Classes/StatusSubViewController.m +++ b/Classes/StatusSubViewController.m @@ -60,7 +60,7 @@ } -(BOOL) updateWithRegistrationState:(LinphoneRegistrationState)state message:(NSString*) message { - + label.hidden = NO; switch(state) { case LinphoneRegistrationCleared: image.hidden = NO; diff --git a/Classes/StatusSubViewController.xib b/Classes/StatusSubViewController.xib index d93f8f7f6..9ce474c3b 100644 --- a/Classes/StatusSubViewController.xib +++ b/Classes/StatusSubViewController.xib @@ -39,7 +39,7 @@ - 292 + -2147483356 {{0, -1}, {25, 23}} @@ -66,7 +66,7 @@ - 292 + -2147483356 {{28, 0}, {280, 21}} @@ -76,7 +76,7 @@ 7 NO IBCocoaTouchFramework - No SIP account defined + CARAMBA 3 MC42NjY2NjY2NjY3AA From bf174fe05adbdbcd303afed307d9efb52912e42e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 9 Mar 2012 22:05:04 +0100 Subject: [PATCH 25/26] update README and config site to work with Xcode 4.3 --- README | 6 ++++-- submodules/build/iphone-config.site | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README b/README index b2deec6fc..4f0900f9d 100644 --- a/README +++ b/README @@ -25,8 +25,10 @@ Link macport libtoolize to glibtoolize Link host's strings to simulator SDK - $ ln -s /usr/bin/strings /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings - + For Xcode prior to 4.3: + $ sudo ln -s /usr/bin/strings /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings + For newer XCode: + $ sudo ln -s /usr/bin/strings /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings BUILDING THE SDK diff --git a/submodules/build/iphone-config.site b/submodules/build/iphone-config.site index c4c7840a8..4256d17ed 100644 --- a/submodules/build/iphone-config.site +++ b/submodules/build/iphone-config.site @@ -24,8 +24,15 @@ else fi echo "Loading config.site for iPhone platform=${PLATFORM} version=${SDK_VERSION}" -SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*` -SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin +#new path with Xcode 4.3: +if test -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs ; then + SDK_PATH_LIST=`ls -drt /Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*` + SDK_BIN_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin +else + SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*` + SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin +fi + for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ; echo "Selecting SDK path = ${SYSROOT_PATH}" COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS" From 447556710dee76dd217bab4f2210c403268328bb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 13 Mar 2012 23:30:16 +0100 Subject: [PATCH 26/26] port to Xcode 4.3 (libvpx patch added) --- submodules/build/builders.d/libvpx.mk | 9 +++-- submodules/build/builders.d/libvpx.patch | 42 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 submodules/build/builders.d/libvpx.patch diff --git a/submodules/build/builders.d/libvpx.mk b/submodules/build/builders.d/libvpx.mk index f1acb950c..13e0aa62b 100644 --- a/submodules/build/builders.d/libvpx.mk +++ b/submodules/build/builders.d/libvpx.mk @@ -13,11 +13,16 @@ else endif libvpx_dir?=externals/libvpx -$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: +$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp: + cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \ + && git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \ + && touch $@ + +$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir) cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \ && host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \ - && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options) + && SYSROOT_PATH=$$SYSROOT_PATH SDK_BIN_PATH=$$SDK_BIN_PATH $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options) build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install diff --git a/submodules/build/builders.d/libvpx.patch b/submodules/build/builders.d/libvpx.patch new file mode 100644 index 000000000..390ec4ecf --- /dev/null +++ b/submodules/build/builders.d/libvpx.patch @@ -0,0 +1,42 @@ +diff --git a/build/make/configure.sh b/build/make/configure.sh +index 0426f92..24fa04e 100755 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -624,6 +624,9 @@ process_common_toolchain() { + if [ -d "/Developer/SDKs/MacOSX10.7.sdk" ]; then + osx_sdk_dir="/Developer/SDKs/MacOSX10.7.sdk" + fi ++ if test -n "$SYSROOT_PATH" ; then ++ osx_sdk_dir=$SYSROOT_PATH ++ fi + + case ${toolchain} in + *-darwin8-*) +@@ -743,6 +746,14 @@ process_common_toolchain() { + darwin*) + SDK_PATH=/Developer/Platforms/iPhoneOS.platform/Developer + TOOLCHAIN_PATH=${SDK_PATH}/usr/bin ++ if test -n "$SYSROOT_PATH" ; then ++ SDK_FULL_PATH=$SYSROOT_PATH ++ else ++ SDK_FULL_PATH="${SDK_PATH}/SDKs/iPhoneOS5.0.sdk" ++ fi ++ if test -n "$SDK_BIN_PATH" ; then ++ TOOLCHAIN_PATH=$SDK_BIN_PATH ++ fi + CC=${TOOLCHAIN_PATH}/gcc + AR=${TOOLCHAIN_PATH}/ar + LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2 +@@ -759,10 +770,10 @@ process_common_toolchain() { + add_cflags -arch ${tgt_isa} + add_ldflags -arch_only ${tgt_isa} + +- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk" ++ add_cflags "-isysroot $SDK_FULL_PATH" + + # This should be overridable +- alt_libc=${SDK_PATH}/SDKs/iPhoneOS5.0.sdk ++ alt_libc=$SDK_FULL_PATH + + # Add the paths for the alternate libc + for d in usr/include; do