From 731845fa27b5722f7329c9ad71344a9a4f155e04 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 9 Apr 2014 11:45:36 +0200 Subject: [PATCH 1/8] fix build --- README | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 9e80c75f3..d62528903 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ Make sure that /opt/local/bin (macport tools) arrives first in your PATH env var Once xcode and macports are installed, open a terminal and install the required build-time tools with: - $ sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3 + $ sudo port install coreutils automake autoconf libtool intltool wget pkgconfig nasm cmake gmake yasm grep doxygen ImageMagick optipng antlr3 Install gas-preprosessor.pl version above Jully 2013 (http://github.com/yuvi/gas-preprocessor/ ) to be copied into /opt/local/bin : diff --git a/submodules/linphone b/submodules/linphone index affd02154..756ae1737 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit affd021540f6f0245803105b9e129521f6ff2a62 +Subproject commit 756ae1737a0ed61d4daab94636d4b490d83e2fa7 From 2fd56f9d31e800b28792368e0f8808e823bae282 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 10 Apr 2014 10:37:22 +0200 Subject: [PATCH 2/8] fix silk download problem --- submodules/mssilk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/mssilk b/submodules/mssilk index 5a1d028e4..07b55ce81 160000 --- a/submodules/mssilk +++ b/submodules/mssilk @@ -1 +1 @@ -Subproject commit 5a1d028e4e012c67940757ea57767fd811eddee7 +Subproject commit 07b55ce81adca894bf6bd1ed86eb27f4578562f1 From e31064bce76d50d0af45746bd26d26ea7f99317a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 11 Apr 2014 15:08:56 +0200 Subject: [PATCH 3/8] update linphone & belle-sip --- submodules/belle-sip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index e4616ba4e..e881f0512 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit e4616ba4eba8e590175dd85cc872257b92aa52f4 +Subproject commit e881f0512913a75d58ffe4ae6edf9139703383cc diff --git a/submodules/linphone b/submodules/linphone index 756ae1737..fd8136016 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 756ae1737a0ed61d4daab94636d4b490d83e2fa7 +Subproject commit fd813601605e2f4e2cbd70e2cdb96806e3e78e41 From e91dc6759a3be31fafb30ccd1900bfb946386e8f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 14 Apr 2014 15:27:03 +0200 Subject: [PATCH 4/8] update belle-sip and linphone --- submodules/belle-sip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index e881f0512..0177ef2de 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit e881f0512913a75d58ffe4ae6edf9139703383cc +Subproject commit 0177ef2de50f9609d8ed0525e8878f957da6ab61 diff --git a/submodules/linphone b/submodules/linphone index fd8136016..28f4a815f 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit fd813601605e2f4e2cbd70e2cdb96806e3e78e41 +Subproject commit 28f4a815f6be83516748a2af610d69629f0ab593 From 15fb9cac57632b4bf30724b3e584d20796d32afc Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 14 Apr 2014 20:13:31 +0200 Subject: [PATCH 5/8] fix crash in mediastreamer2 fix symbol conflict with sha256 --- submodules/build/iphone-config.site | 4 ++++ submodules/linphone | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/submodules/build/iphone-config.site b/submodules/build/iphone-config.site index ee81ad99b..995023e4a 100644 --- a/submodules/build/iphone-config.site +++ b/submodules/build/iphone-config.site @@ -44,6 +44,10 @@ echo "Selecting SDK path = ${SYSROOT_PATH}" COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -${CLANG_TARGET_SPECIFIER}=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions" +#workaround for polarssl conflicting symbols + +COMMON_FLAGS="$COMMON_FLAGS -Dsha256=polarssl_sha256" + # silence clang unused operators. This is temporary, we should find a way to compile 3rd party with correct flags :( COMMON_FLAGS="-Qunused-arguments -Wno-unknown-warning-option -Wno-unused-command-line-argument-hard-error-in-future $COMMON_FLAGS" diff --git a/submodules/linphone b/submodules/linphone index 28f4a815f..e5d8ff817 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 28f4a815f6be83516748a2af610d69629f0ab593 +Subproject commit e5d8ff817a5de726d75a6a69791d6a9603fe6460 From 02afae59ebfd054bfc3ed972877e4b292385826b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 16 Apr 2014 11:25:20 +0200 Subject: [PATCH 6/8] integrate permissive patch of openh264 --- Classes/LinphoneManager.m | 22 +++----- README | 4 +- submodules/build/Makefile | 4 -- .../builders.d/openh264-permissive.patch | 53 +++++++++++++++++++ submodules/build/builders.d/openh264.mk | 13 +++-- submodules/externals/openh264 | 2 +- submodules/msopenh264 | 2 +- 7 files changed, 73 insertions(+), 27 deletions(-) create mode 100644 submodules/build/builders.d/openh264-permissive.patch diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 752f99051..c289ae2d5 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -63,27 +63,17 @@ NSString *const kLinphoneConfiguringStateUpdate = @"LinphoneConfiguringStateUpda NSString *const kLinphoneGlobalStateUpdate = @"LinphoneGlobalStateUpdate"; -extern void libmsilbc_init(); -#ifdef HAVE_AMR -extern void libmsamr_init(); -#endif +extern void libmsilbc_init(void); +extern void libmsamr_init(void); +extern void libmsx264_init(void); +extern void libmsopenh264_init(void); +extern void libmssilk_init(void); +extern void libmsbcg729_init(void); -#ifdef HAVE_X264 -extern void libmsx264_init(); -#endif -#ifdef HAVE_OPENH264 -extern void libmsopenh264_init(); -#endif #define FRONT_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1" /*"AV Capture: Front Camera"*/ #define BACK_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:0" /*"AV Capture: Back Camera"*/ -#if defined (HAVE_SILK) -extern void libmssilk_init(); -#endif -#if HAVE_G729 -extern void libmsbcg729_init(); -#endif @implementation LinphoneCallAppData - (id)init { if ((self = [super init])) { diff --git a/README b/README index d62528903..c3eac41ec 100644 --- a/README +++ b/README @@ -71,8 +71,8 @@ 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 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. +The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and H264 codecs. +Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_OPENH264 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/submodules/build/Makefile b/submodules/build/Makefile index e05559eea..bdf569abe 100644 --- a/submodules/build/Makefile +++ b/submodules/build/Makefile @@ -30,10 +30,6 @@ enable_debug=no # check that the selected options are correct CHECKOPT_MSG := "" -ifeq ($(enable_gpl_third_parties)$(enable_zrtp),noyes) - CHECKOPT_MSG += "ZRTP is not available in non-gpl build. disabling\n" - enable_zrtp=no -endif ifeq ($(enable_gpl_third_parties)$(enable_ffmpeg),noyes) # ffmpeg is not compatible with no GPL. diff --git a/submodules/build/builders.d/openh264-permissive.patch b/submodules/build/builders.d/openh264-permissive.patch new file mode 100644 index 000000000..859db1ee1 --- /dev/null +++ b/submodules/build/builders.d/openh264-permissive.patch @@ -0,0 +1,53 @@ +commit 6b3de978d928b6c0baec3305c9803c21a4367d0c +Author: Simon Morlat +Date: Tue Apr 15 15:19:37 2014 +0200 + + permissive mode: allow reference frames to be used even if there were lost slices. + +diff --git a/codec/decoder/core/src/decoder_core.cpp b/codec/decoder/core/src/decoder_core.cpp +index c19f501..a14e971 100644 +--- a/codec/decoder/core/src/decoder_core.cpp ++++ b/codec/decoder/core/src/decoder_core.cpp +@@ -58,7 +58,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t + WelsLog (pCtx, WELS_LOG_WARNING, + "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d --\n", + pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); +- return -1; ++ //return -1; + } + #ifdef NO_WAITING_AU + pCtx->iTotalNumMbRec = 0; +diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp +index dcf61ca..5582ec9 100644 +--- a/codec/decoder/core/src/manage_dec_ref.cpp ++++ b/codec/decoder/core/src/manage_dec_ref.cpp +@@ -165,6 +165,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { + && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; + WelsLog (pCtx, WELS_LOG_WARNING, "WelsReorderRefList()-1::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", + pSliceHeader->iSpsId, ppRefList[i]->iSpsId); ++ return ERR_NONE; + pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- + return ERR_INFO_REFERENCE_PIC_LOST; + } else { + +commit a1f3b95ad18d0788c2c803fac80e78d6365673ce +Author: Simon Morlat +Date: Tue Apr 15 17:54:58 2014 +0200 + + permissive mode (2) + +diff --git a/codec/decoder/core/src/decoder_core.cpp b/codec/decoder/core/src/decoder_core.cpp +index a14e971..e742dbf 100644 +--- a/codec/decoder/core/src/decoder_core.cpp ++++ b/codec/decoder/core/src/decoder_core.cpp +@@ -1738,8 +1738,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 + if ((iLastIdD < 0) || //case 1: first layer + (iLastIdD == iCurrIdD)) { //case 2: same uiDId + InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec); +- +- if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) { ++ if (0){ ++ //if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) { + const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag + || (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR); + // Subclause 8.2.5.2 Decoding process for gaps in frame_num diff --git a/submodules/build/builders.d/openh264.mk b/submodules/build/builders.d/openh264.mk index 9ce4517dd..b229d2899 100644 --- a/submodules/build/builders.d/openh264.mk +++ b/submodules/build/builders.d/openh264.mk @@ -32,12 +32,19 @@ endif openh264_dir?=externals/openh264 -$(BUILDER_BUILD_DIR)/$(openh264_dir)/Makefile: +$(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp: + cd $(BUILDER_SRC_DIR)/$(openh264_dir) \ + && patch -p1 < $(BUILDER_SRC_DIR)/build/builders.d/openh264-permissive.patch + touch $(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp + +patch-openh264: $(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp + +update-openh264: patch-openh264 mkdir -p $(BUILDER_BUILD_DIR)/$(openh264_dir) \ && cd $(BUILDER_BUILD_DIR)/$(openh264_dir)/ \ - && rsync -rvLpgoc --exclude ".git" $(BUILDER_SRC_DIR)/$(openh264_dir)/* . + && rsync -rvLpgoc --exclude ".git" $(BUILDER_SRC_DIR)/$(openh264_dir)/* . -build-openh264: $(BUILDER_BUILD_DIR)/$(openh264_dir)/Makefile +build-openh264: update-openh264 cd $(BUILDER_BUILD_DIR)/$(openh264_dir) \ && make libraries OS=ios ARCH=$(ARCH) PREFIX=$(prefix)\ && make install OS=ios ARCH=$(ARCH) PREFIX=$(prefix) diff --git a/submodules/externals/openh264 b/submodules/externals/openh264 index fb5700bd5..b2f7191fa 160000 --- a/submodules/externals/openh264 +++ b/submodules/externals/openh264 @@ -1 +1 @@ -Subproject commit fb5700bd5cc18dd33c120ce9dd5f79b8f1f35f3a +Subproject commit b2f7191fa7e213f5b63b8e31936b962bae6adc2f diff --git a/submodules/msopenh264 b/submodules/msopenh264 index 863889de4..1dc44eb5b 160000 --- a/submodules/msopenh264 +++ b/submodules/msopenh264 @@ -1 +1 @@ -Subproject commit 863889de427c70806d6bda87e2f95c3f38662c23 +Subproject commit 1dc44eb5b824d104f96562e4b5bd28a1ac461525 From 0bd6b86f6b6b0ba59328befd0060e41944671f45 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Thu, 17 Apr 2014 16:44:38 +0200 Subject: [PATCH 7/8] URL handler for remote configuration - linphone-config-http:// & linphone-config-https:// --- Classes/LinphoneAppDelegate.h | 4 +- Classes/LinphoneAppDelegate.m | 151 +++++++++++++++++++++++++++----- Classes/LinphoneManager.m | 4 +- Classes/LinphoneUI/UIStateBar.m | 2 +- linphone-Info.plist | 24 +++++ 5 files changed, 158 insertions(+), 27 deletions(-) diff --git a/Classes/LinphoneAppDelegate.h b/Classes/LinphoneAppDelegate.h index 8b0076e3c..6ab39badf 100644 --- a/Classes/LinphoneAppDelegate.h +++ b/Classes/LinphoneAppDelegate.h @@ -32,12 +32,14 @@ UIWindow *window; BOOL started; int savedMaxCall; - } - (void)processRemoteNotification:(NSDictionary*)userInfo; @property (assign) BOOL started; +@property (nonatomic, retain) UIAlertView *waitingIndicator; +@property (nonatomic, retain) NSString *configURL; + @end diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 6226d7bff..f434c4510 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -36,7 +36,7 @@ @implementation LinphoneAppDelegate -@synthesize started; +@synthesize started,configURL; #pragma mark - Lifecycle Functions @@ -91,31 +91,31 @@ - (void)applicationDidBecomeActive:(UIApplication *)application { [LinphoneLogger logc:LinphoneLoggerLog format:"applicationDidBecomeActive"]; - + [self startApplication]; LinphoneManager* instance = [LinphoneManager instance]; - - [instance becomeActive]; + + [instance becomeActive]; LinphoneCore* lc = [LinphoneManager getLc]; LinphoneCall* call = linphone_core_get_current_call(lc); - - if (call){ - if (call == instance->currentCallContextBeforeGoingBackground.call) { - const LinphoneCallParams* params = linphone_call_get_current_params(call); - if (linphone_call_params_video_enabled(params)) { - linphone_call_enable_camera( - call, - instance->currentCallContextBeforeGoingBackground.cameraIsEnabled); - } - instance->currentCallContextBeforeGoingBackground.call = 0; - } else if ( linphone_call_get_state(call) == LinphoneCallIncomingReceived ) { + + if (call){ + if (call == instance->currentCallContextBeforeGoingBackground.call) { + const LinphoneCallParams* params = linphone_call_get_current_params(call); + if (linphone_call_params_video_enabled(params)) { + linphone_call_enable_camera( + call, + instance->currentCallContextBeforeGoingBackground.cameraIsEnabled); + } + instance->currentCallContextBeforeGoingBackground.call = 0; + } else if ( linphone_call_get_state(call) == LinphoneCallIncomingReceived ) { [[PhoneMainView instance ] displayIncomingCall:call]; // in this case, the ringing sound comes from the notification. // To stop it we have to do the iOS7 ring fix... [self fixRing]; } - } + } } @@ -177,19 +177,31 @@ } } - - (void)applicationWillTerminate:(UIApplication *)application { [LinphoneLogger log:LinphoneLoggerLog format:@"Application Will Terminate"]; } - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { - [self startApplication]; - if([LinphoneManager isLcReady]) { - if([[url scheme] isEqualToString:@"sip"]) { - // Go to Dialer view - DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController); - if(controller != nil) { - [controller setAddress:[url absoluteString]]; + NSString *scheme = [[url scheme] lowercaseString]; + if ([scheme isEqualToString:@"linphone-config-http"] || [scheme isEqualToString:@"linphone-config-https"]) { + configURL = [[NSString alloc] initWithString:[[url absoluteString] stringByReplacingOccurrencesOfString:@"linphone-config-" withString:@""]]; + UIAlertView* confirmation = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Remote configuration",nil) + message:NSLocalizedString(@"This operation will load a remote configuration. Continue ?",nil) + delegate:self + cancelButtonTitle:NSLocalizedString(@"No",nil) + otherButtonTitles:NSLocalizedString(@"Yes",nil),nil]; + confirmation.tag = 1; + [confirmation show]; + [confirmation release]; + } else { + [self startApplication]; + if([LinphoneManager isLcReady]) { + if([[url scheme] isEqualToString:@"sip"]) { + // Go to Dialer view + DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController); + if(controller != nil) { + [controller setAddress:[url absoluteString]]; + } } } } @@ -300,4 +312,95 @@ [[LinphoneManager instance] setPushNotificationToken:nil]; } +#pragma mark - Remote configuration Functions (URL Handler) + + +- (void)ConfigurationStateUpdateEvent: (NSNotification*) notif { + LinphoneConfiguringState state = [[notif.userInfo objectForKey: @"state"] intValue]; + if (state == LinphoneConfiguringSuccessful) { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:kLinphoneConfiguringStateUpdate + object:nil]; + [_waitingIndicator dismissWithClickedButtonIndex:0 animated:true]; + + UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Success",nil) + message:NSLocalizedString(@"Remote configuration successfully fetched and applied.",nil) + delegate:nil + cancelButtonTitle:NSLocalizedString(@"OK",nil) + otherButtonTitles:nil]; + [error show]; + [error release]; + [[PhoneMainView instance] startUp]; + } + if (state == LinphoneConfiguringFailed) { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:kLinphoneConfiguringStateUpdate + object:nil]; + [_waitingIndicator dismissWithClickedButtonIndex:0 animated:true]; + UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Failure",nil) + message:NSLocalizedString(@"Failed configuring from the specified URL." ,nil) + delegate:nil + cancelButtonTitle:NSLocalizedString(@"OK",nil) + otherButtonTitles:nil]; + [error show]; + [error release]; + + } +} + + +- (void) showWaitingIndicator { + _waitingIndicator = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Fetching remote configuration...",nil) message:@"" delegate:self cancelButtonTitle:nil otherButtonTitles:nil]; + UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 60, 30, 30)]; + progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge; + if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0){ + [_waitingIndicator setValue:progress forKey:@"accessoryView"]; + [progress setColor:[UIColor blackColor]]; + } else { + [_waitingIndicator addSubview:progress]; + } + [progress startAnimating]; + [_waitingIndicator show]; + +} + + +- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex +{ + if ((alertView.tag == 1) && (buttonIndex==1)) { + [self showWaitingIndicator]; + if([LinphoneManager isLcReady]) { + [self attemptRemoteConfiguration]; + } else { + [[LinphoneManager instance] startLibLinphone]; + [self performSelector:@selector(attemptRemoteConfiguration) withObject:NULL afterDelay:5.0]; + } + } + +} + +- (void)attemptRemoteConfiguration { + + if ([LinphoneManager isLcReady]) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(ConfigurationStateUpdateEvent:) + name:kLinphoneConfiguringStateUpdate + object:nil]; + linphone_core_set_provisioning_uri([LinphoneManager getLc] , [configURL UTF8String]); + [[LinphoneManager instance] destroyLibLinphone]; + [[LinphoneManager instance] startLibLinphone]; + } else { + [_waitingIndicator dismissWithClickedButtonIndex:0 animated:true]; + UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Failure",nil) + message:NSLocalizedString(@"Linphone is not ready.",nil) + delegate:nil + cancelButtonTitle:NSLocalizedString(@"OK",nil) + otherButtonTitles:nil]; + [error show]; + [error release]; + + } +} + + @end diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index c289ae2d5..fcb9b1c98 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1016,9 +1016,10 @@ static LinphoneCoreVTable linphonec_vtable = { } +static BOOL libStarted = FALSE; + - (void)startLibLinphone { - static BOOL libStarted = FALSE; if ( libStarted ) { [LinphoneLogger logc:LinphoneLoggerError format:"Liblinphone is already initialized!"]; return; @@ -1143,6 +1144,7 @@ static LinphoneCoreVTable linphonec_vtable = { proxyReachability=nil; } + libStarted = FALSE; } - (void) resetLinphoneCore { diff --git a/Classes/LinphoneUI/UIStateBar.m b/Classes/LinphoneUI/UIStateBar.m index 99a8835fb..787f07279 100644 --- a/Classes/LinphoneUI/UIStateBar.m +++ b/Classes/LinphoneUI/UIStateBar.m @@ -130,7 +130,7 @@ NSTimer *callSecurityTimer; } - (void) globalStateUpdate:(NSNotification*) notif { - [self registrationUpdate:notif]; + if ([LinphoneManager isLcReady]) [self registrationUpdate:notif]; } diff --git a/linphone-Info.plist b/linphone-Info.plist index b776fd5d1..8c7ffad31 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -74,6 +74,30 @@ sip + + CFBundleTypeRole + Viewer + CFBundleURLIconFile + linphone_icon_72@2x + CFBundleURLName + org.linphone.phone + CFBundleURLSchemes + + linphone-config-http + + + + CFBundleTypeRole + Viewer + CFBundleURLIconFile + linphone_icon_72@2x + CFBundleURLName + org.linphone.phone + CFBundleURLSchemes + + linphone-config-https + + CFBundleVersion 2.1.2 From e1274217ee381b8fb129d52918491e71d6929f19 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 18 Apr 2014 14:15:17 +0200 Subject: [PATCH 8/8] finilize bzrtp integration --- submodules/belle-sip | 2 +- submodules/bzrtp | 2 +- submodules/linphone | 2 +- submodules/mssilk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/belle-sip b/submodules/belle-sip index 0177ef2de..1b86808a1 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 0177ef2de50f9609d8ed0525e8878f957da6ab61 +Subproject commit 1b86808a1b7c6803b71b8d08607b3a0d7a2e9ea9 diff --git a/submodules/bzrtp b/submodules/bzrtp index 7f4c4333c..8ceda7ef0 160000 --- a/submodules/bzrtp +++ b/submodules/bzrtp @@ -1 +1 @@ -Subproject commit 7f4c4333c5d8b3b328815996d0eea061bc539860 +Subproject commit 8ceda7ef0d35130057affc2e5a61c0667cde15aa diff --git a/submodules/linphone b/submodules/linphone index e5d8ff817..9f68674a4 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit e5d8ff817a5de726d75a6a69791d6a9603fe6460 +Subproject commit 9f68674a4b10aa6a6907cebf65b941997719e9e7 diff --git a/submodules/mssilk b/submodules/mssilk index 07b55ce81..a253e5af9 160000 --- a/submodules/mssilk +++ b/submodules/mssilk @@ -1 +1 @@ -Subproject commit 07b55ce81adca894bf6bd1ed86eb27f4578562f1 +Subproject commit a253e5af931cadd5d3c0aff1f56697b2b52c1cfd