forked from mirrors/linphone-iphone
g729A integration based on bcg729
This commit is contained in:
parent
0de57c7d28
commit
41a2a33666
9 changed files with 93 additions and 12 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -46,3 +46,6 @@
|
|||
[submodule "submodules/externals/srtp"]
|
||||
path = submodules/externals/srtp
|
||||
url = git://git.linphone.org/srtp.git
|
||||
[submodule "submodules/bcg729"]
|
||||
path = submodules/bcg729
|
||||
url = git://git.linphone.org/bcg729.git
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@
|
|||
#ifdef HAVE_AMR
|
||||
@"YES",@"amr_8k_preference", // enable amr by default if compiled with
|
||||
#endif
|
||||
@"NO",@"debugenable_preference",
|
||||
#ifdef HAVE_G729
|
||||
@"YES",@"g729_preference", // enable amr by default if compiled with
|
||||
#endif @"NO",@"debugenable_preference",
|
||||
//@"+33",@"countrycode_preference",
|
||||
nil];
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ extern void libmsx264_init();
|
|||
extern void libmssilk_init();
|
||||
#endif
|
||||
|
||||
#if HAVE_G729
|
||||
extern void libmsbcg729_init();
|
||||
#endif
|
||||
@implementation LinphoneManager
|
||||
@synthesize callDelegate;
|
||||
@synthesize registrationDelegate;
|
||||
|
|
@ -623,6 +626,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
[self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000];
|
||||
[self configurePayloadType:"PCMA" fromPrefKey:@"pcma_preference" withRate:8000];
|
||||
[self configurePayloadType:"G722" fromPrefKey:@"g722_preference" withRate:8000];
|
||||
[self configurePayloadType:"G729" fromPrefKey:@"g729_preference" withRate:8000];
|
||||
|
||||
//get video codecs from linphonerc
|
||||
const MSList *videoCodecs=linphone_core_get_video_codecs(theLinphoneCore);
|
||||
|
|
@ -791,6 +795,10 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
#ifdef HAVE_X264
|
||||
libmsx264_init(); //load x264 plugin if present from the liblinphone sdk
|
||||
#endif
|
||||
|
||||
#if HAVE_G729
|
||||
libmsbcg729_init(); // load g729 plugin
|
||||
#endif
|
||||
/* Initialize linphone core*/
|
||||
|
||||
theLinphoneCore = linphone_core_new (&linphonec_vtable
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<object class="NSPSMatrix" key="NSFrameMatrix"/>
|
||||
<string key="NSFrameSize">{320, 480}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
|
|
@ -140,6 +141,7 @@
|
|||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{0, 431}, {320, 49}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
|
|
@ -366,10 +368,6 @@
|
|||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<integer value="784" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1280" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
|
|
|
|||
6
README
6
README
|
|
@ -63,9 +63,9 @@ 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 and X264 codecs.
|
||||
Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_X264 positioned in xcode project.
|
||||
Before embeding these 3 codecs in the final application, make sure to have the right to do so.
|
||||
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.
|
||||
Before embeding these 4 codecs in the final application, make sure to have the right to do so.
|
||||
|
||||
|
||||
LIMITATIONS, KNOWN BUGS
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@
|
|||
226183B0147259670037138E /* libmssilk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AF147259670037138E /* libmssilk.a */; };
|
||||
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; };
|
||||
226B563F13CAF1CD00921595 /* audio.plist in Resources */ = {isa = PBXBuildFile; fileRef = 226B563E13CAF1CD00921595 /* audio.plist */; };
|
||||
226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADD14E2D0B800513B67 /* libbcg729.a */; };
|
||||
226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADE14E2D0B800513B67 /* libmsbcg729.a */; };
|
||||
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 */; };
|
||||
|
|
@ -482,6 +484,8 @@
|
|||
226183AF147259670037138E /* libmssilk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmssilk.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmssilk.a"; sourceTree = "<group>"; };
|
||||
2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
226B563E13CAF1CD00921595 /* audio.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = audio.plist; path = Settings.bundle/audio.plist; sourceTree = "<group>"; };
|
||||
226CDADD14E2D0B800513B67 /* libbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/libbcg729.a"; sourceTree = "<group>"; };
|
||||
226CDADE14E2D0B800513B67 /* libmsbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsbcg729.a"; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
|
|
@ -649,6 +653,8 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */,
|
||||
226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */,
|
||||
344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */,
|
||||
344ABDF214850AE9007420B6 /* libstdc++.6.dylib in Frameworks */,
|
||||
344ABDE81484E723007420B6 /* libzrtpcpp.a in Frameworks */,
|
||||
|
|
@ -1110,6 +1116,8 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
226CDADD14E2D0B800513B67 /* libbcg729.a */,
|
||||
226CDADE14E2D0B800513B67 /* libmsbcg729.a */,
|
||||
344ABDEF14850AE9007420B6 /* libc++.1.dylib */,
|
||||
344ABDF014850AE9007420B6 /* libstdc++.6.dylib */,
|
||||
344ABDE71484E723007420B6 /* libzrtpcpp.a */,
|
||||
|
|
|
|||
1
submodules/bcg729
Submodule
1
submodules/bcg729
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1ad5aa5abdf23bb260595b07f0705c9ede1a37d2
|
||||
|
|
@ -45,7 +45,7 @@ BUILDER_BUILD_DIR?=$(shell pwd)/../build-$(host)
|
|||
LINPHONE_SRC_DIR=$(BUILDER_SRC_DIR)/linphone
|
||||
LINPHONE_BUILD_DIR=$(BUILDER_BUILD_DIR)/linphone
|
||||
|
||||
all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk
|
||||
all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk build-msbcg729
|
||||
|
||||
$(LINPHONE_BUILD_DIR)/enable_gpl_third_parties:
|
||||
mkdir -p $(LINPHONE_BUILD_DIR)
|
||||
|
|
@ -93,13 +93,13 @@ endif
|
|||
prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host)
|
||||
|
||||
|
||||
clean-makefile: clean-makefile-linphone
|
||||
clean: clean-linphone
|
||||
clean-makefile: clean-makefile-linphone clean-makefile-msbcg729
|
||||
clean: clean-linphone clean-msbcg729
|
||||
init:
|
||||
mkdir -p $(prefix)/include
|
||||
mkdir -p $(prefix)/lib/pkgconfig
|
||||
|
||||
veryclean: veryclean-linphone
|
||||
veryclean: veryclean-linphone veryclean-msbcg729
|
||||
rm -rf $(BUILDER_BUILD_DIR)
|
||||
|
||||
|
||||
|
|
|
|||
61
submodules/build/builders.d/msbcg729.mk
Normal file
61
submodules/build/builders.d/msbcg729.mk
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
############################################################################
|
||||
# msbcg729.mk
|
||||
# Copyright (C) 2011 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
msbcg729_dir?=bcg729
|
||||
enable_bcg729?=yes
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure:
|
||||
@echo -e "\033[01;32m Running autogen for msbcg729 in $(BUILDER_SRC_DIR)/$(msbcg729_dir) \033[0m"
|
||||
cd $(BUILDER_SRC_DIR)/$(msbcg729_dir) && ./autogen.sh
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(msbcg729_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure
|
||||
@echo -e "\033[01;32m Running configure in $(BUILDER_BUILD_DIR)/$(msbcg729_dir) \033[0m"
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(msbcg729_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/ \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \
|
||||
--enable-static
|
||||
|
||||
ifeq ($(enable_bcg729),yes)
|
||||
|
||||
build-msbcg729: $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/Makefile
|
||||
@echo -e "\033[01;32m building bcg729 \033[0m"
|
||||
cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
make -j1 && make install
|
||||
|
||||
|
||||
else
|
||||
build-msbcg729:
|
||||
@echo "G729 is disabled"
|
||||
|
||||
endif
|
||||
|
||||
clean-msbcg729:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && make clean
|
||||
|
||||
veryclean-msbcg729:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && make distclean
|
||||
rm -f $(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure
|
||||
|
||||
clean-makefile-msbcg729:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir) && rm -f Makefile
|
||||
Loading…
Add table
Reference in a new issue