From 1984838e1b8015978a7b45f12887beed37530c49 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 21 Oct 2011 16:05:43 +0200 Subject: [PATCH] add silk support --- Classes/LinphoneUI/LinphoneManager.m | 2 + Settings.bundle/Root.plist | 20 ++++++++++ linphone.xcodeproj/project.pbxproj | 12 ++++++ submodules/build/builder-iphone-os.mk | 6 +-- submodules/build/builders.d/silk.mk | 2 +- .../liblinphone.xcodeproj/project.pbxproj | 38 +++++++++++++++---- submodules/linphone | 2 +- 7 files changed, 70 insertions(+), 12 deletions(-) diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 5da9509be..a4fd70a2c 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -507,6 +507,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach { ms_message("SPEEX codecs deactivated"); } + [self configurePayloadType:"SILK" fromPrefKey:@"silk_24k_preference" withRate:24000]; + [self configurePayloadType:"SILK" fromPrefKey:@"silk_16k_preference" withRate:16000]; [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]; diff --git a/Settings.bundle/Root.plist b/Settings.bundle/Root.plist index 7715921d9..1975daac3 100644 --- a/Settings.bundle/Root.plist +++ b/Settings.bundle/Root.plist @@ -98,6 +98,26 @@ Type PSGroupSpecifier + + DefaultValue + + Key + silk_24k_preference + Title + Silk 24Khz + Type + PSToggleSwitchSpecifier + + + DefaultValue + + Key + speex_16k_preference + Title + Silk 16Khz + Type + PSToggleSwitchSpecifier + DefaultValue diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index db84d1971..73c66fb1b 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -1047,6 +1047,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; @@ -1114,6 +1118,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); CODE_SIGN_ENTITLEMENTS = untitled.plist; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = NO; @@ -1182,6 +1190,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); CODE_SIGN_ENTITLEMENTS = untitled.plist; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = NO; diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 729fc4c44..3925cd2fe 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -92,13 +92,13 @@ init: veryclean: veryclean-linphone rm -rf $(BUILDER_BUILD_DIR) -.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_BUILD_DIR)/Makefile +.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm build-silk $(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 -clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr +clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr clean-silk cd $(LINPHONE_BUILD_DIR) && make clean -veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr +veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-silk #-cd $(LINPHONE_BUILD_DIR) && make distclean -cd $(LINPHONE_SRC_DIR) && rm -f configure diff --git a/submodules/build/builders.d/silk.mk b/submodules/build/builders.d/silk.mk index 348fcbb54..1ea9e7d03 100644 --- a/submodules/build/builders.d/silk.mk +++ b/submodules/build/builders.d/silk.mk @@ -43,7 +43,7 @@ $(SILK_BUILD_DIR)/Makefile: build-silk: $(SILK_BUILD_DIR)/Makefile cd $(SILK_BUILD_DIR) && host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \ - && make all TOOLCHAIN_PREFIX=$$SDK_BIN_PATH/ CXX="$$CXX" CC="$$CC -mno-thumb -falign-functions=4" LD="$$LD" $(make_options) ADDED_DEFINES+=IPHONE \ + && make all TOOLCHAIN_PREFIX=$$SDK_BIN_PATH/ CXX="$$CXX" CC="$$CC -mno-thumb -g" LD="$$LD" $(make_options) ADDED_DEFINES+=IPHONE \ && mkdir -p $(prefix)/include/silk \ && cp -f $(SILK_BUILD_DIR)/interface/* $(prefix)/include/silk \ && cp -f lib*.a $(prefix)/lib diff --git a/submodules/liblinphone.xcodeproj/project.pbxproj b/submodules/liblinphone.xcodeproj/project.pbxproj index e1c5e06cd..8eca5e9de 100644 --- a/submodules/liblinphone.xcodeproj/project.pbxproj +++ b/submodules/liblinphone.xcodeproj/project.pbxproj @@ -97,7 +97,6 @@ 222CA6FB11F6CF9F00621220 /* rtpsession.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6AE11F6CF9F00621220 /* rtpsession.h */; }; 222CA6FC11F6CF9F00621220 /* rtpsignaltable.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6AF11F6CF9F00621220 /* rtpsignaltable.h */; }; 222CA6FD11F6CF9F00621220 /* sessionset.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6B011F6CF9F00621220 /* sessionset.h */; }; - 222CA6FE11F6CF9F00621220 /* srtp.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6B111F6CF9F00621220 /* srtp.h */; }; 222CA6FF11F6CF9F00621220 /* str_utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6B211F6CF9F00621220 /* str_utils.h */; }; 222CA70011F6CF9F00621220 /* stun.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6B311F6CF9F00621220 /* stun.h */; }; 222CA70111F6CF9F00621220 /* stun_udp.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA6B411F6CF9F00621220 /* stun_udp.h */; }; @@ -163,6 +162,7 @@ 225AA2E1144F1C6600BA809B /* bitratedriver.c in Sources */ = {isa = PBXBuildFile; fileRef = 225AA2E0144F1C6600BA809B /* bitratedriver.c */; }; 225AA2E3144F1E3400BA809B /* qosanalyzer.c in Sources */ = {isa = PBXBuildFile; fileRef = 225AA2E2144F1E3400BA809B /* qosanalyzer.c */; }; 225AA2E5144F2E0200BA809B /* msprivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 225AA2E4144F2E0200BA809B /* msprivate.h */; }; + 225AA2FD1451A95400BA809B /* conference.c in Sources */ = {isa = PBXBuildFile; fileRef = 225AA2FC1451A95400BA809B /* conference.c */; }; 225D355A124B1FF60008581C /* linphonecall.c in Sources */ = {isa = PBXBuildFile; fileRef = 225D3559124B1FF60008581C /* linphonecall.c */; }; 229A614D13DDFE3500090183 /* g722_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 229A614913DDFE3500090183 /* g722_decode.c */; }; 229A614E13DDFE3500090183 /* g722_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = 229A614A13DDFE3500090183 /* g722_encode.c */; }; @@ -315,7 +315,6 @@ 222CA6AE11F6CF9F00621220 /* rtpsession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rtpsession.h; sourceTree = ""; }; 222CA6AF11F6CF9F00621220 /* rtpsignaltable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rtpsignaltable.h; sourceTree = ""; }; 222CA6B011F6CF9F00621220 /* sessionset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sessionset.h; sourceTree = ""; }; - 222CA6B111F6CF9F00621220 /* srtp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = srtp.h; sourceTree = ""; }; 222CA6B211F6CF9F00621220 /* str_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = str_utils.h; sourceTree = ""; }; 222CA6B311F6CF9F00621220 /* stun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stun.h; sourceTree = ""; }; 222CA6B411F6CF9F00621220 /* stun_udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stun_udp.h; sourceTree = ""; }; @@ -392,6 +391,7 @@ 225AA2E0144F1C6600BA809B /* bitratedriver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitratedriver.c; sourceTree = ""; }; 225AA2E2144F1E3400BA809B /* qosanalyzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = qosanalyzer.c; sourceTree = ""; }; 225AA2E4144F2E0200BA809B /* msprivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = msprivate.h; sourceTree = ""; }; + 225AA2FC1451A95400BA809B /* conference.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = conference.c; sourceTree = ""; }; 225D3559124B1FF60008581C /* linphonecall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = linphonecall.c; sourceTree = ""; }; 229A614913DDFE3500090183 /* g722_decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = g722_decode.c; sourceTree = ""; }; 229A614A13DDFE3500090183 /* g722_encode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = g722_encode.c; sourceTree = ""; }; @@ -693,7 +693,6 @@ 222CA6AE11F6CF9F00621220 /* rtpsession.h */, 222CA6AF11F6CF9F00621220 /* rtpsignaltable.h */, 222CA6B011F6CF9F00621220 /* sessionset.h */, - 222CA6B111F6CF9F00621220 /* srtp.h */, 222CA6B211F6CF9F00621220 /* str_utils.h */, 222CA6B311F6CF9F00621220 /* stun.h */, 222CA6B411F6CF9F00621220 /* stun_udp.h */, @@ -746,6 +745,7 @@ 222CA72D11F6CFB100621220 /* coreapi */ = { isa = PBXGroup; children = ( + 225AA2FC1451A95400BA809B /* conference.c */, 229B9D5813043EAB00EFCD1C /* linphonecore_utils.h */, 225D3559124B1FF60008581C /* linphonecall.c */, 22A10EE711F8920F00373793 /* mswebcam.c */, @@ -909,7 +909,6 @@ 222CA6FB11F6CF9F00621220 /* rtpsession.h in Headers */, 222CA6FC11F6CF9F00621220 /* rtpsignaltable.h in Headers */, 222CA6FD11F6CF9F00621220 /* sessionset.h in Headers */, - 222CA6FE11F6CF9F00621220 /* srtp.h in Headers */, 222CA6FF11F6CF9F00621220 /* str_utils.h in Headers */, 222CA70011F6CF9F00621220 /* stun.h in Headers */, 222CA70111F6CF9F00621220 /* stun_udp.h in Headers */, @@ -1125,6 +1124,7 @@ 225AA2DD144F077700BA809B /* silk_enc.c in Sources */, 225AA2E1144F1C6600BA809B /* bitratedriver.c in Sources */, 225AA2E3144F1E3400BA809B /* qosanalyzer.c in Sources */, + 225AA2FD1451A95400BA809B /* conference.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1170,7 +1170,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); COPY_PHASE_STRIP = NO; DSTROOT = /tmp/liblinphone.dst; GCC_DYNAMIC_NO_PIC = NO; @@ -1212,6 +1215,7 @@ "../liblinphone-sdk/apple-darwin/include/silk", ); INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 3.1; PRODUCT_NAME = linphone; }; name = Debug; @@ -1220,7 +1224,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); DSTROOT = /tmp/liblinphone.dst; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1258,6 +1265,7 @@ "../liblinphone-sdk/apple-darwin/include/silk", ); INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 3.1; PRODUCT_NAME = linphone; }; name = Release; @@ -1392,7 +1400,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); DSTROOT = /tmp/liblinphone.dst; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1430,6 +1441,7 @@ "../liblinphone-sdk/apple-darwin/include/silk", ); INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 3.1; PRODUCT_NAME = linphone; }; name = DistributionAdhoc; @@ -1438,6 +1450,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1483,6 +1499,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1527,6 +1547,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + "$(ARCHS_STANDARD_32_BIT)", + armv6, + ); "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; diff --git a/submodules/linphone b/submodules/linphone index 973953df0..64a23f9b6 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 973953df07d1c435bd738024400e0ab4603a4fba +Subproject commit 64a23f9b67cab8aa0f4cac22211722d1fa9e3716