Add openh264 support.
This commit is contained in:
parent
1a5e85bd0d
commit
ae23ea29fc
7 changed files with 82 additions and 5 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -79,3 +79,9 @@
|
||||||
[submodule "submodules/msisac"]
|
[submodule "submodules/msisac"]
|
||||||
path = submodules/msisac
|
path = submodules/msisac
|
||||||
url = git://git.linphone.org/msisac.git
|
url = git://git.linphone.org/msisac.git
|
||||||
|
[submodule "submodules/msopenh264"]
|
||||||
|
path = submodules/msopenh264
|
||||||
|
url = git://git.linphone.org/msopenh264.git
|
||||||
|
[submodule "submodules/externals/openh264"]
|
||||||
|
path = submodules/externals/openh264
|
||||||
|
url = https://github.com/cisco/openh264
|
||||||
|
|
60
Makefile
60
Makefile
|
@ -33,7 +33,7 @@ ENABLE_GPL_THIRD_PARTIES=1
|
||||||
#default options, can be overidden using make OPTION=value .
|
#default options, can be overidden using make OPTION=value .
|
||||||
|
|
||||||
ifeq ($(ENABLE_GPL_THIRD_PARTIES),1)
|
ifeq ($(ENABLE_GPL_THIRD_PARTIES),1)
|
||||||
BUILD_X264=1
|
BUILD_X264=0
|
||||||
BUILD_G729=1
|
BUILD_G729=1
|
||||||
else
|
else
|
||||||
#x264 and g729 requires additional licensing agreements.
|
#x264 and g729 requires additional licensing agreements.
|
||||||
|
@ -43,6 +43,7 @@ endif
|
||||||
|
|
||||||
NDK_DEBUG=0
|
NDK_DEBUG=0
|
||||||
BUILD_VIDEO=1
|
BUILD_VIDEO=1
|
||||||
|
BUILD_OPENH264=1
|
||||||
BUILD_UPNP=1
|
BUILD_UPNP=1
|
||||||
BUILD_AMRNB=full # 0, light or full
|
BUILD_AMRNB=full # 0, light or full
|
||||||
BUILD_AMRWB=1
|
BUILD_AMRWB=1
|
||||||
|
@ -201,6 +202,57 @@ clean-x264:
|
||||||
rm -rf $(X264_BUILD_DIR)/arm && \
|
rm -rf $(X264_BUILD_DIR)/arm && \
|
||||||
rm -rf $(X264_BUILD_DIR)/x86
|
rm -rf $(X264_BUILD_DIR)/x86
|
||||||
|
|
||||||
|
#openh264
|
||||||
|
ifeq ($(BUILD_VIDEO),1)
|
||||||
|
ifeq ($(BUILD_OPENH264), 1)
|
||||||
|
BUILD_OPENH264_DEPS=\
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_api.h \
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_app_def.h \
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_def.h \
|
||||||
|
$(OPENH264_BUILD_DIR)/arm/libwels.a
|
||||||
|
ifeq ($(BUILD_FOR_X86), 1)
|
||||||
|
BUILD_OPENH264_DEPS+=$(OPENH264_BUILD_DIR)/x86/libwels.a
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
OPENH264_SRC_DIR=$(TOPDIR)/submodules/externals/openh264
|
||||||
|
OPENH264_BUILD_DIR=$(TOPDIR)/submodules/externals/build/openh264
|
||||||
|
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_api.h:
|
||||||
|
mkdir -p $(OPENH264_BUILD_DIR)/include/wels && \
|
||||||
|
cp $(OPENH264_SRC_DIR)/codec/api/svc/codec_api.h $(OPENH264_BUILD_DIR)/include/wels/
|
||||||
|
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_app_def.h:
|
||||||
|
mkdir -p $(OPENH264_BUILD_DIR)/include/wels && \
|
||||||
|
cp $(OPENH264_SRC_DIR)/codec/api/svc/codec_app_def.h $(OPENH264_BUILD_DIR)/include/wels/
|
||||||
|
|
||||||
|
$(OPENH264_BUILD_DIR)/include/codec_def.h:
|
||||||
|
mkdir -p $(OPENH264_BUILD_DIR)/include/wels && \
|
||||||
|
cp $(OPENH264_SRC_DIR)/codec/api/svc/codec_def.h $(OPENH264_BUILD_DIR)/include/wels/
|
||||||
|
|
||||||
|
$(OPENH264_BUILD_DIR)/arm/libwels.a:
|
||||||
|
mkdir -p $(OPENH264_BUILD_DIR)/arm && \
|
||||||
|
cd $(OPENH264_SRC_DIR) && \
|
||||||
|
make libraries -j $(NUMCPUS) OS=android ARCH=arm NDKROOT=$(NDK_PATH) TARGET=$(ANDROID_MOST_RECENT_TARGET) && \
|
||||||
|
cp libwels.a $(OPENH264_BUILD_DIR)/arm/libwels.a && \
|
||||||
|
make clean OS=android ARCH=arm NDKROOT=$(NDK_PATH) TARGET=$(ANDROID_MOST_RECENT_TARGET) \
|
||||||
|
|| ( echo "Build of openh264 for arm failed." ; exit 1 )
|
||||||
|
|
||||||
|
$(OPENH264_BUILD_DIR)/x86/libwels.a:
|
||||||
|
mkdir -p $(OPENH264_BUILD_DIR)/x86 && \
|
||||||
|
cd $(OPENH264_SRC_DIR) && \
|
||||||
|
make libraries -j $(NUMCPUS) OS=android ARCH=x86 NDKROOT=$(NDK_PATH) TARGET=$(ANDROID_MOST_RECENT_TARGET) && \
|
||||||
|
cp libwels.a $(OPENH264_BUILD_DIR)/x86/libwels.a && \
|
||||||
|
make clean OS=android ARCH=x86 NDKROOT=$(NDK_PATH) TARGET=$(ANDROID_MOST_RECENT_TARGET) \
|
||||||
|
|| ( echo "Build of openh264 for arm failed." ; exit 1 )
|
||||||
|
endif
|
||||||
|
|
||||||
|
build-openh264: $(BUILD_OPENH264_DEPS)
|
||||||
|
|
||||||
|
clean-openh264:
|
||||||
|
rm -rf $(OPENH264_BUILD_DIR)/arm && \
|
||||||
|
rm -rf $(OPENH264_BUILD_DIR)/x86
|
||||||
|
|
||||||
#libvpx
|
#libvpx
|
||||||
ifeq ($(BUILD_VIDEO),1)
|
ifeq ($(BUILD_VIDEO),1)
|
||||||
BUILD_VPX_DEPS=$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt $(LIBVPX_BUILD_DIR)/arm/libvpx.a
|
BUILD_VPX_DEPS=$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt $(LIBVPX_BUILD_DIR)/arm/libvpx.a
|
||||||
|
@ -328,12 +380,12 @@ $(SQLITE_BASENAME).zip:
|
||||||
curl -sO $(SQLITE_URL)
|
curl -sO $(SQLITE_URL)
|
||||||
|
|
||||||
#Build targets
|
#Build targets
|
||||||
prepare-sources: build-ffmpeg build-x264 prepare-ilbc build-vpx prepare-silk prepare-srtp prepare-mediastreamer2 prepare-antlr3 prepare-belle-sip $(TOPDIR)/res/raw/rootca.pem prepare-sqlite3
|
prepare-sources: build-ffmpeg build-x264 build-openh264 prepare-ilbc build-vpx prepare-silk prepare-srtp prepare-mediastreamer2 prepare-antlr3 prepare-belle-sip $(TOPDIR)/res/raw/rootca.pem prepare-sqlite3
|
||||||
|
|
||||||
|
|
||||||
GENERATE_OPTIONS = NDK_DEBUG=$(NDK_DEBUG) BUILD_FOR_X86=$(BUILD_FOR_X86) \
|
GENERATE_OPTIONS = NDK_DEBUG=$(NDK_DEBUG) BUILD_FOR_X86=$(BUILD_FOR_X86) \
|
||||||
BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_OPUS=$(BUILD_OPUS) \
|
BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_OPUS=$(BUILD_OPUS) \
|
||||||
BUILD_VIDEO=$(BUILD_VIDEO) BUILD_X264=$(BUILD_X264) \
|
BUILD_VIDEO=$(BUILD_VIDEO) BUILD_X264=$(BUILD_X264) BUILD_OPENH264=$(BUILD_OPENH264) \
|
||||||
BUILD_UPNP=$(BUILD_UPNP) BUILD_ZRTP=$(BUILD_ZRTP) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_WEBRTC_ISAC=$(BUILD_WEBRTC_ISAC)
|
BUILD_UPNP=$(BUILD_UPNP) BUILD_ZRTP=$(BUILD_ZRTP) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_WEBRTC_ISAC=$(BUILD_WEBRTC_ISAC)
|
||||||
|
|
||||||
|
|
||||||
|
@ -413,7 +465,7 @@ clean-ndk-build:
|
||||||
clean: clean-ndk-build
|
clean: clean-ndk-build
|
||||||
ant clean
|
ant clean
|
||||||
|
|
||||||
veryclean: clean clean-ffmpeg clean-x264 clean-vpx
|
veryclean: clean clean-ffmpeg clean-x264 clean-openh264 clean-vpx
|
||||||
|
|
||||||
.PHONY: clean install-apk run-linphone
|
.PHONY: clean install-apk run-linphone
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
#variables given on command line take precedence over the ones defined internally.
|
#variables given on command line take precedence over the ones defined internally.
|
||||||
ifeq ($(TARGET_ARCH_ABI), armeabi)
|
ifeq ($(TARGET_ARCH_ABI), armeabi)
|
||||||
_BUILD_X264=0
|
_BUILD_X264=0
|
||||||
|
_BUILD_OPENH264=0
|
||||||
_BUILD_VIDEO=0
|
_BUILD_VIDEO=0
|
||||||
else
|
else
|
||||||
_BUILD_X264=$(BUILD_X264)
|
_BUILD_X264=$(BUILD_X264)
|
||||||
|
_BUILD_OPENH264=$(BUILD_OPENH264)
|
||||||
_BUILD_VIDEO=$(BUILD_VIDEO)
|
_BUILD_VIDEO=$(BUILD_VIDEO)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -87,6 +89,14 @@ include $(linphone-root-dir)/submodules/msx264/Android.mk
|
||||||
include $(linphone-root-dir)/submodules/externals/build/x264/Android.mk
|
include $(linphone-root-dir)/submodules/externals/build/x264/Android.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(_BUILD_OPENH264),1)
|
||||||
|
ifeq (,$(DUMP_VAR))
|
||||||
|
$(info $(TARGET_ARCH_ABI): Build OpenH264 plugin for mediastreamer2)
|
||||||
|
endif
|
||||||
|
include $(linphone-root-dir)/submodules/msopenh264/Android.mk
|
||||||
|
include $(linphone-root-dir)/submodules/externals/build/openh264/Android.mk
|
||||||
|
endif
|
||||||
|
|
||||||
include $(linphone-root-dir)/submodules/externals/build/ffmpeg/Android.mk
|
include $(linphone-root-dir)/submodules/externals/build/ffmpeg/Android.mk
|
||||||
include $(linphone-root-dir)/submodules/externals/build/libvpx/Android.mk
|
include $(linphone-root-dir)/submodules/externals/build/libvpx/Android.mk
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,10 @@ ifeq ($(BUILD_X264),)
|
||||||
BUILD_X264=0
|
BUILD_X264=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_OPENH264),)
|
||||||
|
BUILD_OPENH264=0
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BUILD_G729),)
|
ifeq ($(BUILD_G729),)
|
||||||
BUILD_G729=0
|
BUILD_G729=0
|
||||||
endif
|
endif
|
||||||
|
@ -58,6 +62,9 @@ APP_MODULES += libvpx
|
||||||
ifeq ($(BUILD_X264),1)
|
ifeq ($(BUILD_X264),1)
|
||||||
APP_MODULES +=libx264 libmsx264
|
APP_MODULES +=libx264 libmsx264
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(BUILD_OPENH264),1)
|
||||||
|
APP_MODULES += libwels libmsopenh264
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_BUILD_AMR=0
|
_BUILD_AMR=0
|
||||||
|
|
1
submodules/externals/openh264
vendored
Submodule
1
submodules/externals/openh264
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit fb5700bd5cc18dd33c120ce9dd5f79b8f1f35f3a
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5e01d28d2bb5388a82de982fa274ba1e9f843ef1
|
Subproject commit 90b51017647087cc3fb1656a8c933bec5623934b
|
1
submodules/msopenh264
Submodule
1
submodules/msopenh264
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d7c97675f6dd727c79f75bd807f69a8ad8946146
|
Loading…
Reference in a new issue