fix android github action errors

This commit is contained in:
Taner Sener 2021-08-15 01:07:35 +03:00
parent 98bb5c7619
commit 4ce973e9d8
17 changed files with 157 additions and 168 deletions

View File

@ -4,12 +4,11 @@ on: [ push, pull_request ]
jobs:
build-main-on-linux:
name: android main
runs-on: ${{ matrix.os }}
name: android main on linux
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ ubuntu-20.04 ]
ndk-version: [ 'r22-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ]
ndk-version: [ 'r21e-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ]
defaults:
run:
shell: bash
@ -23,28 +22,22 @@ jobs:
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk.dir
DIR=$(ls .ndk.dir)
mv .ndk.dir/$DIR ~/.ndk
env:
ANDROID_NDK_ROOT: ~/.ndk
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a
- name: print success logs
if: ${{ success() }}
run: ./android.sh -d --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-linux:
name: android lts
runs-on: ${{ matrix.os }}
name: android lts on linux
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ ubuntu-20.04 ]
ndk-version: [ 'r22-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ]
ndk-version: [ 'r21e-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ]
defaults:
run:
shell: bash
@ -58,28 +51,22 @@ jobs:
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk.dir
DIR=$(ls .ndk.dir)
mv .ndk.dir/$DIR ~/.ndk
env:
ANDROID_NDK_ROOT: ~/.ndk
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d -l --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a
- name: print success logs
if: ${{ success() }}
run: ./android.sh -d --lts --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-on-macos:
name: android main
runs-on: ${{ matrix.os }}
name: android main on macos
runs-on: macos-10.15
strategy:
matrix:
os: [ macos-10.15 ]
ndk-url: [ 'r22-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ]
ndk-version: [ 'r21e-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ]
defaults:
run:
shell: bash
@ -93,28 +80,22 @@ jobs:
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk.dir
DIR=$(ls .ndk.dir)
mv .ndk.dir/$DIR ~/.ndk
env:
ANDROID_NDK_ROOT: ~/.ndk
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a
- name: print success logs
if: ${{ success() }}
run: ./android.sh -d --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: android lts
runs-on: ${{ matrix.os }}
name: android lts on macos
runs-on: macos-10.15
strategy:
matrix:
os: [ macos-10.15 ]
ndk-url: [ 'r22-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ]
ndk-version: [ 'r21e-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ]
defaults:
run:
shell: bash
@ -128,18 +109,13 @@ jobs:
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk.dir
DIR=$(ls .ndk.dir)
mv .ndk.dir/$DIR ~/.ndk
env:
ANDROID_NDK_ROOT: ~/.ndk
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d -l --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a
- name: print success logs
if: ${{ success() }}
run: ./android.sh -d --lts --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -17,21 +17,19 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./ios.sh -d -x --disable-arm64 --disable-arm64e --disable-i386 --disable-x86-64
- name: print success logs
if: ${{ success() }}
run: ./ios.sh --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: ios lts
runs-on: macos-10.15
strategy:
matrix:
xcode: [ '10.3', '11.7', '12.4' ]
xcode: [ '10.3', '11.7' ]
defaults:
run:
shell: bash
@ -40,12 +38,10 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./ios.sh -d -l --disable-arm64 --disable-arm64e --disable-i386
- name: print success logs
if: ${{ success() }}
run: ./ios.sh --lts --enable-ios-audiotoolbox --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -17,21 +17,19 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./macos.sh -d -x --disable-arm64
- name: print success logs
if: ${{ success() }}
run: ./macos.sh --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: macos lts
runs-on: macos-10.15
strategy:
matrix:
xcode: [ '10.3', '12.4' ]
xcode: [ '10.3', '11.7' ]
defaults:
run:
shell: bash
@ -40,12 +38,10 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./macos.sh -d -l
- name: print success logs
if: ${{ success() }}
run: ./macos.sh --lts --enable-macos-audiotoolbox --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -17,21 +17,19 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./tvos.sh -d -x --disable-arm64
- name: print success logs
if: ${{ success() }}
run: ./tvos.sh --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: tvos lts
runs-on: macos-10.15
strategy:
matrix:
xcode: [ '10.3', '12.4' ]
xcode: [ '10.3', '11.7' ]
defaults:
run:
shell: bash
@ -40,12 +38,10 @@ jobs:
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./tvos.sh -d -l --disable-arm64
- name: print success logs
if: ${{ success() }}
run: ./tvos.sh --lts --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print failure logs
- name: print ffbuild logs
if: ${{ failure() }}
run: |
tail -50 build.log
tail -50 ./src/ffmpeg/ffbuild/config.log
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -121,15 +121,19 @@ This table shows the differences between two variants.
| Android API Level | 24 | 16 |
| Android Camera Access | Yes | - |
| Android Architectures | arm-v7a-neon<br/>arm64-v8a<br/>x86<br/>x86-64 | arm-v7a<br/>arm-v7a-neon<br/>arm64-v8a<br/>x86<br/>x86-64 |
| Xcode Compatibility | 11.0 or later | 7.3.1 or later |
| iOS SDK | 12.1 | 9.3 |
| Xcode Compatibility | 11.0 or later | 9.0 or later |
| iOS SDK | 12.1 | 11.0 |
| iOS AVFoundation | Yes | - |
| iOS Architectures | arm64<br/>arm64-simulator<br/>arm64-mac-catalyst<br/>x86-64<br/>x86-64-mac-catalyst | armv7<br/>arm64<br/>i386<br/>x86-64 |
| iOS Bundle Format | XCFrameworks | Frameworks |
| macOS SDK | 10.15 | 10.11 |
| macOS AVFoundation | Yes | - |
| macOS Architectures | arm64<br/>x86-64 | x86-64 |
| tvOS SDK | 10.2 | 9.2 |
| macOS Bundle Format | XCFrameworks | Frameworks |
| tvOS SDK | 11.0 | 9.2 |
| tvOS VideoToolbox | Yes | - |
| tvOS Architectures | arm64<br/>x86-64<br/>arm64-simulator | arm64<br/>x86-64 |
| tvOS Bundle Format | XCFrameworks | Frameworks |
### 9. Test Applications

View File

@ -22,7 +22,7 @@ enable_default_android_libraries
enable_main_build
# DETECT ANDROID NDK VERSION
DETECTED_NDK_VERSION=$(grep -Eo "Revision.*" "${ANDROID_NDK_ROOT}"/source.properties | sed 's/Revision//g;s/=//g;s/ //g')
export DETECTED_NDK_VERSION=$(grep -Eo "Revision.*" "${ANDROID_NDK_ROOT}"/source.properties | sed 's/Revision//g;s/=//g;s/ //g')
echo -e "\nINFO: Using Android NDK v${DETECTED_NDK_VERSION} provided at ${ANDROID_NDK_ROOT}\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "INFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1
@ -231,13 +231,11 @@ if [[ ${ENABLED_ARCHITECTURES[ARCH_ARM_V7A]} -eq 1 ]] || [[ ${ENABLED_ARCHITECTU
fi
if [[ ${ENABLED_ARCHITECTURES[ARCH_ARM_V7A]} -eq 1 ]]; then
mkdir -p "${BASEDIR}"/android/build 1>>"${BASEDIR}"/build.log 2>&1
cat >"${BASEDIR}"/android/build/.armv7 <<EOF
EOF
create_file "${BASEDIR}"/android/build/.armv7
fi
if [[ ${ENABLED_ARCHITECTURES[ARCH_ARM_V7A_NEON]} -eq 1 ]]; then
mkdir -p "${BASEDIR}"/android/build 1>>"${BASEDIR}"/build.log 2>&1
cat >"${BASEDIR}"/android/build/.armv7neon <<EOF
EOF
create_file "${BASEDIR}"/android/build/.armv7neon
fi
if [[ ${ENABLED_ARCHITECTURES[ARCH_ARM64_V8A]} -eq 1 ]]; then
ANDROID_ARCHITECTURES+="$(get_android_arch 2) "
@ -249,8 +247,8 @@ if [[ ${ENABLED_ARCHITECTURES[ARCH_X86_64]} -eq 1 ]]; then
ANDROID_ARCHITECTURES+="$(get_android_arch 4) "
fi
if [[ ! -z ${FFMPEG_KIT_LTS_BUILD} ]]; then
cat >"${BASEDIR}"/android/build/.lts <<EOF
EOF
mkdir -p "${BASEDIR}"/android/build 1>>"${BASEDIR}"/build.log 2>&1
create_file "${BASEDIR}"/android/build/.lts
fi
# BUILD FFMPEG-KIT

View File

@ -53,7 +53,7 @@ struct CallbackData {
};
/** Session control variables */
const int SESSION_MAP_SIZE = 1000;
#define SESSION_MAP_SIZE 1000
static atomic_short sessionMap[SESSION_MAP_SIZE];
static atomic_int sessionInTransitMessageCountMap[SESSION_MAP_SIZE];

View File

@ -504,7 +504,12 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
void term_init(void)
{
#if defined __linux__
struct sigaction action = {0};
#if defined __aarch64__ || defined __amd64__ || defined __x86_64__
struct sigaction action = {0};
#else
struct sigaction action = {{0}};
#endif
action.sa_handler = sigterm_handler;
/* block other interrupts while processing this one */

View File

@ -54,7 +54,7 @@ static NSMutableArray* sessionHistoryList;
static NSRecursiveLock* sessionHistoryLock;
/** Session control variables */
const int SESSION_MAP_SIZE = 1000;
#define SESSION_MAP_SIZE 1000
static atomic_short sessionMap[SESSION_MAP_SIZE];
static atomic_int sessionInTransitMessageCountMap[SESSION_MAP_SIZE];

View File

@ -501,7 +501,12 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
void term_init(void)
{
#if defined __linux__
struct sigaction action = {0};
#if defined __aarch64__ || defined __amd64__ || defined __x86_64__
struct sigaction action = {0};
#else
struct sigaction action = {{0}};
#endif
action.sa_handler = sigterm_handler;
/* block other interrupts while processing this one */

10
ios.sh
View File

@ -28,7 +28,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then
fi
# DETECT IOS SDK VERSION
DETECTED_IOS_SDK_VERSION="$(xcrun --sdk iphoneos --show-sdk-version 2>>"${BASEDIR}"/build.log)"
DETECTED_IOS_SDK_VERSION="$(xcrun --sdk iphoneos --show-sdk-version 2>>${BASEDIR}/build.log)"
echo -e "\nINFO: Using SDK ${DETECTED_IOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "INFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1
@ -130,14 +130,6 @@ while [ ! $# -eq 0 ]; do
shift
done
# VALIDATE THAT LTS RELEASES ARE BUILT USING THE CORRECT VERSION
if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]] && [[ "${DETECTED_IOS_SDK_VERSION}" != "${IOS_MIN_VERSION}" ]]; then
if [[ -z ${BUILD_FORCE} ]]; then
echo -e "\n(*) LTS packages should be built using SDK ${IOS_MIN_VERSION} but current configuration uses SDK ${DETECTED_IOS_SDK_VERSION}\n"
exit 1
fi
fi
# PROCESS FULL OPTION AS LAST OPTION
if [[ -n ${BUILD_FULL} ]]; then
for library in {0..58}; do

View File

@ -28,7 +28,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then
fi
# DETECT MACOS SDK VERSION
DETECTED_MACOS_SDK_VERSION="$(xcrun --sdk macosx --show-sdk-version 2>>"${BASEDIR}"/build.log)"
DETECTED_MACOS_SDK_VERSION="$(xcrun --sdk macosx --show-sdk-version 2>>${BASEDIR}/build.log)"
echo -e "\nINFO: Using SDK ${DETECTED_MACOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nINFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1
@ -130,14 +130,6 @@ while [ ! $# -eq 0 ]; do
shift
done
# VALIDATE THAT LTS RELEASES ARE BUILT USING THE CORRECT VERSION
if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]] && [[ "${DETECTED_MACOS_SDK_VERSION}" != "${MACOS_MIN_VERSION}" ]]; then
if [[ -z ${BUILD_FORCE} ]]; then
echo -e "\n(*) LTS packages should be built using SDK ${MACOS_MIN_VERSION} but current configuration uses SDK ${DETECTED_MACOS_SDK_VERSION}\n"
exit 1
fi
fi
# PROCESS FULL OPTION AS LAST OPTION
if [[ -n ${BUILD_FULL} ]]; then
for library in {0..58}; do

View File

@ -207,7 +207,14 @@ get_common_cflags() {
local LTS_BUILD__FLAG="-DFFMPEG_KIT_LTS "
fi
echo "-fno-integrated-as -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID ${LTS_BUILD__FLAG}-D__ANDROID__ -D__ANDROID_API__=${API}"
case ${DETECTED_NDK_VERSION} in
23*)
echo "-fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID ${LTS_BUILD__FLAG}-D__ANDROID__ -D__ANDROID_MIN_SDK_VERSION__=${API}"
;;
*)
echo "-fno-integrated-as -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID ${LTS_BUILD__FLAG}-D__ANDROID__ -D__ANDROID_API__=${API}"
;;
esac
}
get_arch_specific_cflags() {
@ -222,10 +229,24 @@ get_arch_specific_cflags() {
echo "-march=armv8-a -DFFMPEG_KIT_ARM64_V8A"
;;
x86)
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86"
case ${DETECTED_NDK_VERSION} in
23*)
echo "-march=i686 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86"
;;
*)
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86"
;;
esac
;;
x86-64)
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64"
case ${DETECTED_NDK_VERSION} in
23*)
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64"
;;
*)
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64"
;;
esac
;;
esac
}
@ -294,7 +315,7 @@ get_app_specific_cflags() {
rubberband)
APP_FLAGS="-std=c99 -Wno-unused-function"
;;
shine)
libvpx | shine)
APP_FLAGS="-Wno-unused-function"
;;
soxr | snappy | libwebp)
@ -814,9 +835,8 @@ Name: x265
Description: H.265/HEVC video encoder
Version: ${X265_VERSION}
Requires:
Libs: -L\${libdir} -lx265
Libs.private: -lm -lgcc -lgcc -ldl -lgcc -lgcc -ldl -lc++_shared
Libs.private: -lm -ldl -llog -lm -lc++_shared
Cflags: -I\${includedir}
EOF
}
@ -953,7 +973,6 @@ set_toolchain_paths() {
HOST=$(get_host)
export AR=${HOST}-ar
export CC=$(get_clang_host)-clang
export CXX=$(get_clang_host)-clang++
@ -968,12 +987,22 @@ set_toolchain_paths() {
export ac_cv_c_bigendian=no
;;
esac
export LD=${HOST}-ld
export RANLIB=${HOST}-ranlib
export STRIP=${HOST}-strip
export NM=${HOST}-nm
case ${DETECTED_NDK_VERSION} in
23*)
export AR=llvm-ar
export LD=lld
export RANLIB=llvm-ranlib
export STRIP=llvm-strip
export NM=llvm-nm
;;
*)
export AR=${HOST}-ar
export LD=${HOST}-ld
export RANLIB=${HOST}-ranlib
export STRIP=${HOST}-strip
export NM=${HOST}-nm
;;
esac
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}"/prebuilt/$(get_build_directory)/pkgconfig
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
@ -1006,6 +1035,6 @@ build_android_lts_support() {
LDFLAGS=$(get_ldflags ${LIB_NAME})
# BUILD
"$(get_clang_host)"-clang ${CFLAGS} -Wno-unused-command-line-argument -c "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.c -o "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>"${BASEDIR}"/build.log 2>&1
"${HOST}"-ar rcs "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/libandroidltssupport.a "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
"${CC}" ${CFLAGS} -Wno-unused-command-line-argument -c "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.c -o "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>"${BASEDIR}"/build.log 2>&1
"${AR}" rcs "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/libandroidltssupport.a "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
}

