forked from mirrors/linphone-iphone
Bug fixes on iPhone 3G
This commit is contained in:
parent
8ee087fac0
commit
bfff840cb2
6 changed files with 40 additions and 17 deletions
|
|
@ -50,6 +50,7 @@ typedef enum _Connectivity {
|
|||
-(void) registerLogView:(id<LogView>) view;
|
||||
|
||||
-(void) startLibLinphone;
|
||||
-(BOOL) isNotIphone3G;
|
||||
-(void) destroyLibLinphone;
|
||||
|
||||
-(void) enterBackgroundMode;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#import <AVFoundation/AVAudioSession.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "FastAddressBook.h"
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static LinphoneCore* theLinphoneCore=nil;
|
||||
static LinphoneManager* theLinphoneManager=nil;
|
||||
|
||||
|
|
@ -379,16 +381,17 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
|
||||
ms_error("cannot get current transport");
|
||||
}
|
||||
// Only one port can be set at one time, the others's value is 0
|
||||
if ([transport isEqualToString:@"tcp"]) {
|
||||
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port;
|
||||
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port + transportValue.tls_port;
|
||||
transportValue.udp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"udp"]){
|
||||
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port;
|
||||
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port + transportValue.tls_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"tls"]){
|
||||
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port;
|
||||
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port + transportValue.tcp_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.udp_port=0;
|
||||
} else {
|
||||
|
|
@ -496,8 +499,14 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
|
||||
//read codecs from setting bundle and enable them one by one
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
if ([self isNotIphone3G]) {
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
}
|
||||
else
|
||||
{
|
||||
ms_message("SPEEX codecs deactivated");
|
||||
}
|
||||
[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];
|
||||
|
|
@ -516,6 +525,18 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
|
||||
}
|
||||
- (BOOL)isNotIphone3G
|
||||
{
|
||||
size_t size;
|
||||
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
|
||||
char *machine = malloc(size);
|
||||
sysctlbyname("hw.machine", machine, &size, NULL, 0);
|
||||
NSString *platform = [NSString stringWithCString:machine];
|
||||
free(machine);
|
||||
|
||||
return ![platform isEqualToString:@"iPhone1,2"];
|
||||
}
|
||||
|
||||
// no proxy configured alert
|
||||
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if (buttonIndex == 1) {
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.4.4</string>
|
||||
<string>3.4.5</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.6</string>
|
||||
<string>1.0.7</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>PhoneMainView</string>
|
||||
<key>UIApplicationExitsOnSuspend</key>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@
|
|||
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
|
||||
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
|
||||
F0A486D91404FE53009EC0BE /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A486D71404FE53009EC0BE /* libsrtp.a */; };
|
||||
F0A486DA1404FE53009EC0BE /* libzrtpcpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A486D81404FE53009EC0BE /* libzrtpcpp.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -400,7 +399,6 @@
|
|||
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* linphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "linphone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
F0A486D71404FE53009EC0BE /* libsrtp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsrtp.a; path = "liblinphone-sdk/apple-darwin/lib/libsrtp.a"; sourceTree = "<group>"; };
|
||||
F0A486D81404FE53009EC0BE /* libzrtpcpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzrtpcpp.a; path = "liblinphone-sdk/apple-darwin/lib/libzrtpcpp.a"; sourceTree = "<group>"; };
|
||||
F0A486DB14050008009EC0BE /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/gcc/arm-apple-darwin10/4.0.1/libstdc++.dylib"; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
|
@ -435,7 +433,6 @@
|
|||
226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */,
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */,
|
||||
F0A486D91404FE53009EC0BE /* libsrtp.a in Frameworks */,
|
||||
F0A486DA1404FE53009EC0BE /* libzrtpcpp.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -793,7 +790,6 @@
|
|||
children = (
|
||||
F0A486DB14050008009EC0BE /* libstdc++.dylib */,
|
||||
F0A486D71404FE53009EC0BE /* libsrtp.a */,
|
||||
F0A486D81404FE53009EC0BE /* libzrtpcpp.a */,
|
||||
2214783B1386A2030020F8B8 /* Localizable.strings */,
|
||||
22A10D9E11F88C1F00373793 /* liblinphone.xcodeproj */,
|
||||
223148E51178A09900637D6A /* libmsilbc.a */,
|
||||
|
|
@ -910,6 +906,9 @@
|
|||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0410;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "linphone" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
|
|
@ -1057,7 +1056,7 @@
|
|||
submodules/externals/zrtpcpp/src,
|
||||
);
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1.2;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(BUILT_PRODUCTS_DIR)",
|
||||
"\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
|
|
@ -1124,7 +1123,7 @@
|
|||
submodules/externals/zrtpcpp/src,
|
||||
);
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1.2;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(BUILT_PRODUCTS_DIR)",
|
||||
"\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
|
|
@ -1191,7 +1190,7 @@
|
|||
submodules/externals/zrtpcpp/src,
|
||||
);
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 3.1.2;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(BUILT_PRODUCTS_DIR)",
|
||||
"\"$(SRCROOT)/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ LIBILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/libilbc-rfc3951
|
|||
ifneq (,$(findstring arm,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point
|
||||
else
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,19 +3,22 @@
|
|||
GCC_VERSION=4.2
|
||||
SDK_VERSION_MAJOR=4
|
||||
SDK_VERSION=4.0
|
||||
|
||||
MCPU=""
|
||||
if test "${host_alias}" = "i386-apple-darwin" ; then
|
||||
PLATFORM=Simulator
|
||||
ARCH=i386
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=i386"
|
||||
MCPU=""
|
||||
elif test "${host_alias}" = "armv6-apple-darwin" ; then
|
||||
ARCH=armv6
|
||||
PLATFORM=OS
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
|
||||
MCPU="-mcpu=arm1176jzf-s"
|
||||
elif test "${host_alias}" = "armv7-apple-darwin" ; then
|
||||
ARCH=armv7
|
||||
PLATFORM=OS
|
||||
CMAKE_OPTS="-DCMAKE_SYSTEM_PROCESSOR=arm"
|
||||
MCPU="-mcpu=cortex-a8"
|
||||
else
|
||||
echo "bad host ${host_alias} must be either i386-apple-darwin or armv6-apple-darwin"
|
||||
exit
|
||||
|
|
@ -26,7 +29,7 @@ SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer
|
|||
SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
|
||||
for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ;
|
||||
echo "Selecting SDK path = ${SYSROOT_PATH}"
|
||||
COMMON_FLAGS=" -arch ${ARCH} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE"
|
||||
CC="${SDK_BIN_PATH}/gcc-${GCC_VERSION} -std=c99 $COMMON_FLAGS"
|
||||
CXX="${SDK_BIN_PATH}/g++-${GCC_VERSION} $COMMON_FLAGS"
|
||||
LD="${SDK_BIN_PATH}/ld-${GCC_VERSION} -arch ${ARCH}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue