FFmpeg-Builds/scripts.d/50-openh264.sh

60 lines
1.2 KiB
Bash
Raw Normal View History

2021-11-13 15:47:42 +00:00
#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://github.com/cisco/openh264.git"
2022-07-13 15:08:17 +00:00
SCRIPT_COMMIT="2e637867315ffeda3cd8970825ec86acc3fc4a30"
2021-11-13 15:47:42 +00:00
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
2022-07-12 15:54:12 +00:00
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" openh264
2021-11-13 15:47:42 +00:00
cd openh264
local myconf=(
2021-11-14 13:49:36 +00:00
PREFIX="$FFBUILD_PREFIX"
2022-02-27 13:47:27 +00:00
INCLUDE_PREFIX="$FFBUILD_PREFIX"/include/wels
2021-11-14 13:49:36 +00:00
BUILDTYPE=Release
DEBUGSYMBOLS=False
LIBDIR_NAME=lib
CC="$FFBUILD_CROSS_PREFIX"gcc
CXX="$FFBUILD_CROSS_PREFIX"g++
AR="$FFBUILD_CROSS_PREFIX"ar
2021-11-13 15:47:42 +00:00
)
2021-11-14 13:49:36 +00:00
if [[ $TARGET == win32 ]]; then
myconf+=(
OS=mingw_nt
ARCH=i686
)
elif [[ $TARGET == win64 ]]; then
myconf+=(
OS=mingw_nt
ARCH=x86_64
)
elif [[ $TARGET == linux64 ]]; then
2021-11-13 15:47:42 +00:00
myconf+=(
2021-11-14 13:49:36 +00:00
OS=linux
ARCH=x86_64
2021-11-13 15:47:42 +00:00
)
2022-05-09 22:15:31 +00:00
elif [[ $TARGET == linuxarm64 ]]; then
myconf+=(
OS=linux
ARCH=aarch64
)
2021-11-13 15:47:42 +00:00
else
echo "Unknown target"
return -1
fi
2021-11-14 13:49:36 +00:00
make -j$(nproc) "${myconf[@]}" install-static
2021-11-13 15:47:42 +00:00
}
ffbuild_configure() {
echo --enable-libopenh264
}
ffbuild_unconfigure() {
echo --disable-libopenh264
}