View File

@ -65,8 +65,8 @@ enable_main_build() {
enable_lts_build() {
export FFMPEG_KIT_LTS_BUILD="1"
# XCODE 7.3 HAS IOS SDK 9.3
export IOS_MIN_VERSION=9.3
# XCODE 9.0 HAS IOS SDK 11.0
export IOS_MIN_VERSION=11.0
}
get_common_includes() {

View File

@ -47,7 +47,7 @@ set explicitly. When compilation ends, libraries are created under the prebuilt
}
enable_main_build() {
export TVOS_MIN_VERSION=10.2
export TVOS_MIN_VERSION=11.0
}
enable_lts_build() {

View File

@ -1781,3 +1781,11 @@ overwrite_file() {
rm -f "$2"
cp "$1" "$2"
}
#
# 1. destination file
#
create_file() {
rm -f "$1"
echo "" > "$1" 1>>"${BASEDIR}"/build.log 2>&1
}

10
tvos.sh
View File

@ -28,7 +28,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then
fi
# DETECT TVOS SDK VERSION
DETECTED_TVOS_SDK_VERSION="$(xcrun --sdk appletvos --show-sdk-version 2>>"${BASEDIR}"/build.log)"
DETECTED_TVOS_SDK_VERSION="$(xcrun --sdk appletvos --show-sdk-version 2>>${BASEDIR}/build.log)"
echo -e "\nINFO: Using SDK ${DETECTED_TVOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nINFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1
@ -130,14 +130,6 @@ while [ ! $# -eq 0 ]; do
shift
done
# VALIDATE THAT LTS RELEASES ARE BUILT USING THE CORRECT VERSION
if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]] && [[ "${DETECTED_TVOS_SDK_VERSION}" != "${TVOS_MIN_VERSION}" ]]; then
if [[ -z ${BUILD_FORCE} ]]; then
echo -e "\n(*) LTS packages should be built using SDK ${TVOS_MIN_VERSION} but current configuration uses SDK ${DETECTED_TVOS_SDK_VERSION}\n"
exit 1
fi
fi
# PROCESS FULL OPTION AS LAST OPTION
if [[ -n ${BUILD_FULL} ]]; then
for library in {0..58}; do