Skip to content

Commit

Permalink
feat(ffmpeg): enable dash demuxer
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <[email protected]>
  • Loading branch information
pingkai committed May 20, 2020
1 parent 0df4fdf commit 9a7c5a6
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmdline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ target_link_libraries(cicadaPlayer PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS})
if (ENABLE_SDL)
Expand Down
1 change: 1 addition & 0 deletions cmdline/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ target_link_libraries(syncPlayer PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS})
if (ENABLE_SDL)
Expand Down
1 change: 1 addition & 0 deletions external/build_external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function patch_ffmpeg() {
git_am_patch ../../contribute/ffmpeg/0006-flv-add-extensions-for-H.265-HEVC.patch
git_am_patch ../../contribute/ffmpeg/0007-build-libavformat-compile-avc.c-and-hevc.c-default.patch
git_am_patch ../../contribute/ffmpeg/0008-avformat-flvdec-add-aliyun-extend-auio-codec-id.patch
git_am_patch ../../contribute/ffmpeg/0009-chore-configure-xml2-use-check-lib.patch
}

function git_apply_patch() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 58290af15a04984899b977e3bbffd84041e2ad11 Mon Sep 17 00:00:00 2001
From: pingkai <[email protected]>
Date: Wed, 20 May 2020 10:49:15 +0800
Subject: [PATCH 9/9] chore(configure): xml2 use check lib

Signed-off-by: pingkai <[email protected]>
---
configure | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index d01c86d3fe..099f09de55 100755
--- a/configure
+++ b/configure
@@ -6318,7 +6318,8 @@ enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
{ test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
-enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
+enabled libxml2 && { check_lib xml2 libxml/xmlversion.h xmlCheckVersion -lxml2 -lm||
+ die "ERROR: libxml2 not found";}
enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
--
2.26.0

4 changes: 4 additions & 0 deletions external/player_ffmpeg_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ ffmpeg_config_add_bsfs aac_adtstoasc h264_mp4toannexb hevc_mp4toannexb extract_e
ffmpeg_config_add_protocols file crypto rtmp
ffmpeg_config_add_filters atempo aresample aformat volume


ffmpeg_config_add_user "--enable-libxml2"
ffmpeg_config_add_demuxers dash

#for ffmpeg concat demuxer
ffmpeg_config_add_demuxers concat

Expand Down
6 changes: 6 additions & 0 deletions external/player_git_source_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ fi
CURL_BRANCH="curl-7_63_0"
clone_git $CURL_GIT "$CURL_BRANCH"

if [[ -z "${LIBXML2_GIT}" ]];then
LIBXML2_GIT="https://github.com/GNOME/libxml2.git"
fi
LIBXML2_BRANCH="v2.9.9"
clone_git ${LIBXML2_GIT} "$LIBXML2_BRANCH"

if [[ -z "${DAV1D_EXTERNAL_DIR}" ]];then
if [[ -n "${DAV1D_SOURCE_DIR}" ]];then
echo "check out dav1d"
Expand Down
2 changes: 2 additions & 0 deletions external/user_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ FDK_AAC_SOURCE_DIR=$TOP_DIR/external/fdk-aac/
X264_SOURCE_DIR=$TOP_DIR/external/x264/
OPEN_SSL_SOURCE_DIR=$TOP_DIR/external/openssl/
CURL_SOURCE_DIR=$TOP_DIR/external/curl
LIBXML2_SOURCE_DIR=$TOP_DIR/external/libxml2
#DAV1D_SOURCE_DIR=$TOP_DIR/external/dav1d
#ARES_SOURCE_DIR=$TOP_DIR/external/cares
#RTMPDUMP_SOURCE_DIR=$TOP_DIR/external/rtmpdump/
#ANDROID_NDK=$ANDROID_NDK_HOME
export LIB_NAME=alivcffmpeg
OPENSSL_VERSION_111="True"
SSL_USE_NATIVE="TRUE"
XML_USE_NATIVE="TRUE"

1 change: 1 addition & 0 deletions framework/tests/communication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ target_link_libraries(communicationTest PRIVATE
avformat
avcodec
avutil
xml2
)
target_include_directories(communicationTest PRIVATE
../../
Expand Down
1 change: 1 addition & 0 deletions framework/tests/dataSource/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ target_link_libraries(dataSourceTest PRIVATE
swresample
avutil
swscale
xml2
z
curl
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions framework/tests/decoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ target_link_libraries(
swresample
avutil
swscale
xml2
z
curl
gtest_main
Expand Down
1 change: 1 addition & 0 deletions framework/tests/demuxer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ target_link_libraries(
swresample
avutil
swscale
xml2
z
curl
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions framework/tests/render/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ target_link_libraries(renderTest PRIVATE
swresample
avutil
swscale
xml2
z
curl
ssl
Expand Down
1 change: 1 addition & 0 deletions mediaPlayer/tests/apiTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ target_link_libraries(mediaPlayerApiTest PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS}
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions mediaPlayer/tests/cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ target_link_libraries(mediaPlayerCacheTest PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS}
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions mediaPlayer/tests/formatTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ target_link_libraries(mediaPlayerFormatTest PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS}
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions mediaPlayer/tests/seekTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ target_link_libraries(mediaPlayerSeekTest PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS}
gtest_main)
Expand Down
1 change: 1 addition & 0 deletions mediaPlayer/tests/switch_stream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ target_link_libraries(mediaPlayerSwitchStreamTest PRIVATE
avcodec
swresample
avutil
xml2
curl
${FRAMEWORK_LIBS}
gtest_main)
Expand Down

0 comments on commit 9a7c5a6

Please sign in to comment.