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 01/11] 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 02/11] 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 03/11] 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 04/11] 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 05/11] 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 06/11] 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 07/11] 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 From 2956c3d4782594fc7b4f362c392d19426021cce2 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 20 Mar 2012 14:14:00 +0100 Subject: [PATCH 08/11] add setting for stun server --- Classes/LinphoneUI/LinphoneManager.m | 9 +++++++++ Settings.bundle/Advanced.plist | 14 ++++++++++++++ nogpl-thirdparties/Settings.bundle/Advanced.plist | 14 ++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index beef0ac13..be55db73f 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -649,6 +649,15 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"]; linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionZRTP); + + NSString* stun_server = [[NSUserDefaults standardUserDefaults] stringForKey:@"stun_preference"]; + if ([stun_server length]>0){ + linphone_core_set_stun_server(theLinphoneCore,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]); + linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyUseStun); + }else{ + linphone_core_set_stun_server(theLinphoneCore, NULL); + linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyNoFirewall); + } UIDevice* device = [UIDevice currentDevice]; bool backgroundSupported = false; diff --git a/Settings.bundle/Advanced.plist b/Settings.bundle/Advanced.plist index 4aad4e2a9..977c1c36f 100644 --- a/Settings.bundle/Advanced.plist +++ b/Settings.bundle/Advanced.plist @@ -4,6 +4,20 @@ PreferenceSpecifiers + + Key + stun_preference + Title + Stun server + Type + PSTextFieldSpecifier + AutocapitalizationType + None + AutocorrectionType + No + DefaultValue + + DefaultValue diff --git a/nogpl-thirdparties/Settings.bundle/Advanced.plist b/nogpl-thirdparties/Settings.bundle/Advanced.plist index 4aad4e2a9..c4d0b1f69 100644 --- a/nogpl-thirdparties/Settings.bundle/Advanced.plist +++ b/nogpl-thirdparties/Settings.bundle/Advanced.plist @@ -4,6 +4,20 @@ PreferenceSpecifiers + + Key + stun_preference + Title + Stun server + Type + PSTextFieldSpecifier + AutocapitalizationType + None + AutocorrectionType + No + DefaultValue + + DefaultValue From 07f25fdf6a9ffbb6ed95962f2081021e128a044f Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 20 Mar 2012 17:18:18 +0100 Subject: [PATCH 09/11] Refactor LinphoneManager and AppDelegate to allow easier customisation Conflicts: Classes/LinphoneAppDelegate.m Classes/LinphoneUI/LinphoneManager.h Classes/LinphoneUI/LinphoneManager.m --- Classes/LinphoneAppDelegate.h | 4 ++ Classes/LinphoneAppDelegate.m | 61 ++++++++++++++----------- Classes/LinphoneUI/LinphoneManager.h | 12 +++-- Classes/LinphoneUI/LinphoneManager.m | 68 ++++++++++++++++++---------- 4 files changed, 91 insertions(+), 54 deletions(-) diff --git a/Classes/LinphoneAppDelegate.h b/Classes/LinphoneAppDelegate.h index cf01f937c..f13b8cb84 100644 --- a/Classes/LinphoneAppDelegate.h +++ b/Classes/LinphoneAppDelegate.h @@ -44,6 +44,10 @@ CTCallCenter* callCenter; } +- (void) loadDefaultSettings:(NSDictionary *) appDefaults; +-(void) setupUI; +-(void) setupGSMInteraction; + @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController; @property (nonatomic, retain) ABPeoplePickerNavigationController* myPeoplePickerController; diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 8cbd45e2c..6e6653dbc 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -125,7 +125,7 @@ int __aeabi_idiv(int a, int b) { } } -- (void) loadDefaultSettings { +- (void) loadDefaultSettings:(NSDictionary *) appDefaults { NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"]; if(!settingsBundle) { @@ -149,33 +149,15 @@ int __aeabi_idiv(int a, int b) { [defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key]; } } - - NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: - @"NO", @"enable_first_login_view_preference", // -#ifdef HAVE_AMR - @"YES",@"amr_8k_preference", // enable amr by default if compiled with -#endif -#ifdef HAVE_G729 - @"YES",@"g729_preference", // enable amr by default if compiled with -#endif - @"NO",@"debugenable_preference", - //@"+33",@"countrycode_preference", - nil]; - + [defaultsToRegister addEntriesFromDictionary:appDefaults]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister]; [defaultsToRegister release]; [[NSUserDefaults standardUserDefaults] synchronize]; - } -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ - - /* - *Custumization - */ - [self loadDefaultSettings]; - //as defined in PhoneMainView.xib +-(void) setupUI { + //as defined in PhoneMainView.xib //dialer myPhoneViewController = (PhoneViewController*) [myTabBarController.viewControllers objectAtIndex: DIALER_TAB_INDEX]; myPhoneViewController.myTabBarController = myTabBarController; @@ -217,17 +199,44 @@ int __aeabi_idiv(int a, int b) { [window makeKeyAndVisible]; [[LinphoneManager instance] setCallDelegate:myPhoneViewController]; - [[LinphoneManager instance] startLibLinphone]; - - [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound]; +} +-(void) setupGSMInteraction { callCenter = [[CTCallCenter alloc] init]; callCenter.callEventHandler = ^(CTCall* call) { // post on main thread [self performSelectorOnMainThread:@selector(handleGSMCallInteration:) withObject:callCenter waitUntilDone:YES]; - }; + }; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + @"NO", @"enable_first_login_view_preference", // +#ifdef HAVE_AMR + @"YES",@"amr_8k_preference", // enable amr by default if compiled with +#endif +#ifdef HAVE_G729 + @"YES",@"g729_preference", // enable amr by default if compiled with +#endif + //@"+33",@"countrycode_preference", + nil]; + + /* explicitely instanciate LinphoneManager */ + LinphoneManager* lm = [[LinphoneManager alloc] init]; + assert(lm == [LinphoneManager instance]); + + [self loadDefaultSettings: appDefaults]; + + [self setupUI]; + + [[LinphoneManager instance] startLibLinphone]; + + [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound]; + + [self setupGSMInteraction]; + return YES; } diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index d31962ddb..f68b7739f 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -36,10 +36,16 @@ typedef struct _CallContext { bool_t cameraIsEnabled; } CallContext; +struct NetworkReachabilityContext { + bool_t testWifi, testWWan; + void (*networkStateChanged) (Connectivity newConnectivity); +}; + + @interface LinphoneManager : NSObject { -@private - SCNetworkReachabilityContext proxyReachabilityContext; +@protected SCNetworkReachabilityRef proxyReachability; +@private NSTimer* mIterateTimer; id mLogView; bool isbackgroundModeEnabled; @@ -76,6 +82,7 @@ typedef struct _CallContext { -(UIImage*) getImageFromAddressBook:(NSString*) number; -(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings; +-(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx; @property (nonatomic, retain) id callDelegate; @property (nonatomic, retain) id registrationDelegate; @@ -84,4 +91,3 @@ typedef struct _CallContext { @property (readonly) const char* backCamId; @end - diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index be55db73f..adf367d07 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -57,14 +57,16 @@ extern void libmsbcg729_init(); @synthesize backCamId; -(id) init { + assert (!theLinphoneManager); if ((self= [super init])) { mFastAddressBook = [[FastAddressBook alloc] init]; + theLinphoneManager = self; } return self; } +(LinphoneManager*) instance { if (theLinphoneManager==nil) { - theLinphoneManager = [[LinphoneManager alloc] init]; + [[LinphoneManager alloc] init]; } return theLinphoneManager; } @@ -413,16 +415,21 @@ static LinphoneCoreVTable linphonec_vtable = { CFWriteStreamClose (writeStream); } -void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void * info) { +void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* nilCtx) { ms_message("Network connection flag [%x]",flags); - LinphoneManager* lLinphoneMgr = (LinphoneManager*)info; + LinphoneManager* lLinphoneMgr = [LinphoneManager instance]; if ([LinphoneManager getLc] != nil) { + struct NetworkReachabilityContext* ctx = nilCtx ? ((struct NetworkReachabilityContext*)nilCtx) : 0; if ((flags == 0) | (flags & (kSCNetworkReachabilityFlagsConnectionRequired |kSCNetworkReachabilityFlagsConnectionOnTraffic))) { [[LinphoneManager instance] kickOffNetworkConnection]; linphone_core_set_network_reachable([LinphoneManager getLc],false); - ((LinphoneManager*)info).connectivity = none; + lLinphoneMgr.connectivity = none; } else { - Connectivity newConnectivity = flags & kSCNetworkReachabilityFlagsIsWWAN ? wwan:wifi; + Connectivity newConnectivity; + if (!ctx || ctx->testWWan) + newConnectivity = flags & kSCNetworkReachabilityFlagsIsWWAN ? wwan:wifi; + else + newConnectivity = wifi; if (lLinphoneMgr.connectivity == none) { linphone_core_set_network_reachable([LinphoneManager getLc],true); } else if (lLinphoneMgr.connectivity != newConnectivity) { @@ -433,7 +440,9 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach lLinphoneMgr.connectivity=newConnectivity; ms_message("new network connectivity of type [%s]",(newConnectivity==wifi?"wifi":"wwan")); } - + if (ctx && ctx->networkStateChanged) { + (*ctx->networkStateChanged)(lLinphoneMgr.connectivity); + } } } @@ -649,7 +658,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"]; linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionZRTP); - + NSString* stun_server = [[NSUserDefaults standardUserDefaults] stringForKey:@"stun_preference"]; if ([stun_server length]>0){ linphone_core_set_stun_server(theLinphoneCore,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]); @@ -706,7 +715,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach linphone_core_destroy(theLinphoneCore); theLinphoneCore = nil; SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - CFRelease(proxyReachability); + if (proxyReachability) + CFRelease(proxyReachability); proxyReachability=nil; } @@ -761,7 +771,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach [self destroyLibLinphone]; return NO; } - } @@ -771,7 +780,30 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } - +-(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx { + if (proxyReachability) { + ms_message("Cancel old network reachability check"); + SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + CFRelease(proxyReachability); + proxyReachability = nil; + } + + proxyReachability = SCNetworkReachabilityCreateWithName(nil, nodeName); + + //initial state is network off should be done as soon as possible + SCNetworkReachabilityFlags flags; + if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) { + ms_error("Cannot get reachability flags"); + }; + networkReachabilityCallBack(proxyReachability, flags, ctx ? ctx->info : 0); + + if (!SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack, ctx)){ + ms_error("Cannot register reachability cb"); + }; + if(!SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)){ + ms_error("Cannot register schedule reachability cb"); + }; +} /************* @@ -823,22 +855,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]); - proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org"); - proxyReachabilityContext.info=self; - //initial state is network off should be done as soon as possible - SCNetworkReachabilityFlags flags; - if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) { - ms_error("Cannot get reachability flags"); - }; - networkReachabilityCallBack(proxyReachability,flags,self); + [self setupNetworkReachabilityCallback: "linphone.org" withContext:nil]; - if (!SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext)){ - ms_error("Cannot register reachability cb"); - }; - if(!SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)){ - ms_error("Cannot register schedule reachability cb"); - }; - [self reconfigureLinphoneIfNeeded:nil]; // start scheduler From a1f44377ae45810c7dccf19ba09cdac84f4773bb Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 22 Mar 2012 18:45:33 +0100 Subject: [PATCH 10/11] Update linphone --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 4006baf28..a43d75d8a 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 4006baf2895166f78b8fe4c2721fa77656607988 +Subproject commit a43d75d8a36099f14638eaf14606535fe559df7b From da017901fced0b9f05cb824f7e13ba8dc2ca9b51 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 26 Mar 2012 12:27:24 +0200 Subject: [PATCH 11/11] make zrtp compilation optional --- README | 17 +++++++++++------ submodules/build/Makefile | 13 ++++++++++--- submodules/build/builder-iphone-os.mk | 10 ++++++++-- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/README b/README index 4f0900f9d..096cfdadb 100644 --- a/README +++ b/README @@ -36,19 +36,24 @@ BUILDING THE SDK * GPL third parties versus non GPL third parties -This sdk can be generated in 2 flavors. Firt is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or x264. -If you choose this flavor, your final application must comply with GPL in any case. This is the default mode. + This sdk can be generated in 2 flavors. Firt is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or x264. + If you choose this flavor, your final application must comply with GPL in any case. This is the default mode. -To generate the liblinphone multi arch sdk in GPL mode, do: + To generate the liblinphone multi arch sdk in GPL mode, do: $ cd submodules/build $ make all -ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, exosip, osip. -If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastremer2, ortp, exosip, osip. + ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, exosip, osip. + If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastremer2, ortp, exosip, osip. -To generate the liblinphone multi arch sdkin non GPL mode, do: + To generate the liblinphone multi arch sdkin non GPL mode, do: $ cd submodules/build $ make all enable_gpl_third_parties=no + + * ZRTP support + + You can enable ZRTP support in GPL mode only, by adding "enable_zrtp=yes" to the make command, for example: + $ make all enable_gpl_third_parties=yes enable_zrtp=yes The resulting sdk is in liblinphone-sdk/ directory. diff --git a/submodules/build/Makefile b/submodules/build/Makefile index 311aaa4fd..aa1fa2c70 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -20,6 +20,7 @@ # ############################################################################ enable_gpl_third_parties=yes +enable_zrtp=no .NOTPARALLEL all: build warning ifeq ($(enable_gpl_third_parties),yes) @@ -39,12 +40,18 @@ warning: @echo "*****linphone SDK without GPL code ******" @echo "*****************************************************************" @echo "*****************************************************************" + ifeq($(enable_zrtp),yes) + @echo "ZRTP is not available in non-gpl build." + enable_zrtp=no + endif endif +LINPHONE_OPTIONS="enable_gpl_third_parties=$(enable_gpl_third_parties) enable_zrtp=$(enable_zrtp)" + build: - make -f builder-iphone-os.mk all enable_gpl_third_parties=$(enable_gpl_third_parties) \ - && 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 all $(LINPHONE_OPTIONS) \ + && make -f builder-iphone-simulator.mk all $(LINPHONE_OPTIONS) \ + && make -f builder-iphone-os.mk host=armv7-apple-darwin all $(LINPHONE_OPTIONS) \ && make -f builder-iphone-os.mk delivery-sdk ipa: build diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index e89de143d..20797a9f4 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -38,6 +38,12 @@ linphone_configure_controls= \ --disable-tests \ --with-srtp=$(prefix) +ifeq ($(enable_zrtp),yes) + linphone_configure_controls+= --enable-zrtp +else + linphone_configure_controls+= --disable-zrtp +endif + #path BUILDER_SRC_DIR?=$(shell pwd)/../ BUILDER_BUILD_DIR?=$(shell pwd)/../build-$(host) @@ -60,11 +66,11 @@ $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties: cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile ifeq ($(enable_gpl_third_parties),yes) -linphone_configure_controls+= --enable-ffmpeg --enable-zrtp +linphone_configure_controls+= --enable-ffmpeg detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties else -linphone_configure_controls+= --disable-ffmpeg --disable-zrtp +linphone_configure_controls+= --disable-ffmpeg detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties endif