From 63f5fa805eff2cc4c6e09ed9e1383ef92c5984f9 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 15 Jul 2015 12:10:38 +0200 Subject: [PATCH] iSAC: readd build support with CMake but this is disabled by default --- Classes/LinphoneManager.m | 10 +++++++--- Settings/InAppSettings.bundle/Audio.plist | 10 ++++++++++ linphone.xcodeproj/project.pbxproj | 12 ++++++++++-- submodules/cmake-builder | 2 +- submodules/mswebrtc | 2 +- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 3a2eb08ad..be025c8d8 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -79,6 +79,7 @@ extern void libmsx264_init(void); extern void libmsopenh264_init(void); extern void libmssilk_init(void); extern void libmsbcg729_init(void); +extern void libmswebrtc_init(void); #define FRONT_CAM_NAME \ "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1" /*"AV Capture: Front Camera"*/ @@ -138,6 +139,7 @@ struct codec_name_pref_table codec_pref_table[] = {{"speex", 8000, "speex_8k_pre {"amr", 8000, "amr_preference"}, {"gsm", 8000, "gsm_preference"}, {"ilbc", 8000, "ilbc_preference"}, + {"isac", 16000, "isac_preference"}, {"pcmu", 8000, "pcmu_preference"}, {"pcma", 8000, "pcma_preference"}, {"g722", 8000, "g722_preference"}, @@ -1418,8 +1420,9 @@ static BOOL libStarted = FALSE; LOGI(@"linphonecore is already created"); return; } + linphone_core_set_log_collection_path([[LinphoneManager cacheDirectory] UTF8String]); + [self setLogsEnabled:[self lpConfigBoolForKey:@"debugenable_preference"]]; LOGI(@"Create linphonecore"); - connectivity = none; ms_init(); // Need to initialize mediastreamer2 before loading the plugins @@ -1442,8 +1445,9 @@ static BOOL libStarted = FALSE; libmsbcg729_init(); // load g729 plugin #endif - linphone_core_set_log_collection_path([[LinphoneManager cacheDirectory] UTF8String]); - [self setLogsEnabled:[self lpConfigBoolForKey:@"debugenable_preference"]]; +#ifdef HAVE_WEBRTC + libmswebrtc_init(); +#endif theLinphoneCore = linphone_core_new_with_config(&linphonec_vtable, configDb, (__bridge void *)(self) /* user_data */); diff --git a/Settings/InAppSettings.bundle/Audio.plist b/Settings/InAppSettings.bundle/Audio.plist index e61a70df2..3dcf3a293 100644 --- a/Settings/InAppSettings.bundle/Audio.plist +++ b/Settings/InAppSettings.bundle/Audio.plist @@ -162,6 +162,16 @@ Type PSToggleSwitchSpecifier + + DefaultValue + + Key + isac_preference + Title + iSAC + Type + PSToggleSwitchSpecifier + DefaultValue diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index d3ef6d85f..276a7d458 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -168,6 +168,7 @@ 63D2680F1B174A5E00A2CC11 /* numpad_one_voicemail_default.png in Resources */ = {isa = PBXBuildFile; fileRef = 63D2680D1B174A5E00A2CC11 /* numpad_one_voicemail_default.png */; }; 63D268101B174A5E00A2CC11 /* numpad_one_voicemail_over.png in Resources */ = {isa = PBXBuildFile; fileRef = 63D2680E1B174A5E00A2CC11 /* numpad_one_voicemail_over.png */; }; 63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E59A3E1ADE70D900646FB3 /* InAppProductsManager.m */; }; + 63EA4C951B50189D00922857 /* libmswebrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63EA4C941B50189D00922857 /* libmswebrtc.a */; }; 63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63FB30341A680E73008CA393 /* UIRoundedImageView.m */; }; 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; }; 7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; }; @@ -1099,6 +1100,7 @@ 63D2680E1B174A5E00A2CC11 /* numpad_one_voicemail_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = numpad_one_voicemail_over.png; path = Resources/numpad_one_voicemail_over.png; sourceTree = ""; }; 63E59A3D1ADE6ECB00646FB3 /* InAppProductsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppProductsManager.h; sourceTree = ""; }; 63E59A3E1ADE70D900646FB3 /* InAppProductsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppProductsManager.m; sourceTree = ""; }; + 63EA4C941B50189D00922857 /* libmswebrtc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmswebrtc.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmswebrtc.a"; sourceTree = ""; }; 63EF7FDC1A24B5810017A416 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/AboutViewController.strings; sourceTree = ""; }; 63FB30331A680E73008CA393 /* UIRoundedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRoundedImageView.h; sourceTree = ""; }; 63FB30341A680E73008CA393 /* UIRoundedImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIRoundedImageView.m; sourceTree = ""; }; @@ -1721,7 +1723,7 @@ F070E6321A2622EC00E17AFD /* incall_padding_right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = incall_padding_right.png; path = Resources/incall_padding_right.png; sourceTree = ""; }; F088488C19FF8C41007FFCF3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIContactCell.xib; sourceTree = ""; }; F088488F19FF8C44007FFCF3 /* fr */ = {isa = PBXFileReference; fileEncoding = 2483028224; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UIContactCell.strings; sourceTree = ""; }; - F08F118419C09C6A007D70C2 /* liblinphoneTester Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "liblinphoneTester Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + F08F118419C09C6A007D70C2 /* liblinphoneTester Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "liblinphoneTester Tests.xctest"; path = liblinphoneTesterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F0938158188E629800A55DFA /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; path = iTunesArtwork; sourceTree = ""; }; F09548181883F15300E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ChatRoomViewController.xib; sourceTree = ""; }; F09548191883F15300E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ChatViewController.xib; sourceTree = ""; }; @@ -1851,7 +1853,7 @@ F0C1F90A1A28781F009402C9 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; F0C1F90B1A28781F009402C9 /* strech-bottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "strech-bottom.png"; sourceTree = ""; }; F0C1F90C1A28781F009402C9 /* strech-top.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "strech-top.png"; sourceTree = ""; }; - F0F952001A6AEB1000254160 /* linphone Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "linphone Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + F0F952001A6AEB1000254160 /* linphone Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "linphone Tests.xctest"; path = linphoneTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F0FF66AA1ACAEEB0008A4486 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = ../../../../Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; F84015BC1939FE37006ABAB5 /* test_failed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = test_failed.png; path = Resources/test_failed.png; sourceTree = ""; }; F84015BD1939FE37006ABAB5 /* test_inprogress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = test_inprogress.png; path = Resources/test_inprogress.png; sourceTree = ""; }; @@ -1864,6 +1866,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 63EA4C951B50189D00922857 /* libmswebrtc.a in Frameworks */, 63A4280A1B26F576000DAB93 /* libSKP_SILK_SDK.a in Frameworks */, 152F22361B15E889008C0621 /* libxml2.dylib in Frameworks */, 152F22341B15E83B008C0621 /* libilbcrfc3951.a in Frameworks */, @@ -2248,6 +2251,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 63EA4C941B50189D00922857 /* libmswebrtc.a */, 63158FAC1B468E0E00969917 /* ImageOptim.sh */, 152F22351B15E889008C0621 /* libxml2.dylib */, 152F22331B15E83B008C0621 /* libilbcrfc3951.a */, @@ -4575,6 +4579,7 @@ "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib", "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib", + "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", ); LINK_WITH_STANDARD_LIBRARIES = YES; ORDER_FILE = ""; @@ -4663,6 +4668,7 @@ "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib", "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib", + "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", ); LINK_WITH_STANDARD_LIBRARIES = YES; ORDER_FILE = ""; @@ -4750,6 +4756,7 @@ "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib", "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib", + "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", ); LINK_WITH_STANDARD_LIBRARIES = YES; ORDER_FILE = ""; @@ -4837,6 +4844,7 @@ "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", "$(SRCROOT)/liblinphone-sdk/apple-darwin/lib", "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib", + "$(PROJECT_DIR)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins", ); LINK_WITH_STANDARD_LIBRARIES = YES; ORDER_FILE = ""; diff --git a/submodules/cmake-builder b/submodules/cmake-builder index 98bdac254..eff880b7d 160000 --- a/submodules/cmake-builder +++ b/submodules/cmake-builder @@ -1 +1 @@ -Subproject commit 98bdac2544adaf507a31974bf57b9f9d29589265 +Subproject commit eff880b7ddfa7b09799377c3a24cc1848fc26220 diff --git a/submodules/mswebrtc b/submodules/mswebrtc index cf25348c5..eecba24b5 160000 --- a/submodules/mswebrtc +++ b/submodules/mswebrtc @@ -1 +1 @@ -Subproject commit cf25348c55664004b3e50691db56f011f7cef319 +Subproject commit eecba24b5559c89e123991ab1f32f35649b7ebe8