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.
This commit is contained in:
nanahi 2024-03-01 21:22:16 -05:00 committed by sfan5
parent a81212836d
commit 7d31db9e45
1 changed files with 13 additions and 3 deletions

View File

@ -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[@]}" ..