From 7d31db9e456560f24d831a173516bac46b341828 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:22:16 -0500 Subject: [PATCH] ci/mingw: add dav1d decoder ffmpeg has built-in decoders for almost all common formats, except AV1. dav1d allows the CI build to play AV1 videos without a hwdec-capable GPU. --- ci/build-mingw64.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh index 350aac535c..77449990e9 100755 --- a/ci/build-mingw64.sh +++ b/ci/build-mingw64.sh @@ -121,6 +121,16 @@ _zlib () { } _zlib_mark=lib/libz.dll.a +_dav1d () { + [ -d dav1d ] || $gitclone https://code.videolan.org/videolan/dav1d.git + builddir dav1d + meson setup .. --cross-file "$prefix_dir/crossfile" \ + -Denable_{tools,tests}=false + makeplusinstall + popd +} +_dav1d_mark=lib/libdav1d.dll.a + _ffmpeg () { [ -d ffmpeg ] || $gitclone https://github.com/FFmpeg/FFmpeg.git ffmpeg builddir ffmpeg @@ -129,7 +139,7 @@ _ffmpeg () { --enable-cross-compile --cross-prefix=$TARGET- --arch=${TARGET%%-*} --cc="$CC" --cxx="$CXX" $commonflags --disable-{doc,programs,muxers,encoders} - --enable-encoder=mjpeg,png + --enable-encoder=mjpeg,png --enable-libdav1d ) pkg-config vulkan && args+=(--enable-vulkan --enable-libshaderc) ../configure "${args[@]}" @@ -254,7 +264,7 @@ _luajit () { } _luajit_mark=lib/libluajit-5.1.a -for x in iconv zlib shaderc spirv-cross nv-headers; do +for x in iconv zlib shaderc spirv-cross nv-headers dav1d; do build_if_missing $x done if [[ "$TARGET" != "i686-"* ]]; then @@ -299,7 +309,7 @@ if [ "$2" = pack ]; then dlls=( libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime av*.dll sw*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll - lib{shaderc_shared,spirv-cross-c-shared}.dll zlib1.dll + lib{shaderc_shared,spirv-cross-c-shared,dav1d}.dll zlib1.dll # note: vulkan-1.dll is not here since drivers provide it ) mv -v "${dlls[@]}" ..