-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update FFmpeg to 4.4.1 and add librist dep for Windows
For windows obs-deps, this: - adds librist dependency to FFmpeg, - updates FFmpeg from 4.2.4 to 4.4.1. For mac librist dep, this corrects the list of librist.c commits patched (one commit had been forgotten).
- Loading branch information
Showing
6 changed files
with
195 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#!/bin/bash | ||
|
||
############################################################################### | ||
# Windows librist cross-compile build script | ||
############################################################################### | ||
# | ||
# This script file can be included in build scripts for Windows or run directly | ||
# | ||
############################################################################### | ||
|
||
# Halt on errors | ||
set -eE | ||
|
||
_patch_product() { | ||
cd "${PRODUCT_FOLDER}" | ||
|
||
step "Apply patches..." | ||
if [ ! -f "cross_mingw32.txt" ] || [ ! -f "cross_mingw64.txt" ]; then | ||
apply_patch "${CHECKOUT_DIR}/CI/windows/patches/librist/librist.patch" "F7417521457C875B901209F849EFDDB092A2BB6897A2797F22FE843EE5AA2363" | ||
fi | ||
} | ||
|
||
_build_product() { | ||
cd "${PRODUCT_FOLDER}" | ||
BASE_DIR="$(pwd)" | ||
|
||
if [ "${ARCH}" = "x86_64" ]; then | ||
step "Configure (x86_64)..." | ||
meson setup build_x86_64 \ | ||
--cross-file cross_mingw64.txt \ | ||
--buildtype release \ | ||
--prefix "${BUILD_DIR}" \ | ||
-Dtest=false \ | ||
-Dbuilt_tools=false \ | ||
-Dhave_mingw_pthreads=true \ | ||
-Dpkg_config_path="${BUILD_DIR}/lib/pkgconfig" | ||
|
||
step "Build (x86_64)..." | ||
meson compile -C build_x86_64 | ||
fi | ||
|
||
if [ "${ARCH}" = "x86" ]; then | ||
step "Configure (x86)..." | ||
meson setup build_x86 \ | ||
--cross-file cross_mingw32.txt \ | ||
--buildtype release \ | ||
--prefix "${BUILD_DIR}" \ | ||
-Dtest=false \ | ||
-Dbuilt_tools=false \ | ||
-Dhave_mingw_pthreads=true \ | ||
-Dpkg_config_path="${BUILD_DIR}/lib/pkgconfig" | ||
|
||
step "Build (x86)..." | ||
meson compile -C build_x86 | ||
fi | ||
|
||
|
||
} | ||
|
||
_install_product() { | ||
cd "${PRODUCT_FOLDER}" | ||
|
||
step "Install (${ARCH})..." | ||
meson install -C build_${ARCH} | ||
} | ||
|
||
_build_setup_rist() { | ||
trap "caught_error 'build-librist'" ERR | ||
|
||
ensure_dir "${CHECKOUT_DIR}/windows_cross_build_temp" | ||
|
||
step "Git checkout..." | ||
mkdir -p "${PRODUCT_REPO}" | ||
cd "${PRODUCT_REPO}" | ||
|
||
if [ -d "./.git" ]; then | ||
info "Repository ${PRODUCT_REPO} already exists, updating..." | ||
git config advice.detachedHead false | ||
git config remote.origin.url "https://code.videolan.org/rist/librist.git" | ||
git config remote.origin.fetch "+refs/heads/master:refs/remotes/origin/master" | ||
git config remote.origin.tapOpt --no-tags | ||
|
||
if ! git rev-parse -q --verify "${PRODUCT_HASH:-${CI_PRODUCT_HASH}}^{commit}"; then | ||
git fetch origin | ||
fi | ||
|
||
git checkout -f "${PRODUCT_HASH:-${CI_PRODUCT_HASH}}" -- | ||
git reset --hard "${PRODUCT_HASH:-${CI_PRODUCT_HASH}}" -- | ||
else | ||
git clone "https://code.videolan.org/rist/librist.git" "$(pwd)" | ||
git config advice.detachedHead false | ||
info "Checking out commit ${PRODUCT_HASH:-${CI_PRODUCT_HASH}}..." | ||
git checkout -f "${PRODUCT_HASH:-${CI_PRODUCT_HASH}}" -- | ||
|
||
fi | ||
} | ||
|
||
build-librist-main() { | ||
PRODUCT_NAME="${PRODUCT_NAME:-librist}" | ||
|
||
if [ -z "${_RUN_OBS_BUILD_SCRIPT}" ]; then | ||
CHECKOUT_DIR="$(/usr/bin/git rev-parse --show-toplevel)" | ||
source "${CHECKOUT_DIR}/CI/include/build_support.sh" | ||
source "${CHECKOUT_DIR}/CI/include/build_support_windows_cross.sh" | ||
|
||
_check_parameters $* | ||
_build_checks | ||
fi | ||
|
||
NOCONTINUE=TRUE | ||
PRODUCT_REPO="librist" | ||
PRODUCT_PROJECT="librist" | ||
PRODUCT_FOLDER="librist" | ||
|
||
if [ -z "${INSTALL}" ]; then | ||
_build_setup_rist | ||
_build | ||
else | ||
_install_product | ||
fi | ||
} | ||
|
||
build-librist-main $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/cross_mingw32.txt b/cross_mingw32.txt | ||
new file mode 100644 | ||
index 0000000..95b66a0 | ||
--- /dev/null | ||
+++ b/cross_mingw32.txt | ||
@@ -0,0 +1,14 @@ | ||
+[host_machine] | ||
+system = 'windows' | ||
+cpu_family = 'x86' | ||
+cpu = 'i686' | ||
+endian = 'little' | ||
+ | ||
+[binaries] | ||
+c = 'i686-w64-mingw32-gcc' | ||
+cpp = 'i686-w64-mingw32-g++' | ||
+ar = 'i686-w64-mingw32-ar' | ||
+ranlib = 'i686-w64-mingw32-ranlib' | ||
+strip = 'i686-w64-mingw32-strip' | ||
+windres = 'i686-w64-mingw32-windres' | ||
+pkgconfig = 'i686-w64-mingw32-pkg-config' | ||
diff --git a/cross_mingw64.txt b/cross_mingw64.txt | ||
new file mode 100644 | ||
index 0000000..09f7af0 | ||
--- /dev/null | ||
+++ b/cross_mingw64.txt | ||
@@ -0,0 +1,14 @@ | ||
+[binaries] | ||
+c = 'x86_64-w64-mingw32-gcc' | ||
+cpp = 'x86_64-w64-mingw32-g++' | ||
+ld = 'x86_64-w64-mingw32-ld' | ||
+ar = 'x86_64-w64-mingw32-ar' | ||
+strip = 'x86_64-w64-mingw32-strip' | ||
+pkgconfig = 'x86_64-w64-mingw32-pkg-config' | ||
+objdump = 'x86_64-w64-mingw32-objdump' | ||
+ | ||
+[host_machine] | ||
+system = 'windows' | ||
+cpu_family = 'x86_64' | ||
+cpu = 'native' | ||
+endian = 'little' |