From 0b2a115c6a228bebbe2e6575779387eaa076c814 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sat, 25 Dec 2021 18:07:45 +0000 Subject: [PATCH] add support for zimg openssl and srt, fixes #28 and #241 --- README.md | 36 ++-- android.sh | 6 +- apple.sh | 46 +---- apple/README.md | 28 +-- ios.sh | 4 +- macos.sh | 4 +- scripts/android/ffmpeg.sh | 27 ++- scripts/android/freetype.sh | 2 +- scripts/android/harfbuzz.sh | 2 +- scripts/android/libtheora.sh | 2 +- scripts/android/openssl.sh | 47 +++++ scripts/android/srt.sh | 62 +++++++ scripts/android/twolame.sh | 2 +- scripts/android/zimg.sh | 25 +++ scripts/apple/ffmpeg.sh | 22 ++- scripts/apple/freetype.sh | 2 +- scripts/apple/gnutls.sh | 8 - scripts/apple/harfbuzz.sh | 2 +- scripts/apple/libtheora.sh | 2 +- scripts/apple/openssl.sh | 49 +++++ scripts/apple/sdl.sh | 2 +- scripts/apple/srt.sh | 54 ++++++ scripts/apple/twolame.sh | 2 +- scripts/apple/zimg.sh | 34 ++++ scripts/function-android.sh | 48 ++++- scripts/function-apple.sh | 4 +- scripts/function-ios.sh | 19 +- scripts/function-macos.sh | 11 +- scripts/function-tvos.sh | 11 +- scripts/function.sh | 170 ++++++++++-------- scripts/main-android.sh | 14 +- scripts/main-ios.sh | 14 +- scripts/main-macos.sh | 14 +- scripts/main-tvos.sh | 14 +- scripts/source.sh | 15 ++ scripts/variable.sh | 55 +++--- src/.gitignore | 3 + .../apple/ffmpeg-kit-ios-audio.podspec | 2 +- .../apple/ffmpeg-kit-ios-full-gpl.podspec | 2 +- .../release/apple/ffmpeg-kit-ios-full.podspec | 2 +- .../apple/ffmpeg-kit-ios-https-gpl.podspec | 2 +- .../apple/ffmpeg-kit-ios-https.podspec | 2 +- .../apple/ffmpeg-kit-ios-min-gpl.podspec | 2 +- .../release/apple/ffmpeg-kit-ios-min.podspec | 2 +- .../apple/ffmpeg-kit-ios-video.podspec | 2 +- .../apple/ffmpeg-kit-macos-audio.podspec | 2 +- .../apple/ffmpeg-kit-macos-full-gpl.podspec | 2 +- .../apple/ffmpeg-kit-macos-full.podspec | 2 +- .../apple/ffmpeg-kit-macos-https-gpl.podspec | 2 +- .../apple/ffmpeg-kit-macos-https.podspec | 2 +- .../apple/ffmpeg-kit-macos-min-gpl.podspec | 2 +- .../apple/ffmpeg-kit-macos-min.podspec | 2 +- .../apple/ffmpeg-kit-macos-video.podspec | 2 +- .../apple/ffmpeg-kit-tvos-audio.podspec | 2 +- .../apple/ffmpeg-kit-tvos-full-gpl.podspec | 2 +- .../apple/ffmpeg-kit-tvos-full.podspec | 2 +- .../apple/ffmpeg-kit-tvos-https-gpl.podspec | 2 +- .../apple/ffmpeg-kit-tvos-https.podspec | 2 +- .../apple/ffmpeg-kit-tvos-min-gpl.podspec | 2 +- .../release/apple/ffmpeg-kit-tvos-min.podspec | 2 +- .../apple/ffmpeg-kit-tvos-video.podspec | 2 +- tools/release/ios.sh | 2 +- tools/release/macos.sh | 2 +- tools/release/tvos.sh | 2 +- tvos.sh | 4 +- 65 files changed, 653 insertions(+), 267 deletions(-) create mode 100644 scripts/android/openssl.sh create mode 100644 scripts/android/srt.sh create mode 100644 scripts/android/zimg.sh create mode 100644 scripts/apple/openssl.sh create mode 100644 scripts/apple/srt.sh create mode 100644 scripts/apple/zimg.sh diff --git a/README.md b/README.md index ad2ccdad..511d5b5f 100644 --- a/README.md +++ b/README.md @@ -137,25 +137,25 @@ indicates that `FFmpeg` source code is cloned from the `FFmpeg` `master` branch. This table shows the differences between two variants. -| | Main Release | LTS Release | -| :----: | :----: | :----: | -| Android API Level | 24 | 16 | -| Android Camera Access | Yes | - | +| | Main Release | LTS Release | +| :----: | :----: |:---------------------------------------------------------:| +| Android API Level | 24 | 16 | +| Android Camera Access | Yes | - | | Android Architectures | arm-v7a-neon
arm64-v8a
x86
x86-64 | arm-v7a
arm-v7a-neon
arm64-v8a
x86
x86-64 | -| iOS Min SDK | 12.1 | 9.3 | -| iOS VideoToolbox | Yes | - | -| iOS AVFoundation | Yes | - | -| iOS Architectures | arm64
arm64-simulator
arm64-mac-catalyst
x86-64
x86-64-mac-catalyst | armv7
arm64
i386
x86-64 | -| iOS Bundle Format | XCFrameworks | Frameworks | -| Mac Catalyst Min Version | 14.0 | - | -| macOS Min SDK | 10.15 | 10.11 | -| macOS AVFoundation | Yes | - | -| macOS Architectures | arm64
x86-64 | x86-64 | -| macOS Bundle Format | XCFrameworks | Frameworks | -| tvOS Min SDK | 11.0 | 9.2 | -| tvOS VideoToolbox | Yes | - | -| tvOS Architectures | arm64
x86-64
arm64-simulator | arm64
x86-64 | -| tvOS Bundle Format | XCFrameworks | Frameworks | +| iOS Min SDK | 12.1 | 10 | +| iOS VideoToolbox | Yes | - | +| iOS AVFoundation | Yes | - | +| iOS Architectures | arm64
arm64-simulator
arm64-mac-catalyst
x86-64
x86-64-mac-catalyst | armv7
arm64
i386
x86-64 | +| iOS Bundle Format | XCFrameworks | Frameworks | +| Mac Catalyst Min Version | 14.0 | - | +| macOS Min SDK | 10.15 | 10.12 | +| macOS AVFoundation | Yes | - | +| macOS Architectures | arm64
x86-64 | x86-64 | +| macOS Bundle Format | XCFrameworks | Frameworks | +| tvOS Min SDK | 11.0 | 10.0 | +| tvOS VideoToolbox | Yes | - | +| tvOS Architectures | arm64
x86-64
arm64-simulator | arm64
x86-64 | +| tvOS Bundle Format | XCFrameworks | Frameworks | ### 11. Documentation diff --git a/android.sh b/android.sh index 4f9e4841..89d488d7 100755 --- a/android.sh +++ b/android.sh @@ -138,7 +138,7 @@ fi # PROCESS FULL OPTION AS LAST OPTION if [[ -n ${BUILD_FULL} ]]; then - for library in {0..58}; do + for library in {0..61}; do if [ ${GPL_ENABLED} == "yes" ]; then enable_library "$(get_library_name $library)" 1 else @@ -214,7 +214,7 @@ for run_arch in {0..12}; do . "${BASEDIR}"/scripts/main-android.sh "${ENABLED_LIBRARIES[@]}" || exit 1 # CLEAR FLAGS - for library in {0..58}; do + for library in {0..61}; do library_name=$(get_library_name ${library}) unset "$(echo "OK_${library_name}" | sed "s/\-/\_/g")" unset "$(echo "DEPENDENCY_REBUILT_${library_name}" | sed "s/\-/\_/g")" @@ -272,7 +272,7 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then # COPY LICENSES LICENSE_BASEDIR="${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/res/raw rm -f "${LICENSE_BASEDIR}"/*.txt 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - for library in {0..46}; do + for library in {0..49}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name ${library} | sed 's/-/_/g') LICENSE_FILE="${LICENSE_BASEDIR}/license_${ENABLED_LIBRARY}.txt" diff --git a/apple.sh b/apple.sh index a05295f1..a1a13254 100755 --- a/apple.sh +++ b/apple.sh @@ -63,15 +63,18 @@ After that this script should be used to create an umbrella xcframework.\n" echo -e " --enable-libxml2\t\tbuild umbrella xcframework for libxml2 [no]" echo -e " --enable-opencore-amr\t\tbuild umbrella xcframework for opencore-amr [no]" echo -e " --enable-openh264\t\tbuild umbrella xcframework for openh264 [no]" + echo -e " --enable-openssl\t\tbuild umbrella xcframework for openssl [no]" echo -e " --enable-opus\t\t\tbuild umbrella xcframework for opus [no]" echo -e " --enable-sdl\t\t\tbuild umbrella xcframework for sdl [no]" echo -e " --enable-shine\t\tbuild umbrella xcframework for shine [no]" echo -e " --enable-snappy\t\tbuild umbrella xcframework for snappy [no]" echo -e " --enable-soxr\t\t\tbuild umbrella xcframework for soxr [no]" echo -e " --enable-speex\t\tbuild umbrella xcframework for speex [no]" + echo -e " --enable-srt\t\t\tbuild umbrella xcframework for srt [no]" echo -e " --enable-tesseract\t\tbuild umbrella xcframework for tesseract [no]" echo -e " --enable-twolame\t\tbuild umbrella xcframework for twolame [no]" - echo -e " --enable-vo-amrwbenc\t\tbuild umbrella xcframework for vo-amrwbenc [no]\n" + echo -e " --enable-vo-amrwbenc\t\tbuild umbrella xcframework for vo-amrwbenc [no]" + echo -e " --enable-zimg\t\t\tbuild umbrella xcframework for zimg [no]\n" echo -e "GPL libraries:" echo -e " --enable-libvidstab\t\tbuild umbrella xcframework for libvidstab [no]" @@ -244,7 +247,7 @@ done # PROCESS FULL OPTION AS LAST OPTION if [[ -n ${BUILD_FULL} ]]; then - for library in {0..58}; do + for library in {0..61}; do if [ ${GPL_ENABLED} == "yes" ]; then set_library "$(get_library_name "$library")" 1 else @@ -309,45 +312,6 @@ if [[ -n ${TARGET_ARCHITECTURE_VARIANT_INDEX_ARRAY[0]} ]]; then # INITIALIZE TARGET FOLDERS initialize_prebuilt_umbrella_xcframework_folders - # BUILD XCFRAMEWORKS FOR ENABLED LIBRARIES ON ENABLED ARCHITECTURE VARIANTS - for library in {0..46}; do - if [[ ${ENABLED_LIBRARIES[${library}]} -eq 1 ]]; then - - if [[ ${LIBRARY_LIBTHEORA} == "${library}" ]]; then - - create_umbrella_xcframework "libtheora" - create_umbrella_xcframework "libtheoraenc" - create_umbrella_xcframework "libtheoradec" - - elif [[ ${LIBRARY_LIBVORBIS} == "${library}" ]]; then - - create_umbrella_xcframework "libvorbisfile" - create_umbrella_xcframework "libvorbisenc" - create_umbrella_xcframework "libvorbis" - - elif [[ ${LIBRARY_LIBWEBP} == "${library}" ]]; then - - create_umbrella_xcframework "libwebpmux" - create_umbrella_xcframework "libwebpdemux" - create_umbrella_xcframework "libwebp" - - elif [[ ${LIBRARY_OPENCOREAMR} == "${library}" ]]; then - - create_umbrella_xcframework "libopencore-amrnb" - - elif [[ ${LIBRARY_NETTLE} == "${library}" ]]; then - - create_umbrella_xcframework "libnettle" - create_umbrella_xcframework "libhogweed" - - else - - create_umbrella_xcframework "$(get_static_archive_name "${library}")" - - fi - fi - done - for FFMPEG_LIB in "${FFMPEG_LIBS[@]}"; do create_umbrella_xcframework "${FFMPEG_LIB}" done diff --git a/apple/README.md b/apple/README.md index 110b16d4..2beaaad4 100644 --- a/apple/README.md +++ b/apple/README.md @@ -2,36 +2,36 @@ ### 1. Features #### 1.1 iOS -- Supports `iOS SDK 12.1+` on Main releases and `iOS SDK 9.3+` on LTS releases +- Supports `iOS SDK 12.1+` on Main releases and `iOS SDK 10+` on LTS releases - Includes `armv7`, `armv7s`, `arm64`, `arm64-simulator`, `arm64e`, `i386`, `x86_64`, `x86_64-mac-catalyst` and `arm64-mac-catalyst` architectures - Objective-C API - Camera access - `ARC` enabled library - Built with `-fembed-bitcode` flag -- Creates static `frameworks`, static `xcframeworks` and static `universal (fat)` libraries (.a) +- Creates shared `frameworks` and `xcframeworks` #### 1.2 macOS -- Supports `macOS SDK 10.15+` on Main releases and `macOS SDK 10.11+` on LTS releases +- Supports `macOS SDK 10.15+` on Main releases and `macOS SDK 10.12+` on LTS releases - Includes `arm64` and `x86_64` architectures - Objective-C API - Camera access - `ARC` enabled library - Built with `-fembed-bitcode` flag -- Creates static `frameworks`, static `xcframeworks` and static `universal (fat)` libraries (.a) +- Creates shared `frameworks` and `xcframeworks` #### 1.3 tvOS -- Supports `tvOS SDK 10.2+` on Main releases and `tvOS SDK 9.2+` on LTS releases +- Supports `tvOS SDK 11.0+` on Main releases and `tvOS SDK 10.0+` on LTS releases - Includes `arm64`, `arm64-simulator` and `x86_64` architectures - Objective-C API - `ARC` enabled library - Built with `-fembed-bitcode` flag -- Creates static `frameworks`, static `xcframeworks` and static `universal (fat)` libraries (.a) +- Creates shared `frameworks` and `xcframeworks` ### 2. Building -Run `ios.sh`/`macos.sh`/`tvos.sh` at project root directory to build `ffmpeg-kit` and `ffmpeg` static libraries for a -platform. +Run `ios.sh`/`macos.sh`/`tvos.sh` inside the project root to build `ffmpeg-kit` and `ffmpeg` shared libraries +for a platform. Optionally, use `apple.sh` to combine bundles created by these three scripts in a single bundle. @@ -45,20 +45,20 @@ Please note that `FFmpegKit` project repository includes the source code of `FFm ##### 2.1.1 iOS -- **Xcode 7.3.1** or later -- **iOS SDK 9.3** or later +- **Xcode 8.0** or later +- **iOS SDK 10** or later - **Command Line Tools** ##### 2.1.2 macOS -- **Xcode 7.3.1** or later -- **macOS SDK 10.11** or later +- **Xcode 8.0** or later +- **macOS SDK 10.12** or later - **Command Line Tools** ##### 2.1.3 tvOS -- **Xcode 7.3.1** or later -- **tvOS SDK 9.2** or later +- **Xcode 8.0** or later +- **tvOS SDK 10.0** or later - **Command Line Tools** ##### 2.1.4 Packages diff --git a/ios.sh b/ios.sh index 4e7b39f9..7e3677fb 100755 --- a/ios.sh +++ b/ios.sh @@ -144,7 +144,7 @@ done # PROCESS FULL OPTION AS LAST OPTION if [[ -n ${BUILD_FULL} ]]; then - for library in {0..58}; do + for library in {0..61}; do if [ ${GPL_ENABLED} == "yes" ]; then enable_library "$(get_library_name "$library")" 1 else @@ -240,7 +240,7 @@ for run_arch in {0..12}; do TARGET_ARCH_LIST+=("${FULL_ARCH}") # CLEAR FLAGS - for library in {0..58}; do + for library in {0..61}; do library_name=$(get_library_name "${library}") unset "$(echo "OK_${library_name}" | sed "s/\-/\_/g")" unset "$(echo "DEPENDENCY_REBUILT_${library_name}" | sed "s/\-/\_/g")" diff --git a/macos.sh b/macos.sh index 988ae643..a6ae0d73 100755 --- a/macos.sh +++ b/macos.sh @@ -139,7 +139,7 @@ done # PROCESS FULL OPTION AS LAST OPTION if [[ -n ${BUILD_FULL} ]]; then - for library in {0..58}; do + for library in {0..61}; do if [ ${GPL_ENABLED} == "yes" ]; then enable_library "$(get_library_name "$library")" 1 else @@ -209,7 +209,7 @@ for run_arch in {0..12}; do TARGET_ARCH_LIST+=("${FULL_ARCH}") # CLEAR FLAGS - for library in {0..58}; do + for library in {0..61}; do library_name=$(get_library_name "${library}") unset "$(echo "OK_${library_name}" | sed "s/\-/\_/g")" unset "$(echo "DEPENDENCY_REBUILT_${library_name}" | sed "s/\-/\_/g")" diff --git a/scripts/android/ffmpeg.sh b/scripts/android/ffmpeg.sh index c04b9e9a..627bdedd 100755 --- a/scripts/android/ffmpeg.sh +++ b/scripts/android/ffmpeg.sh @@ -72,7 +72,7 @@ CONFIGURE_POSTFIX="" HIGH_PRIORITY_INCLUDES="" # SET CONFIGURE OPTIONS -for library in {1..58}; do +for library in {1..62}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) @@ -194,6 +194,11 @@ for library in {1..58}; do LDFLAGS+=" $(pkg-config --libs --static openh264 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libopenh264" ;; + openssl) + CFLAGS+=" $(pkg-config --cflags openssl 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static openssl 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-openssl" + ;; opus) CFLAGS+=" $(pkg-config --cflags opus 2>>"${BASEDIR}"/build.log)" LDFLAGS+=" $(pkg-config --libs --static opus 2>>"${BASEDIR}"/build.log)" @@ -229,6 +234,11 @@ for library in {1..58}; do LDFLAGS+=" $(pkg-config --libs --static speex 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libspeex" ;; + srt) + CFLAGS+=" $(pkg-config --cflags srt 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static srt 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libsrt" + ;; tesseract) CFLAGS+=" $(pkg-config --cflags tesseract 2>>"${BASEDIR}"/build.log)" LDFLAGS+=" $(pkg-config --libs --static tesseract 2>>"${BASEDIR}"/build.log)" @@ -261,6 +271,11 @@ for library in {1..58}; do LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libxvid --enable-gpl" ;; + zimg) + CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)" + LDFLAGS+=" $(pkg-config --libs --static zimg 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libzimg" + ;; expat) CFLAGS+=" $(pkg-config --cflags expat 2>>"${BASEDIR}"/build.log)" LDFLAGS+=" $(pkg-config --libs --static expat 2>>"${BASEDIR}"/build.log)" @@ -302,6 +317,8 @@ for library in {1..58}; do CONFIGURE_POSTFIX+=" --disable-zlib" elif [[ ${library} -eq $((LIBRARY_ANDROID_MEDIA_CODEC + 1)) ]]; then CONFIGURE_POSTFIX+=" --disable-mediacodec" + elif [[ ${library} -eq $((LIBRARY_OPENSSL + 1)) ]]; then + CONFIGURE_POSTFIX+=" --disable-openssl" fi fi done @@ -394,25 +411,27 @@ fi --enable-version3 \ --arch="${TARGET_ARCH}" \ --cpu="${TARGET_CPU}" \ + --target-os=android \ + ${ASM_OPTIONS} \ + --ar="${AR}" \ --cc="${CC}" \ --cxx="${CXX}" \ --ranlib="${RANLIB}" \ --strip="${STRIP}" \ --nm="${NM}" \ --extra-libs="$(pkg-config --libs --static cpu-features)" \ - --target-os=android \ - ${ASM_OPTIONS} \ + --disable-autodetect \ --enable-cross-compile \ --enable-pic \ --enable-jni \ --enable-optimizations \ --enable-swscale \ ${BUILD_LIBRARY_OPTIONS} \ + --enable-pthreads \ --enable-v4l2-m2m \ --disable-outdev=fbdev \ --disable-indev=fbdev \ ${SIZE_OPTIONS} \ - --disable-openssl \ --disable-xmm-clobber-test \ ${DEBUG_OPTIONS} \ --disable-neon-clobber-test \ diff --git a/scripts/android/freetype.sh b/scripts/android/freetype.sh index e455dfdf..17cd9457 100755 --- a/scripts/android/freetype.sh +++ b/scripts/android/freetype.sh @@ -11,7 +11,7 @@ make distclean 2>/dev/null 1>/dev/null if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/builds/unix/configure ]] || [[ ${RECONF_freetype} -eq 1 ]]; then # NOTE THAT FREETYPE DOES NOT SUPPORT AUTORECONF BUT IT COMES WITH AN autogen.sh - ./autogen.sh || return 1 + ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/android/harfbuzz.sh b/scripts/android/harfbuzz.sh index f739d4ff..7955637f 100755 --- a/scripts/android/harfbuzz.sh +++ b/scripts/android/harfbuzz.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_harfbuzz} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || return 1 + NOCONFIGURE=1 ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/android/libtheora.sh b/scripts/android/libtheora.sh index c84f0494..a28053ba 100755 --- a/scripts/android/libtheora.sh +++ b/scripts/android/libtheora.sh @@ -16,7 +16,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libtheora} # WORKAROUND NOT TO RUN CONFIGURE AT THE END OF autogen.sh ${SED_INLINE} 's/$srcdir\/configure/#$srcdir\/configure/g' "${BASEDIR}"/src/"${LIB_NAME}"/autogen.sh || return 1 - ./autogen.sh || return 1 + ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/android/openssl.sh b/scripts/android/openssl.sh new file mode 100644 index 00000000..2116804b --- /dev/null +++ b/scripts/android/openssl.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +arm-v7a | arm-v7a-neon) + ASM_OPTIONS="linux-generic32" + ;; +arm64-v8a) + ASM_OPTIONS="linux-generic64 enable-ec_nistp_64_gcc_128" + ;; +x86) + ASM_OPTIONS="linux-generic32 386" + ;; +x86-64) + ASM_OPTIONS="linux-generic64 enable-ec_nistp_64_gcc_128" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_openssl} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +fi + +INT128_AVAILABLE=$($CC -dM -E - >"${BASEDIR}"/build.log | grep __SIZEOF_INT128__) + +echo -e "INFO: __uint128_t detection output: $INT128_AVAILABLE\n" 1>>"${BASEDIR}"/build.log 2>&1 + +./Configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + zlib \ + no-shared \ + no-engine \ + no-dso \ + no-legacy \ + ${ASM_OPTIONS} \ + no-tests || return 1 + +make -j$(get_cpu_count) build_sw || return 1 + +make install_sw install_ssldirs || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/android/srt.sh b/scripts/android/srt.sh new file mode 100644 index 00000000..b12bdcaf --- /dev/null +++ b/scripts/android/srt.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +git clean -dfx 2>/dev/null 1>/dev/null + +# OVERRIDE SYSTEM PROCESSOR +SYSTEM_PROCESSOR="" +case ${ARCH} in +arm-v7a | arm-v7a-neon) + SYSTEM_PROCESSOR="armv7-a" + ;; +arm64-v8a) + SYSTEM_PROCESSOR="aarch64" + ;; +x86) + SYSTEM_PROCESSOR="i686" + ;; +x86-64) + SYSTEM_PROCESSOR="x86_64" + ;; +esac + +# WORKAROUND TO GENERATE BASE BUILD FILES +./configure || echo "" 2>/dev/null 1>/dev/null + +cmake -Wno-dev \ + -DUSE_ENCLIB=openssl \ + -DCMAKE_VERBOSE_MAKEFILE=0 \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \ + -DCMAKE_SYSROOT="${ANDROID_SYSROOT}" \ + -DCMAKE_FIND_ROOT_PATH="${ANDROID_SYSROOT}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ + -DCMAKE_SYSTEM_NAME=Android \ + -DCMAKE_SYSTEM_VERSION=${API} \ + -DCMAKE_ANDROID_NDK=${ANDROID_NDK_ROOT} \ + -DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CXX" \ + -DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CC" \ + -DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$LD" \ + -DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AR" \ + -DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AS" \ + -DCMAKE_SYSTEM_LOADED=1 \ + -DCMAKE_SYSTEM_PROCESSOR="${SYSTEM_PROCESSOR}" \ + -DENABLE_STDCXX_SYNC=1 \ + -DENABLE_MONOTONIC_CLOCK=1 \ + -DENABLE_STDCXX_SYNC=1 \ + -DENABLE_CXX11=1 \ + -DUSE_OPENSSL_PC=1 \ + -DENABLE_DEBUG=0 \ + -DENABLE_LOGGING=0 \ + -DENABLE_HEAVY_LOGGING=0 \ + -DENABLE_APPS=0 \ + -DENABLE_SHARED=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# CREATE PACKAGE CONFIG MANUALLY +create_srt_package_config "1.4.4" || return 1 \ No newline at end of file diff --git a/scripts/android/twolame.sh b/scripts/android/twolame.sh index 8b6a3406..51c208d3 100755 --- a/scripts/android/twolame.sh +++ b/scripts/android/twolame.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_twolame} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || return 1 + NOCONFIGURE=1 ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/android/zimg.sh b/scripts/android/zimg.sh new file mode 100644 index 00000000..08713d72 --- /dev/null +++ b/scripts/android/zimg.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_zimg} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +fi + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --with-pic \ + --with-sysroot="${SDK_PATH}" \ + --enable-static \ + --disable-shared \ + --disable-fast-install \ + --host="${HOST}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# CREATE PACKAGE CONFIG MANUALLY +create_zimg_package_config "3.0.3" || return 1 diff --git a/scripts/apple/ffmpeg.sh b/scripts/apple/ffmpeg.sh index e24bebfc..68f3c155 100755 --- a/scripts/apple/ffmpeg.sh +++ b/scripts/apple/ffmpeg.sh @@ -104,7 +104,7 @@ esac CONFIGURE_POSTFIX="" # SET CONFIGURE OPTIONS -for library in {1..59}; do +for library in {1..62}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) @@ -211,6 +211,11 @@ for library in {1..59}; do FFMPEG_LDFLAGS+=" $(pkg-config --libs --static openh264 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libopenh264" ;; + openssl) + FFMPEG_CFLAGS+=" $(pkg-config --cflags openssl 2>>"${BASEDIR}"/build.log)" + FFMPEG_LDFLAGS+=" $(pkg-config --libs --static openssl 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-openssl" + ;; opus) FFMPEG_CFLAGS+=" $(pkg-config --cflags opus 2>>"${BASEDIR}"/build.log)" FFMPEG_LDFLAGS+=" $(pkg-config --libs --static opus 2>>"${BASEDIR}"/build.log)" @@ -247,6 +252,11 @@ for library in {1..59}; do FFMPEG_LDFLAGS+=" $(pkg-config --libs --static speex 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libspeex" ;; + srt) + FFMPEG_CFLAGS+=" $(pkg-config --cflags srt 2>>"${BASEDIR}"/build.log)" + FFMPEG_LDFLAGS+=" $(pkg-config --libs --static srt 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libsrt" + ;; tesseract) FFMPEG_CFLAGS+=" $(pkg-config --cflags tesseract 2>>"${BASEDIR}"/build.log)" FFMPEG_LDFLAGS+=" $(pkg-config --libs --static tesseract 2>>"${BASEDIR}"/build.log)" @@ -279,6 +289,11 @@ for library in {1..59}; do FFMPEG_LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)" CONFIGURE_POSTFIX+=" --enable-libxvid --enable-gpl" ;; + zimg) + FFMPEG_CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)" + FFMPEG_LDFLAGS+=" $(pkg-config --libs --static zimg 2>>"${BASEDIR}"/build.log)" + CONFIGURE_POSTFIX+=" --enable-libzimg" + ;; expat) FFMPEG_CFLAGS+=" $(pkg-config --cflags expat 2>>"${BASEDIR}"/build.log)" FFMPEG_LDFLAGS+=" $(pkg-config --libs --static expat 2>>"${BASEDIR}"/build.log)" @@ -371,6 +386,8 @@ for library in {1..59}; do CONFIGURE_POSTFIX+=" --disable-videotoolbox" elif [[ ${library} -eq $((LIBRARY_APPLE_ZLIB + 1)) ]]; then CONFIGURE_POSTFIX+=" --disable-zlib" + elif [[ ${library} -eq $((LIBRARY_OPENSSL + 1)) ]]; then + CONFIGURE_POSTFIX+=" --disable-openssl" fi fi done @@ -473,8 +490,6 @@ ${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffb --as="${AS}" \ --ranlib="${RANLIB}" \ --strip="${STRIP}" \ - --ranlib="${RANLIB}" \ - --strip="${STRIP}" \ --nm="${NM}" \ --extra-ldflags="$(get_min_version_cflags)" \ --disable-autodetect \ @@ -491,7 +506,6 @@ ${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffb --disable-indev=v4l2 \ --disable-indev=fbdev \ ${SIZE_OPTIONS} \ - --disable-openssl \ --disable-xmm-clobber-test \ ${DEBUG_OPTIONS} \ --disable-neon-clobber-test \ diff --git a/scripts/apple/freetype.sh b/scripts/apple/freetype.sh index f70cfcc7..88848a84 100755 --- a/scripts/apple/freetype.sh +++ b/scripts/apple/freetype.sh @@ -11,7 +11,7 @@ make distclean 2>/dev/null 1>/dev/null if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/builds/unix/configure ]] || [[ ${RECONF_freetype} -eq 1 ]]; then # NOTE THAT FREETYPE DOES NOT SUPPORT AUTORECONF BUT IT COMES WITH AN autogen.sh - ./autogen.sh || return 1 + ./autogen.sh || exit 1 fi # UPDATE CONFIG FILES TO SUPPORT APPLE ARCHITECTURES diff --git a/scripts/apple/gnutls.sh b/scripts/apple/gnutls.sh index 6a1ac913..a86fc50b 100755 --- a/scripts/apple/gnutls.sh +++ b/scripts/apple/gnutls.sh @@ -12,14 +12,6 @@ export HOGWEED_LIBS="-L${LIB_INSTALL_BASE}/nettle/lib -lhogweed -L${LIB_INSTALL_ export GMP_CFLAGS="-I${LIB_INSTALL_BASE}/gmp/include" export GMP_LIBS="-L${LIB_INSTALL_BASE}/gmp/lib -lgmp" -# SET BUILD OPTIONS -case ${ARCH} in -i386) - # DISABLING thread_local WHICH IS NOT SUPPORTED ON i386 - export CFLAGS+=" -D__thread=" - ;; -esac - # ALWAYS CLEAN THE PREVIOUS BUILD make distclean 2>/dev/null 1>/dev/null diff --git a/scripts/apple/harfbuzz.sh b/scripts/apple/harfbuzz.sh index 07dba4c5..4b71744a 100755 --- a/scripts/apple/harfbuzz.sh +++ b/scripts/apple/harfbuzz.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_harfbuzz} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || return 1 + NOCONFIGURE=1 ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/apple/libtheora.sh b/scripts/apple/libtheora.sh index 84696bb5..fe822f3c 100755 --- a/scripts/apple/libtheora.sh +++ b/scripts/apple/libtheora.sh @@ -9,7 +9,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libtheora} # WORKAROUND NOT TO RUN CONFIGURE AT THE END OF autogen.sh ${SED_INLINE} 's/$srcdir\/configure/#$srcdir\/configure/g' "${BASEDIR}"/src/"${LIB_NAME}"/autogen.sh || return 1 - ./autogen.sh || return 1 + ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/apple/openssl.sh b/scripts/apple/openssl.sh new file mode 100644 index 00000000..68d78dc5 --- /dev/null +++ b/scripts/apple/openssl.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +if [[ ${ARCH} == "i386" ]] || [[ ${ARCH} == "armv7"* ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then + + # openssl does not support 32-bit apple architectures and tvos yet + echo -e "ERROR: openssl is not supported on $ARCH architecture for $FFMPEG_KIT_BUILD_TYPE platform.\n" 1>>"${BASEDIR}"/build.log 2>&1 + return 200 +fi + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +arm64 | arm64e | arm64-mac-catalyst | arm64-simulator | x86-64 | x86-64-mac-catalyst) + ASM_OPTIONS="enable-ec_nistp_64_gcc_128" + ;; +i386) + ASM_OPTIONS="386" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_openssl} -eq 1 ]]; then + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +fi + +INT128_AVAILABLE=$($CC -dM -E - >"${BASEDIR}"/build.log | grep __SIZEOF_INT128__) + +echo -e "INFO: __uint128_t detection output: $INT128_AVAILABLE\n" 1>>"${BASEDIR}"/build.log 2>&1 + +./Configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + zlib \ + no-shared \ + no-engine \ + no-dso \ + no-legacy \ + ${ASM_OPTIONS} \ + no-tests \ + iphoneos-cross || return 1 + +make -j$(get_cpu_count) build_sw || return 1 + +make install_sw install_ssldirs || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/apple/sdl.sh b/scripts/apple/sdl.sh index 43471eb4..5c97e99a 100755 --- a/scripts/apple/sdl.sh +++ b/scripts/apple/sdl.sh @@ -15,7 +15,7 @@ make distclean 2>/dev/null 1>/dev/null overwrite_file "${BASEDIR}/tools/patch/make/sdl/configure.in" "${BASEDIR}/src/${LIB_NAME}/configure.in" # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -./autogen.sh || return 1 +./autogen.sh || exit 1 # WORKAROUND TO EXCLUDE libunwind.h ON LTS BUILDS if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]]; then diff --git a/scripts/apple/srt.sh b/scripts/apple/srt.sh new file mode 100644 index 00000000..54e0edec --- /dev/null +++ b/scripts/apple/srt.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +mkdir -p "${BUILD_DIR}" || return 1 +cd "${BUILD_DIR}" || return 1 + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +*-mac-catalyst) + ASM_OPTIONS="-DENABLE_MONOTONIC_CLOCK=0" + ;; +*) + ASM_OPTIONS="-DENABLE_MONOTONIC_CLOCK=1" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +git clean -dfx 2>/dev/null 1>/dev/null + +cmake -Wno-dev \ + -DUSE_ENCLIB=openssl \ + -DCMAKE_VERBOSE_MAKEFILE=0 \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \ + -DCMAKE_SYSROOT="${SDK_PATH}" \ + -DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \ + -DCMAKE_OSX_SYSROOT="$(get_sdk_name)" \ + -DCMAKE_OSX_ARCHITECTURES="$(get_cmake_osx_architectures)" \ + -DCMAKE_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ + -DCMAKE_CXX_COMPILER="$CXX" \ + -DCMAKE_C_COMPILER="$CC" \ + -DCMAKE_LINKER="$LD" \ + -DCMAKE_AR="$(xcrun --sdk $(get_sdk_name) -f ar)" \ + -DCMAKE_AS="$AS" \ + -DCMAKE_SYSTEM_PROCESSOR="$(get_target_cpu)" \ + ${ASM_OPTIONS} \ + -DENABLE_STDCXX_SYNC=1 \ + -DENABLE_CXX11=1 \ + -DUSE_OPENSSL_PC=1 \ + -DENABLE_DEBUG=0 \ + -DENABLE_LOGGING=0 \ + -DENABLE_HEAVY_LOGGING=0 \ + -DENABLE_APPS=0 \ + -DENABLE_SHARED=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 \ No newline at end of file diff --git a/scripts/apple/twolame.sh b/scripts/apple/twolame.sh index ae27b2f4..7a5de639 100755 --- a/scripts/apple/twolame.sh +++ b/scripts/apple/twolame.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_twolame} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || return 1 + NOCONFIGURE=1 ./autogen.sh || exit 1 fi ./configure \ diff --git a/scripts/apple/zimg.sh b/scripts/apple/zimg.sh new file mode 100644 index 00000000..0e0ae64b --- /dev/null +++ b/scripts/apple/zimg.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# SET BUILD OPTIONS +ASM_OPTIONS="" +case ${ARCH} in +armv7 | armv7s) + ASM_OPTIONS="--disable-simd" + ;; +esac + +# ALWAYS CLEAN THE PREVIOUS BUILD +make distclean 2>/dev/null 1>/dev/null + +# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED +if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_zimg} -eq 1 ]]; then + ./autogen.sh || exit 1 +fi + +./configure \ + --prefix="${LIB_INSTALL_PREFIX}" \ + --with-pic \ + --with-sysroot="${SDK_PATH}" \ + --enable-static \ + --disable-shared \ + --disable-fast-install \ + ${ASM_OPTIONS} \ + --host="${HOST}" || return 1 + +make -j$(get_cpu_count) || return 1 + +make install || return 1 + +# MANUALLY COPY PKG-CONFIG FILES +cp ./zimg.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1 diff --git a/scripts/function-android.sh b/scripts/function-android.sh index 389a2c8c..c7894aac 100755 --- a/scripts/function-android.sh +++ b/scripts/function-android.sh @@ -33,7 +33,7 @@ under the prebuilt folder.\n" echo -e "Usage: ./$COMMAND [OPTION]... [VAR=VALUE]...\n" echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n" - display_help_options " -l, --lts\t\t\tbuild lts packages to support API 16+ devices" " --api-level=api\t\toverride Android api level" " --no-ffmpeg-kit-protocols\tdisable custom ffmpeg-kit protocols (fd, saf)" + display_help_options " -l, --lts\t\t\tbuild lts packages to support API 16+ devices" " --api-level=api\t\toverride Android api level" " --no-ffmpeg-kit-protocols\tdisable custom ffmpeg-kit protocols (saf)" display_help_licensing echo -e "Architectures:" @@ -69,7 +69,7 @@ build_application_mk() { local LTS_BUILD_FLAG="-DFFMPEG_KIT_LTS " fi - if [[ ${ENABLED_LIBRARIES[$LIBRARY_X265]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_TESSERACT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_OPENH264]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SNAPPY]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_RUBBERBAND]} -eq 1 ]]; then + if [[ ${ENABLED_LIBRARIES[$LIBRARY_X265]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_TESSERACT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_OPENH264]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SNAPPY]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_RUBBERBAND]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_ZIMG]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SRT]} -eq 1 ]]; then local APP_STL="c++_shared" else local APP_STL="none" @@ -334,7 +334,7 @@ get_app_specific_cflags() { rubberband) APP_FLAGS="-std=c99 -Wno-unused-function" ;; - libvpx | shine) + libvpx | openssl | shine | srt) APP_FLAGS="-Wno-unused-function" ;; soxr | snappy | libwebp) @@ -392,7 +392,7 @@ get_cxxflags() { x265) echo "-std=c++11 -fno-exceptions ${OPTIMIZATION_FLAGS}" ;; - rubberband) + rubberband | srt | zimg) echo "-std=c++11 ${OPTIMIZATION_FLAGS}" ;; *) @@ -418,7 +418,7 @@ get_common_linked_libraries() { libvpx) echo "-lc -lm ${COMMON_LIBRARY_PATHS}" ;; - tesseract | x265) + srt | tesseract | x265) echo "-lc -lm -ldl -llog -lc++_shared ${COMMON_LIBRARY_PATHS}" ;; *) @@ -803,6 +803,26 @@ Cflags: -I\${includedir} EOF } +create_srt_package_config() { + local SRT_VERSION="$1" + + cat >"${INSTALL_PKG_CONFIG_DIR}/srt.pc" <"${INSTALL_PKG_CONFIG_DIR}/zimg.pc" <>"${BASEDIR}"/build.log 2>&1 fi - for library in {0..46}; do + for library in {0..49}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then local ENABLED_LIBRARY_NAME="$(get_library_name ${library})" local ENABLED_LIBRARY_NAME_UPPERCASE=$(echo "${ENABLED_LIBRARY_NAME}" | tr '[a-z]' '[A-Z]') @@ -397,7 +397,7 @@ create_ffmpeg_framework() { # COPY EXTERNAL LIBRARY LICENSES if [[ "${FFMPEG_LIB}" == "libavcodec" ]]; then - for library in {0..46}; do + for library in {0..49}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then local ENABLED_LIBRARY_NAME="$(get_library_name ${library})" local ENABLED_LIBRARY_NAME_UPPERCASE=$(echo "${ENABLED_LIBRARY_NAME}" | tr '[a-z]' '[A-Z]') diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index f00de1a4..09fab5b7 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -27,7 +27,7 @@ libraries are created under the prebuilt folder.\n" echo -e "Usage: ./$COMMAND [OPTION]...\n" echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n" - display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.3+ devices" " --target=ios sdk version\t\t\toverride minimum deployment target [12.1]" " --mac-catalyst-target=ios sdk version\toverride minimum deployment target for mac catalyst [14.0]" + display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10+ devices" " --target=ios sdk version\t\t\toverride minimum deployment target [12.1]" " --mac-catalyst-target=ios sdk version\toverride minimum deployment target for mac catalyst [14.0]" display_help_licensing echo -e "Architectures:" @@ -77,12 +77,12 @@ enable_main_build() { enable_lts_build() { export FFMPEG_KIT_LTS_BUILD="1" - if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "9.3") -le 0 ]]; then + if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "10") -le 0 ]]; then export IOS_MIN_VERSION=$DETECTED_IOS_SDK_VERSION else - # XCODE 7.3 HAS IOS SDK 9.3 - export IOS_MIN_VERSION=9.3 + # XCODE 8.0 HAS IOS SDK 10 + export IOS_MIN_VERSION=10 fi if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "13.0") -le 0 ]]; then @@ -139,8 +139,7 @@ get_arch_specific_cflags() { echo "-arch arm64e -target $(get_target) -march=armv8.3-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64E" ;; i386) - # DISABLING thread_local WHICH IS NOT SUPPORTED ON i386 - echo "-arch i386 -target $(get_target) -march=i386 -mtune=i386 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_I386 -D__thread= " + echo "-arch i386 -target $(get_target) -march=i386 -mtune=i386 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_I386" ;; x86-64) echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64" @@ -152,7 +151,6 @@ get_arch_specific_cflags() { } get_size_optimization_cflags() { - local ARCH_OPTIMIZATION="" case ${ARCH} in armv7 | armv7s | arm64 | arm64e | *-mac-catalyst) @@ -167,7 +165,6 @@ get_size_optimization_cflags() { } get_size_optimization_asm_cflags() { - local ARCH_OPTIMIZATION="" case $1 in jpeg | ffmpeg) @@ -189,7 +186,6 @@ get_size_optimization_asm_cflags() { } get_app_specific_cflags() { - local APP_FLAGS="" case $1 in fontconfig) @@ -229,7 +225,7 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | x265) + openh264 | openssl | x265) APP_FLAGS="-Wno-unused-function" ;; *) @@ -304,6 +300,9 @@ get_cxxflags() { rubberband) echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + srt | zimg) + echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index a7461332..68a01f2b 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -19,7 +19,7 @@ When compilation ends, libraries are created under the prebuilt folder.\n" echo -e "Usage: ./$COMMAND [OPTION]...\n" echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n" - display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10.11+ devices" " --target=macos sdk version\toverride minimum deployment target [10.15]" + display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10.12+ devices" " --target=macos sdk version\toverride minimum deployment target [10.15]" display_help_licensing echo -e "Architectures:" @@ -59,12 +59,12 @@ enable_main_build() { enable_lts_build() { export FFMPEG_KIT_LTS_BUILD="1" - if [[ $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "10.11") -le 0 ]]; then + if [[ $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "10.12") -le 0 ]]; then export MACOS_MIN_VERSION=$DETECTED_MACOS_SDK_VERSION else - # XCODE 7.3 HAS MACOS SDK 10.11 - export MACOS_MIN_VERSION=10.11 + # XCODE 8.0 HAS MACOS SDK 10.12 + export MACOS_MIN_VERSION=10.12 fi } @@ -241,6 +241,9 @@ get_cxxflags() { rubberband) echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + srt | zimg) + echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index 605336ee..72881dc8 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -20,7 +20,7 @@ set explicitly. When compilation ends, libraries are created under the prebuilt echo -e "Usage: ./$COMMAND [OPTION]...\n" echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n" - display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.2+ devices" " --target=tvos sdk version\toverride minimum deployment target [11.0]" + display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10.0+ devices" " --target=tvos sdk version\toverride minimum deployment target [11.0]" display_help_licensing echo -e "Architectures:" @@ -59,12 +59,12 @@ enable_main_build() { enable_lts_build() { export FFMPEG_KIT_LTS_BUILD="1" - if [[ $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "9.2") -le 0 ]]; then + if [[ $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "10.0") -le 0 ]]; then export TVOS_MIN_VERSION=$DETECTED_TVOS_SDK_VERSION else - # XCODE 7.3 HAS TVOS SDK 9.2 - export TVOS_MIN_VERSION=9.2 + # XCODE 8.0 HAS TVOS SDK 10.0 + export TVOS_MIN_VERSION=10.0 fi } @@ -276,6 +276,9 @@ get_cxxflags() { rubberband) echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + srt | zimg) + echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; diff --git a/scripts/function.sh b/scripts/function.sh index d678bf04..a430fb0a 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -82,22 +82,25 @@ get_library_name() { 31) echo "tesseract" ;; 32) echo "openh264" ;; 33) echo "vo-amrwbenc" ;; - 34) echo "giflib" ;; - 35) echo "jpeg" ;; - 36) echo "libogg" ;; - 37) echo "libpng" ;; - 38) echo "libuuid" ;; - 39) echo "nettle" ;; - 40) echo "tiff" ;; - 41) echo "expat" ;; - 42) echo "libsndfile" ;; - 43) echo "leptonica" ;; - 44) echo "libsamplerate" ;; - 45) echo "harfbuzz" ;; - 46) echo "cpu-features" ;; - 47) echo "android-zlib" ;; - 48) echo "android-media-codec" ;; - 49) + 34) echo "zimg" ;; + 35) echo "openssl" ;; + 36) echo "srt" ;; + 37) echo "giflib" ;; + 38) echo "jpeg" ;; + 39) echo "libogg" ;; + 40) echo "libpng" ;; + 41) echo "libuuid" ;; + 42) echo "nettle" ;; + 43) echo "tiff" ;; + 44) echo "expat" ;; + 45) echo "libsndfile" ;; + 46) echo "leptonica" ;; + 47) echo "libsamplerate" ;; + 48) echo "harfbuzz" ;; + 49) echo "cpu-features" ;; + 50) echo "android-zlib" ;; + 51) echo "android-media-codec" ;; + 52) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-zlib" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -106,7 +109,7 @@ get_library_name() { echo "tvos-zlib" fi ;; - 50) + 53) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-audiotoolbox" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -115,7 +118,7 @@ get_library_name() { echo "tvos-audiotoolbox" fi ;; - 51) + 54) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-bzip2" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -124,7 +127,7 @@ get_library_name() { echo "tvos-bzip2" fi ;; - 52) + 55) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-videotoolbox" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -133,14 +136,14 @@ get_library_name() { echo "tvos-videotoolbox" fi ;; - 53) + 56) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-avfoundation" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "macos-avfoundation" fi ;; - 54) + 57) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-libiconv" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -149,7 +152,7 @@ get_library_name() { echo "tvos-libiconv" fi ;; - 55) + 58) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo "ios-libuuid" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then @@ -158,17 +161,17 @@ get_library_name() { echo "tvos-libuuid" fi ;; - 56) + 59) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "macos-coreimage" fi ;; - 57) + 60) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "macos-opencl" fi ;; - 58) + 61) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "macos-opengl" fi @@ -212,31 +215,34 @@ from_library_name() { tesseract) echo 31 ;; openh264) echo 32 ;; vo-amrwbenc) echo 33 ;; - giflib) echo 34 ;; - jpeg) echo 35 ;; - libogg) echo 36 ;; - libpng) echo 37 ;; - libuuid) echo 38 ;; - nettle) echo 39 ;; - tiff) echo 40 ;; - expat) echo 41 ;; - libsndfile) echo 42 ;; - leptonica) echo 43 ;; - libsamplerate) echo 44 ;; - harfbuzz) echo 45 ;; - cpu-features) echo 46 ;; - android-zlib) echo 47 ;; - android-media-codec) echo 48 ;; - ios-zlib | macos-zlib | tvos-zlib) echo 49 ;; - ios-audiotoolbox | macos-audiotoolbox | tvos-audiotoolbox) echo 50 ;; - ios-bzip2 | macos-bzip2 | tvos-bzip2) echo 51 ;; - ios-videotoolbox | macos-videotoolbox | tvos-videotoolbox) echo 52 ;; - ios-avfoundation | macos-avfoundation) echo 53 ;; - ios-libiconv | macos-libiconv | tvos-libiconv) echo 54 ;; - ios-libuuid | macos-libuuid | tvos-libuuid) echo 55 ;; - macos-coreimage) echo 56 ;; - macos-opencl) echo 57 ;; - macos-opengl) echo 58 ;; + zimg) echo 34 ;; + openssl) echo 35 ;; + srt) echo 36 ;; + giflib) echo 37 ;; + jpeg) echo 38 ;; + libogg) echo 39 ;; + libpng) echo 40 ;; + libuuid) echo 41 ;; + nettle) echo 42 ;; + tiff) echo 43 ;; + expat) echo 44 ;; + libsndfile) echo 45 ;; + leptonica) echo 46 ;; + libsamplerate) echo 47 ;; + harfbuzz) echo 48 ;; + cpu-features) echo 49 ;; + android-zlib) echo 50 ;; + android-media-codec) echo 51 ;; + ios-zlib | macos-zlib | tvos-zlib) echo 52 ;; + ios-audiotoolbox | macos-audiotoolbox | tvos-audiotoolbox) echo 53 ;; + ios-bzip2 | macos-bzip2 | tvos-bzip2) echo 54 ;; + ios-videotoolbox | macos-videotoolbox | tvos-videotoolbox) echo 55 ;; + ios-avfoundation | macos-avfoundation) echo 56 ;; + ios-libiconv | macos-libiconv | tvos-libiconv) echo 57 ;; + ios-libuuid | macos-libuuid | tvos-libuuid) echo 58 ;; + macos-coreimage) echo 59 ;; + macos-opencl) echo 60 ;; + macos-opengl) echo 61 ;; esac } @@ -252,12 +258,12 @@ is_library_supported_on_platform() { 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40) echo "0" ;; - 41 | 42 | 43 | 44 | 45) + 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48) echo "0" ;; # ANDROID - 7 | 38 | 46 | 47 | 48) + 7 | 38 | 49 | 50 | 51) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "android" ]]; then echo "0" else @@ -266,7 +272,7 @@ is_library_supported_on_platform() { ;; # ONLY IOS AND MACOS - 53) + 56) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] && [[ $1 == "ios-avfoundation" ]]; then echo "0" elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]] && [[ $1 == "macos-avfoundation" ]]; then @@ -277,7 +283,7 @@ is_library_supported_on_platform() { ;; # IOS, MACOS AND TVOS - 49 | 50 | 51 | 52 | 54 | 55) + 52 | 53 | 54 | 55 | 57 | 58) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "0" else @@ -286,7 +292,7 @@ is_library_supported_on_platform() { ;; # ONLY MACOS - 56 | 57 | 58) + 59 | 60 | 61) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "0" else @@ -363,13 +369,13 @@ get_package_config_file_name() { 27) echo "aom" ;; 28) echo "libchromaprint" ;; 30) echo "sdl2" ;; - 35) echo "libjpeg" ;; - 36) echo "ogg" ;; - 40) echo "libtiff-4" ;; - 42) echo "sndfile" ;; - 43) echo "lept" ;; - 44) echo "samplerate" ;; - 55) echo "uuid" ;; + 38) echo "libjpeg" ;; + 39) echo "ogg" ;; + 43) echo "libtiff-4" ;; + 45) echo "sndfile" ;; + 46) echo "lept" ;; + 47) echo "samplerate" ;; + 58) echo "uuid" ;; *) echo "$(get_library_name "$1")" ;; esac } @@ -768,15 +774,18 @@ display_help_common_libraries() { echo -e " --enable-libxml2\t\tbuild with libxml2 [no]" echo -e " --enable-opencore-amr\t\tbuild with opencore-amr [no]" echo -e " --enable-openh264\t\tbuild with openh264 [no]" + echo -e " --enable-openssl\t\tbuild with openssl [no]" echo -e " --enable-opus\t\t\tbuild with opus [no]" echo -e " --enable-sdl\t\t\tbuild with sdl [no]" echo -e " --enable-shine\t\tbuild with shine [no]" echo -e " --enable-snappy\t\tbuild with snappy [no]" echo -e " --enable-soxr\t\t\tbuild with soxr [no]" echo -e " --enable-speex\t\tbuild with speex [no]" + echo -e " --enable-srt\t\t\tbuild with srt [no]" echo -e " --enable-tesseract\t\tbuild with tesseract [no]" echo -e " --enable-twolame\t\tbuild with twolame [no]" - echo -e " --enable-vo-amrwbenc\t\tbuild with vo-amrwbenc [no]\n" + echo -e " --enable-vo-amrwbenc\t\tbuild with vo-amrwbenc [no]" + echo -e " --enable-zimg\t\t\tbuild with zimg [no]\n" } display_help_gpl_libraries() { @@ -806,7 +815,7 @@ reconf_library() { local RECONF_VARIABLE=$(echo "RECONF_$1" | sed "s/\-/\_/g") local library_supported=0 - for library in {0..46}; do + for library in {0..49}; do library_name=$(get_library_name ${library}) local library_supported_on_platform=$(is_library_supported_on_platform "${library_name}") @@ -829,7 +838,7 @@ rebuild_library() { local REBUILD_VARIABLE=$(echo "REBUILD_$1" | sed "s/\-/\_/g") local library_supported=0 - for library in {0..46}; do + for library in {0..49}; do library_name=$(get_library_name ${library}) local library_supported_on_platform=$(is_library_supported_on_platform "${library_name}") @@ -852,7 +861,7 @@ redownload_library() { local REDOWNLOAD_VARIABLE=$(echo "REDOWNLOAD_$1" | sed "s/\-/\_/g") local library_supported=0 - for library in {0..46}; do + for library in {0..49}; do library_name=$(get_library_name ${library}) local library_supported_on_platform=$(is_library_supported_on_platform "${library_name}") @@ -1038,6 +1047,9 @@ set_library() { openh264) ENABLED_LIBRARIES[LIBRARY_OPENH264]=$2 ;; + openssl) + ENABLED_LIBRARIES[LIBRARY_OPENSSL]=$2 + ;; opus) ENABLED_LIBRARIES[LIBRARY_OPUS]=$2 ;; @@ -1062,6 +1074,10 @@ set_library() { speex) ENABLED_LIBRARIES[LIBRARY_SPEEX]=$2 ;; + srt) + ENABLED_LIBRARIES[LIBRARY_SRT]=$2 + set_library "openssl" $2 + ;; tesseract) ENABLED_LIBRARIES[LIBRARY_TESSERACT]=$2 ENABLED_LIBRARIES[LIBRARY_LEPTONICA]=$2 @@ -1088,6 +1104,9 @@ set_library() { xvidcore) ENABLED_LIBRARIES[LIBRARY_XVIDCORE]=$2 ;; + zimg) + ENABLED_LIBRARIES[LIBRARY_ZIMG]=$2 + ;; expat | giflib | jpeg | leptonica | libogg | libsamplerate | libsndfile) # THESE LIBRARIES ARE NOT ENABLED DIRECTLY ;; @@ -1277,6 +1296,9 @@ check_if_dependency_rebuilt() { nettle) set_dependency_rebuilt_flag "gnutls" ;; + openssl) + set_dependency_rebuilt_flag "srt" + ;; tiff) set_dependency_rebuilt_flag "libwebp" set_dependency_rebuilt_flag "leptonica" @@ -1338,7 +1360,7 @@ print_enabled_libraries() { let enabled=0 # SUPPLEMENTARY LIBRARIES NOT PRINTED - for library in {47..54} {56..58} {0..33}; do + for library in {50..57} {59..61} {0..36}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then if [[ ${enabled} -ge 1 ]]; then echo -n ", " @@ -1361,7 +1383,7 @@ print_enabled_xcframeworks() { let enabled=0 # SUPPLEMENTARY LIBRARIES NOT PRINTED - for library in {0..46}; do + for library in {0..49}; do if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then if [[ ${enabled} -ge 1 ]]; then echo -n ", " @@ -1445,16 +1467,16 @@ print_redownload_requested_libraries() { # 1 - library index get_external_library_license_path() { case $1 in - 1) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE.TXT" ;; + 1 | 35) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE.TXT" ;; 3 | 39) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYING.LESSERv3" ;; 5 | 41) echo "${BASEDIR}/src/$(get_library_name "$1")/$(get_library_name "$1")/COPYING" ;; 19) echo "${BASEDIR}/src/$(get_library_name "$1")/$(get_library_name "$1")/LICENSE" ;; 26) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYING.LGPL" ;; - 28 | 35) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE.md " ;; + 28 | 38) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE.md " ;; 30) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYING.txt" ;; - 40) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYRIGHT" ;; - 43) echo "${BASEDIR}/src/$(get_library_name "$1")/leptonica-license.txt" ;; - 4 | 10 | 13 | 21 | 27 | 31 | 32 | 37 | 46) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE" ;; + 43) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYRIGHT" ;; + 46) echo "${BASEDIR}/src/$(get_library_name "$1")/leptonica-license.txt" ;; + 4 | 10 | 13 | 21 | 27 | 31 | 32 | 36 | 40 | 49) echo "${BASEDIR}/src/$(get_library_name "$1")/LICENSE" ;; *) echo "${BASEDIR}/src/$(get_library_name "$1")/COPYING" ;; esac } @@ -1706,7 +1728,7 @@ downloaded_enabled_library_sources() { exit 1 fi - for library in {1..47}; do + for library in {1..50}; do if [[ ${!library} -eq 1 ]]; then library_name=$(get_library_name $((library - 1))) diff --git a/scripts/main-android.sh b/scripts/main-android.sh index 180a187d..de891ab8 100755 --- a/scripts/main-android.sh +++ b/scripts/main-android.sh @@ -43,7 +43,7 @@ fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT # NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING enabled_library_list=() -for library in {1..47}; do +for library in {1..50}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) enabled_library_list+=(${ENABLED_LIBRARY}) @@ -138,6 +138,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do run=1 fi ;; + srt) + if [[ $OK_openssl -eq 1 ]]; then + run=1 + fi + ;; tesseract) if [[ $OK_leptonica -eq 1 ]]; then run=1 @@ -175,12 +180,17 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do "${BASEDIR}"/scripts/run-android.sh "${library}" 1>>"${BASEDIR}"/build.log 2>&1 + RC=$? + # SET SOME FLAGS AFTER THE BUILD - if [ $? -eq 0 ]; then + if [ $RC -eq 0 ]; then ((completed += 1)) declare "$BUILD_COMPLETED_FLAG=1" check_if_dependency_rebuilt "${library}" echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 else echo -e "failed\n\nSee build.log for details\n" exit 1 diff --git a/scripts/main-ios.sh b/scripts/main-ios.sh index 1eb1ca63..04558681 100755 --- a/scripts/main-ios.sh +++ b/scripts/main-ios.sh @@ -38,7 +38,7 @@ fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT # NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING enabled_library_list=() -for library in {1..47}; do +for library in {1..50}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) enabled_library_list+=(${ENABLED_LIBRARY}) @@ -108,6 +108,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do run=1 fi ;; + srt) + if [[ $OK_openssl -eq 1 ]]; then + run=1 + fi + ;; tesseract) if [[ $OK_leptonica -eq 1 ]]; then run=1 @@ -145,12 +150,17 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do "${BASEDIR}"/scripts/run-apple.sh "${library}" 1>>"${BASEDIR}"/build.log 2>&1 + RC=$? + # SET SOME FLAGS AFTER THE BUILD - if [ $? -eq 0 ]; then + if [ $RC -eq 0 ]; then ((completed += 1)) declare "$BUILD_COMPLETED_FLAG=1" check_if_dependency_rebuilt "${library}" echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 else echo -e "failed\n\nSee build.log for details\n" exit 1 diff --git a/scripts/main-macos.sh b/scripts/main-macos.sh index ac25bb79..3d6309ce 100755 --- a/scripts/main-macos.sh +++ b/scripts/main-macos.sh @@ -38,7 +38,7 @@ fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT # NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING enabled_library_list=() -for library in {1..47}; do +for library in {1..50}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) enabled_library_list+=(${ENABLED_LIBRARY}) @@ -108,6 +108,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do run=1 fi ;; + srt) + if [[ $OK_openssl -eq 1 ]]; then + run=1 + fi + ;; tesseract) if [[ $OK_leptonica -eq 1 ]]; then run=1 @@ -144,12 +149,17 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do "${BASEDIR}"/scripts/run-apple.sh "${library}" 1>>"${BASEDIR}"/build.log 2>&1 + RC=$? + # SET SOME FLAGS AFTER THE BUILD - if [ $? -eq 0 ]; then + if [ $RC -eq 0 ]; then ((completed += 1)) declare "$BUILD_COMPLETED_FLAG=1" check_if_dependency_rebuilt "${library}" echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 else echo -e "failed\n\nSee build.log for details\n" exit 1 diff --git a/scripts/main-tvos.sh b/scripts/main-tvos.sh index da6b8766..29249a9e 100755 --- a/scripts/main-tvos.sh +++ b/scripts/main-tvos.sh @@ -38,7 +38,7 @@ fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT # NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING enabled_library_list=() -for library in {1..47}; do +for library in {1..50}; do if [[ ${!library} -eq 1 ]]; then ENABLED_LIBRARY=$(get_library_name $((library - 1))) enabled_library_list+=(${ENABLED_LIBRARY}) @@ -108,6 +108,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do run=1 fi ;; + srt) + if [[ $OK_openssl -eq 1 ]]; then + run=1 + fi + ;; tesseract) if [[ $OK_leptonica -eq 1 ]]; then run=1 @@ -143,12 +148,17 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do "${BASEDIR}"/scripts/run-apple.sh "${library}" 1>>"${BASEDIR}"/build.log 2>&1 + RC=$? + # SET SOME FLAGS AFTER THE BUILD - if [ $? -eq 0 ]; then + if [ $RC -eq 0 ]; then ((completed += 1)) declare "$BUILD_COMPLETED_FLAG=1" check_if_dependency_rebuilt "${library}" echo "ok" + elif [ $RC -eq 200 ]; then + echo -e "not supported\n\nSee build.log for details\n" + exit 1 else echo -e "failed\n\nSee build.log for details\n" exit 1 diff --git a/scripts/source.sh b/scripts/source.sh index 6bcebc1e..b4b346ac 100755 --- a/scripts/source.sh +++ b/scripts/source.sh @@ -182,6 +182,11 @@ get_library_source() { SOURCE_ID="v2.1.1" SOURCE_TYPE="TAG" ;; + openssl) + SOURCE_REPO_URL="https://github.com/tanersener/openssl" + SOURCE_ID="openssl-3.0.1" + SOURCE_TYPE="TAG" + ;; opus) SOURCE_REPO_URL="https://github.com/tanersener/opus" SOURCE_ID="v1.3.1" @@ -217,6 +222,11 @@ get_library_source() { SOURCE_ID="Speex-1.2.0" SOURCE_TYPE="TAG" ;; + srt) + SOURCE_REPO_URL="https://github.com/tanersener/srt" + SOURCE_ID="v1.4.4" + SOURCE_TYPE="TAG" + ;; tesseract) SOURCE_REPO_URL="https://github.com/tanersener/tesseract" SOURCE_ID="3.05.02" @@ -252,6 +262,11 @@ get_library_source() { SOURCE_ID="release-1_3_7" SOURCE_TYPE="TAG" ;; + zimg) + SOURCE_REPO_URL="https://github.com/tanersener/zimg" + SOURCE_ID="release-3.0.3" + SOURCE_TYPE="TAG" + ;; esac case $2 in diff --git a/scripts/variable.sh b/scripts/variable.sh index ef295f98..13da91e9 100755 --- a/scripts/variable.sh +++ b/scripts/variable.sh @@ -10,7 +10,7 @@ ENABLED_ARCHITECTURES=(0 0 0 0 0 0 0 0 0 0 0 0 0) ENABLED_ARCHITECTURE_VARIANTS=(0 0 0 0 0 0 0 0) # ARRAY OF ENABLED LIBRARIES -ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) +ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) # ARRAY OF LIBRARIES THAT WILL BE RE-CONFIGURED RECONF_LIBRARIES=() @@ -81,28 +81,31 @@ LIBRARY_SDL=30 LIBRARY_TESSERACT=31 LIBRARY_OPENH264=32 LIBRARY_VO_AMRWBENC=33 -LIBRARY_GIFLIB=34 -LIBRARY_JPEG=35 -LIBRARY_LIBOGG=36 -LIBRARY_LIBPNG=37 -LIBRARY_LIBUUID=38 -LIBRARY_NETTLE=39 -LIBRARY_TIFF=40 -LIBRARY_EXPAT=41 -LIBRARY_SNDFILE=42 -LIBRARY_LEPTONICA=43 -LIBRARY_LIBSAMPLERATE=44 -LIBRARY_HARFBUZZ=45 -LIBRARY_CPU_FEATURES=46 -LIBRARY_ANDROID_ZLIB=47 -LIBRARY_ANDROID_MEDIA_CODEC=48 -LIBRARY_APPLE_ZLIB=49 -LIBRARY_APPLE_AUDIOTOOLBOX=50 -LIBRARY_APPLE_BZIP2=51 -LIBRARY_APPLE_VIDEOTOOLBOX=52 -LIBRARY_APPLE_AVFOUNDATION=53 -LIBRARY_APPLE_LIBICONV=54 -LIBRARY_APPLE_LIBUUID=55 -LIBRARY_APPLE_COREIMAGE=56 -LIBRARY_APPLE_OPENCL=57 -LIBRARY_APPLE_OPENGL=58 +LIBRARY_ZIMG=34 +LIBRARY_OPENSSL=35 +LIBRARY_SRT=36 +LIBRARY_GIFLIB=37 +LIBRARY_JPEG=38 +LIBRARY_LIBOGG=39 +LIBRARY_LIBPNG=40 +LIBRARY_LIBUUID=41 +LIBRARY_NETTLE=42 +LIBRARY_TIFF=43 +LIBRARY_EXPAT=44 +LIBRARY_SNDFILE=45 +LIBRARY_LEPTONICA=46 +LIBRARY_LIBSAMPLERATE=47 +LIBRARY_HARFBUZZ=48 +LIBRARY_CPU_FEATURES=49 +LIBRARY_ANDROID_ZLIB=50 +LIBRARY_ANDROID_MEDIA_CODEC=51 +LIBRARY_APPLE_ZLIB=52 +LIBRARY_APPLE_AUDIOTOOLBOX=53 +LIBRARY_APPLE_BZIP2=54 +LIBRARY_APPLE_VIDEOTOOLBOX=55 +LIBRARY_APPLE_AVFOUNDATION=56 +LIBRARY_APPLE_LIBICONV=57 +LIBRARY_APPLE_LIBUUID=58 +LIBRARY_APPLE_COREIMAGE=59 +LIBRARY_APPLE_OPENCL=60 +LIBRARY_APPLE_OPENGL=61 diff --git a/src/.gitignore b/src/.gitignore index 828d4e35..2767ab3b 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -32,6 +32,7 @@ libxml2 nettle opencore-amr openh264 +openssl opus rubberband sdl @@ -39,6 +40,7 @@ shine snappy soxr speex +srt tesseract tiff twolame @@ -46,3 +48,4 @@ vo-amrwbenc x264 x265 xvidcore +zimg diff --git a/tools/release/apple/ffmpeg-kit-ios-audio.podspec b/tools/release/apple/ffmpeg-kit-ios-audio.podspec index a07c3286..666141ca 100644 --- a/tools/release/apple/ffmpeg-kit-ios-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-audio.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec index 8247000d..55e6e9a6 100644 --- a/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-full.podspec b/tools/release/apple/ffmpeg-kit-ios-full.podspec index 41d2fb04..7530ae16 100644 --- a/tools/release/apple/ffmpeg-kit-ios-full.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-full.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec index 4551828c..edccda2c 100644 --- a/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-https.podspec b/tools/release/apple/ffmpeg-kit-ios-https.podspec index 82470d23..9c4fb91a 100644 --- a/tools/release/apple/ffmpeg-kit-ios-https.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-https.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec index 1d05c0d6..0a25acb5 100644 --- a/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-min.podspec b/tools/release/apple/ffmpeg-kit-ios-min.podspec index e7821258..a11e9cde 100644 --- a/tools/release/apple/ffmpeg-kit-ios-min.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-min.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-ios-video.podspec b/tools/release/apple/ffmpeg-kit-ios-video.podspec index 53505644..722014fa 100644 --- a/tools/release/apple/ffmpeg-kit-ios-video.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-video.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-ios-framework.zip" } - s.ios.deployment_target = '9.3' + s.ios.deployment_target = '10' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-audio.podspec b/tools/release/apple/ffmpeg-kit-macos-audio.podspec index 035b5c83..4e15dbb4 100644 --- a/tools/release/apple/ffmpeg-kit-macos-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-audio.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec index f2aa96b5..71f1d1ea 100644 --- a/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-full.podspec b/tools/release/apple/ffmpeg-kit-macos-full.podspec index 5f6b1e3a..10fee8af 100644 --- a/tools/release/apple/ffmpeg-kit-macos-full.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-full.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec index c9ca4c37..c8478568 100644 --- a/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-https.podspec b/tools/release/apple/ffmpeg-kit-macos-https.podspec index 860fc846..f67a8459 100644 --- a/tools/release/apple/ffmpeg-kit-macos-https.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-https.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec index b3931137..88d9725d 100644 --- a/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-min.podspec b/tools/release/apple/ffmpeg-kit-macos-min.podspec index 25654f5f..4297dd73 100644 --- a/tools/release/apple/ffmpeg-kit-macos-min.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-min.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-macos-video.podspec b/tools/release/apple/ffmpeg-kit-macos-video.podspec index cdaaba35..817b612e 100644 --- a/tools/release/apple/ffmpeg-kit-macos-video.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-video.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-macos-framework.zip" } - s.osx.deployment_target = '10.11' + s.osx.deployment_target = '10.12' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-audio.podspec b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec index ba0f5a2e..2c02d509 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec index e8990ef3..3213801b 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-full.podspec b/tools/release/apple/ffmpeg-kit-tvos-full.podspec index 46e09457..7150f2c6 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-full.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-full.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec index 5ee933d5..ac0077f0 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-https.podspec b/tools/release/apple/ffmpeg-kit-tvos-https.podspec index d8a29244..3fa42bcc 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-https.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-https.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec index 3056b02e..c11ae152 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-min.podspec b/tools/release/apple/ffmpeg-kit-tvos-min.podspec index 25d7a5de..6f7586be 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-min.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-min.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/apple/ffmpeg-kit-tvos-video.podspec b/tools/release/apple/ffmpeg-kit-tvos-video.podspec index 1e34365e..56448ec7 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-video.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-video.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-tvos-framework.zip" } - s.tvos.deployment_target = '9.2' + s.tvos.deployment_target = '10.0' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' diff --git a/tools/release/ios.sh b/tools/release/ios.sh index 42715c3a..11f68cff 100755 --- a/tools/release/ios.sh +++ b/tools/release/ios.sh @@ -27,7 +27,7 @@ create_package() { sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/ios\.xcframeworks/ios\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 - sed -i '' "s/9\.3/12\.1/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/10/12\.1/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/ios-arm64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 } diff --git a/tools/release/macos.sh b/tools/release/macos.sh index f8c93bbf..189b0483 100755 --- a/tools/release/macos.sh +++ b/tools/release/macos.sh @@ -27,7 +27,7 @@ create_package() { sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/osx\.xcframeworks/osx\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 - sed -i '' "s/10\.11/10\.15/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/10\.12/10\.15/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/macos-arm64_x86_64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 } diff --git a/tools/release/tvos.sh b/tools/release/tvos.sh index 44b27fb6..6dd0c47d 100755 --- a/tools/release/tvos.sh +++ b/tools/release/tvos.sh @@ -27,7 +27,7 @@ create_package() { sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/tvos\.xcframeworks/tvos\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 - sed -i '' "s/9\.2/10\.2/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/10\.0/11\.0/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/tvos-arm64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 } diff --git a/tvos.sh b/tvos.sh index c0d4081c..9ce73c78 100755 --- a/tvos.sh +++ b/tvos.sh @@ -139,7 +139,7 @@ done # PROCESS FULL OPTION AS LAST OPTION if [[ -n ${BUILD_FULL} ]]; then - for library in {0..58}; do + for library in {0..61}; do if [ ${GPL_ENABLED} == "yes" ]; then enable_library "$(get_library_name "$library")" 1 else @@ -220,7 +220,7 @@ for run_arch in {0..12}; do TARGET_ARCH_LIST+=("${FULL_ARCH}") # CLEAR FLAGS - for library in {0..58}; do + for library in {0..61}; do library_name=$(get_library_name "${library}") unset "$(echo "OK_${library_name}" | sed "s/\-/\_/g")" unset "$(echo "DEPENDENCY_REBUILT_${library_name}" | sed "s/\-/\_/g")"