forked from mirrors/linphone-iphone
enable x264
This commit is contained in:
parent
915d7bc9ed
commit
6cd52eb015
7 changed files with 110 additions and 17 deletions
|
|
@ -33,6 +33,10 @@ extern void libmsilbc_init();
|
|||
#ifdef HAVE_AMR
|
||||
extern void libmsamr_init();
|
||||
#endif
|
||||
#ifdef HAVE_X264
|
||||
extern void libmsx264_init();
|
||||
#endif
|
||||
|
||||
@implementation LinphoneManager
|
||||
@synthesize callDelegate;
|
||||
@synthesize registrationDelegate;
|
||||
|
|
@ -511,6 +515,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
|
||||
}
|
||||
[self configurePayloadType:"MP4V-ES" fromPrefKey:@"mp4v-es_preference" withRate:90000];
|
||||
[self configurePayloadType:"H264" fromPrefKey:@"h264_preference" withRate:90000];
|
||||
|
||||
|
||||
UIDevice* device = [UIDevice currentDevice];
|
||||
|
|
@ -669,9 +674,11 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
|
||||
#ifdef HAVE_AMR
|
||||
libmsamr_init(); //load amr plugin if present from the liblinphone sdk
|
||||
#endif /*
|
||||
* Initialize linphone core
|
||||
*/
|
||||
#endif
|
||||
#ifdef HAVE_X264
|
||||
libmsx264_init(); //load x264 plugin if present from the liblinphone sdk
|
||||
#endif
|
||||
/* Initialize linphone core*/
|
||||
|
||||
theLinphoneCore = linphone_core_new (&linphonec_vtable
|
||||
, [confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]
|
||||
|
|
|
|||
1
README
1
README
|
|
@ -13,6 +13,7 @@ Linphone for iPhone depends on liblinphone sdk. To build this sdk, you must inst
|
|||
gas-preprosessor.pl (http://github.com/yuvi/gas-preprocessor/ ) to be copied into /opt/local/bin
|
||||
|
||||
Link macport libtoolize to glibtoolize (sudo ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize)
|
||||
Link host's strings to simulator SDK (ln -s /usr/bin/strings /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings)
|
||||
|
||||
You may update variable SDK_VERSION from file submodules/build/iphone-config.site according to your iPhone SDK version. Current is 4.0
|
||||
|
||||
|
|
|
|||
|
|
@ -5,20 +5,30 @@
|
|||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>mpeg4</string>
|
||||
<key>Key</key>
|
||||
<string>mp4v-es_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>mp4v-es_preference</string>
|
||||
<key>Title</key>
|
||||
<string>mpeg4</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>h264_preference</string>
|
||||
<key>Title</key>
|
||||
<string>h264</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@
|
|||
22968A5F12F875C600588287 /* UISpeakerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A5E12F875C600588287 /* UISpeakerButton.m */; };
|
||||
22968A8812F87C2000588287 /* UIDuration.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A8712F87C2000588287 /* UIDuration.m */; };
|
||||
22A10F3B11F8960300373793 /* libortp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2C10765B400068D98F /* libortp.a */; };
|
||||
22AA8AFD13D7125600B30535 /* libx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22AA8AFB13D7125500B30535 /* libx264.a */; };
|
||||
22AA8AFE13D7125600B30535 /* libmsx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22AA8AFC13D7125500B30535 /* libmsx264.a */; };
|
||||
22B5EFA310CE50BD00777D97 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */; };
|
||||
22B5EFE510CE5E5800777D97 /* ContactPickerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */; };
|
||||
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B5F03410CE6B2F00777D97 /* AddressBook.framework */; };
|
||||
|
|
@ -325,6 +327,8 @@
|
|||
22968A8612F87C2000588287 /* UIDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDuration.h; sourceTree = "<group>"; };
|
||||
22968A8712F87C2000588287 /* UIDuration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDuration.m; sourceTree = "<group>"; };
|
||||
22A10D9E11F88C1F00373793 /* liblinphone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = liblinphone.xcodeproj; path = submodules/liblinphone.xcodeproj; sourceTree = "<group>"; };
|
||||
22AA8AFB13D7125500B30535 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = "liblinphone-sdk/apple-darwin/lib/libx264.a"; sourceTree = "<group>"; };
|
||||
22AA8AFC13D7125500B30535 /* libmsx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsx264.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsx264.a"; sourceTree = "<group>"; };
|
||||
22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
|
||||
22B5EFE310CE5E5800777D97 /* ContactPickerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactPickerDelegate.h; sourceTree = "<group>"; };
|
||||
22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactPickerDelegate.m; sourceTree = "<group>"; };
|
||||
|
|
@ -468,6 +472,8 @@
|
|||
226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */,
|
||||
226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */,
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */,
|
||||
22AA8AFD13D7125600B30535 /* libx264.a in Frameworks */,
|
||||
22AA8AFE13D7125600B30535 /* libmsx264.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -827,6 +833,8 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22AA8AFB13D7125500B30535 /* libx264.a */,
|
||||
22AA8AFC13D7125500B30535 /* libmsx264.a */,
|
||||
22F3D57D13CCC89600A0DA02 /* liblinphone.a */,
|
||||
22E1A9E713CAF4AA00219531 /* video.plist */,
|
||||
226B563E13CAF1CD00921595 /* audio.plist */,
|
||||
|
|
@ -1104,6 +1112,7 @@
|
|||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
VIDEO_ENABLED,
|
||||
HAVE_X264,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
|
|
@ -1164,6 +1173,7 @@
|
|||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
VIDEO_ENABLED,
|
||||
HAVE_X264,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
|
|
@ -1222,6 +1232,7 @@
|
|||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
VIDEO_ENABLED,
|
||||
HAVE_X264,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
|
|
@ -1282,6 +1293,7 @@
|
|||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
IN_LINPHONE,
|
||||
VIDEO_ENABLED,
|
||||
HAVE_X264,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ endif
|
|||
|
||||
prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host)
|
||||
|
||||
all: build-linphone build-msilbc build-msamr
|
||||
all: build-linphone build-msilbc build-msamr build-msx264
|
||||
|
||||
clean-makefile: clean-makefile-linphone
|
||||
clean: clean-linphone
|
||||
|
|
@ -84,10 +84,10 @@ veryclean:
|
|||
.NOTPARALLEL build-linphone: init build-openssl build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg $(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-msamr clean-ffmpeg
|
||||
clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-msilbc clean-libilbc clean-openssl clean-msamr clean-ffmpeg clean-msx264
|
||||
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-msamr
|
||||
veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-msx264
|
||||
cd $(LINPHONE_BUILD_DIR) && make distclean
|
||||
cd $(LINPHONE_SRC_DIR) && rm -f configure
|
||||
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@ ifneq (,$(findstring armv7,$(host)))
|
|||
endif
|
||||
ffmpeg_dir?=externals/ffmpeg
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/Makefile: $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/configure
|
||||
$(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak:
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/configure --prefix=$(prefix) $(ffmpeg_configure_options)
|
||||
|
||||
build-ffmpeg: $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/Makefile
|
||||
build-ffmpeg: $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
|
||||
clean-ffmpeg:
|
||||
|
|
@ -39,5 +39,5 @@ veryclean-ffmpeg:
|
|||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && make distclean
|
||||
|
||||
clean-makefile-ffmpeg:
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && rm -f Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && rm -f config.mak
|
||||
|
||||
|
|
|
|||
63
submodules/build/builders.d/x264.mk
Normal file
63
submodules/build/builders.d/x264.mk
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
############################################################################
|
||||
# x264.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.
|
||||
#
|
||||
############################################################################
|
||||
x264-configure-option= \
|
||||
--host=$(host)\
|
||||
--cross-prefix=$$SDK_BIN_PATH/ \
|
||||
--extra-ldflags="-arch $$ARCH -isysroot $$SYSROOT_PATH"
|
||||
|
||||
|
||||
|
||||
ifneq (,$(findstring i386,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -isysroot $$SYSROOT_PATH"
|
||||
endif
|
||||
ifneq (,$(findstring armv6,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -mcpu=arm1176jzf-s -marm -isysroot $$SYSROOT_PATH"
|
||||
x264-configure-option+= --disable-asm
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -isysroot $$SYSROOT_PATH"
|
||||
endif
|
||||
|
||||
x264_dir?=externals/x264
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/configure:
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(x264_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir)/ \
|
||||
&& rsync -av --exclude ".git" $(BUILDER_SRC_DIR)/$(x264_dir)/* .
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/config.mak: $(BUILDER_BUILD_DIR)/$(x264_dir)/configure
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir)/ \
|
||||
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& ./configure --prefix=$(prefix) ${x264-configure-option}
|
||||
|
||||
build-x264: $(BUILDER_BUILD_DIR)/$(x264_dir)/config.mak
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) make && make install
|
||||
|
||||
clean-x264:
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) && make clean
|
||||
|
||||
veryclean-x264:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(x264_dir) && make distclean
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(x264_dir)
|
||||
|
||||
clean-makefile-x264:
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) && rm -f config.mak
|
||||
Loading…
Add table
Reference in a new issue