mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
add AMR support. Should be use with compilation flag HAVE_AMR
This commit is contained in:
parent
a9c99bbec5
commit
a9ab705dfa
7 changed files with 46 additions and 10 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
|
@ -19,3 +19,9 @@
|
|||
[submodule "submodules/libilbc-rfc3951"]
|
||||
path = submodules/libilbc-rfc3951
|
||||
url = git://git.linphone.org/libilbc-rfc3951.git
|
||||
[submodule "submodules/externals/opencore-amr"]
|
||||
path = submodules/externals/opencore-amr
|
||||
url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr
|
||||
[submodule "submodules/msamr"]
|
||||
path = submodules/msamr
|
||||
url = git://git.linphone.org/msamr.git
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@
|
|||
|
||||
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
|
||||
nil];
|
||||
|
||||
[defaultsToRegister addEntriesFromDictionary:appDefaults];
|
||||
|
|
|
|||
|
|
@ -30,8 +30,9 @@ static LinphoneCore* theLinphoneCore=nil;
|
|||
static LinphoneManager* theLinphoneManager=nil;
|
||||
|
||||
extern void libmsilbc_init();
|
||||
|
||||
|
||||
#ifdef HAVE_AMR
|
||||
extern void libmsamr_init();
|
||||
#endif
|
||||
@implementation LinphoneManager
|
||||
@synthesize callDelegate;
|
||||
@synthesize registrationDelegate;
|
||||
|
|
@ -431,6 +432,7 @@ 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];
|
||||
[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];
|
||||
[self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000];
|
||||
|
|
@ -585,7 +587,9 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
|
||||
libmsilbc_init();
|
||||
|
||||
/*
|
||||
#ifdef HAVE_AMR
|
||||
libmsamr_init(); //load amr plugin if present from the liblinphone sdk
|
||||
#endif /*
|
||||
* Initialize linphone core
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@
|
|||
225CB2EE11ABB65D00628906 /* clavier-01-160px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2ED11ABB65D00628906 /* clavier-01-160px.png */; };
|
||||
225CB2FA11ABB76400628906 /* linphone-banner.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2F911ABB76400628906 /* linphone-banner.png */; };
|
||||
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; };
|
||||
226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */; };
|
||||
226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */; };
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED51344B0EF00F6EF27 /* libmsamr.a */; };
|
||||
2274401A106F31BD006EC466 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22744019106F31BD006EC466 /* CoreAudio.framework */; };
|
||||
2274402F106F335E006EC466 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2274402E106F335E006EC466 /* AudioToolbox.framework */; };
|
||||
2274550810700509006EC466 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; };
|
||||
|
|
@ -270,6 +273,9 @@
|
|||
225CB2ED11ABB65D00628906 /* clavier-01-160px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-160px.png"; path = "Resources/clavier-01-160px.png"; sourceTree = "<group>"; };
|
||||
225CB2F911ABB76400628906 /* linphone-banner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "linphone-banner.png"; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/linphone-banner.png"; sourceTree = "<group>"; };
|
||||
2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrwb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrwb.a"; sourceTree = "<group>"; };
|
||||
226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrnb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrnb.a"; sourceTree = "<group>"; };
|
||||
226F2ED51344B0EF00F6EF27 /* libmsamr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsamr.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsamr.a"; sourceTree = "<group>"; };
|
||||
22744019106F31BD006EC466 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
2274402E106F335E006EC466 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
22744043106F33FC006EC466 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
|
|
@ -414,6 +420,9 @@
|
|||
22A10F3B11F8960300373793 /* libortp.a in Frameworks */,
|
||||
22D1B68112A3E0BE001AE361 /* libresolv.dylib in Frameworks */,
|
||||
2252941412F6DAA400DD9BFB /* libmediastreamer.a in Frameworks */,
|
||||
226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */,
|
||||
226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */,
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -778,6 +787,9 @@
|
|||
220FAD2E10765B400068D98F /* libosipparser2.a */,
|
||||
220FAD2F10765B400068D98F /* libspeex.a */,
|
||||
220FAD3010765B400068D98F /* libspeexdsp.a */,
|
||||
226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */,
|
||||
226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */,
|
||||
226F2ED51344B0EF00F6EF27 /* libmsamr.a */,
|
||||
220FAC77107654FC0068D98F /* include */,
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
|
|
@ -994,7 +1006,10 @@
|
|||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = IN_LINPHONE;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
HAVE_AMR,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
@ -1061,7 +1076,10 @@
|
|||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = IN_LINPHONE;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
HAVE_AMR,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
@ -1128,7 +1146,10 @@
|
|||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = IN_LINPHONE;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
HAVE_AMR,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ endif
|
|||
|
||||
prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host)
|
||||
|
||||
all: build-linphone build-msilbc
|
||||
all: build-linphone build-msilbc build-msamr
|
||||
|
||||
clean-makefile: clean-makefile-linphone
|
||||
clean: clean-linphone
|
||||
|
|
@ -82,14 +82,14 @@ veryclean:
|
|||
.NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm $(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-msilbc clean-libilbc clean-openssl
|
||||
clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl clean-msamr
|
||||
cd $(LINPHONE_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl
|
||||
veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr
|
||||
cd $(LINPHONE_BUILD_DIR) && make distclean
|
||||
cd $(LINPHONE_SRC_DIR) && rm -f configure
|
||||
|
||||
clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl
|
||||
clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
|
||||
|
|
|
|||
1
submodules/externals/opencore-amr
vendored
Submodule
1
submodules/externals/opencore-amr
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit cf4409e03ec56b1cd85a2f9532f58bc1fa9db274
|
||||
1
submodules/msamr
Submodule
1
submodules/msamr
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 17391e32465c25feec9b3b44b6967775ea9a56a9
|
||||
Loading…
Add table
Reference in a new issue