mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-29 11:45:30 +02:00
[externals] update ffmpeg to May 16th release, fix externals build
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
c8c61a12c3
commit
197bc3a9b9
2 changed files with 38 additions and 10 deletions
4
externals/cpmfile.json
vendored
4
externals/cpmfile.json
vendored
|
|
@ -203,8 +203,8 @@
|
||||||
},
|
},
|
||||||
"ffmpeg": {
|
"ffmpeg": {
|
||||||
"repo": "FFmpeg/FFmpeg",
|
"repo": "FFmpeg/FFmpeg",
|
||||||
"sha": "c7b5f1537d",
|
"sha": "1aefacfda4",
|
||||||
"hash": "ed177621176b3961bdcaa339187d3a7688c1c8b060b79c4bb0257cbc67ad7021ae5d5adca5303b45625abbbe3d9aafdd87ce777b8690ac295290d744c875489a",
|
"hash": "f55af5bb0abee2dabbc730c5b1c11cefc1aa3437745744b7b6d3d6c42b8b71ac19405cf41e9f91a084cc1a98c1a5309d9a6d6ca17d1845ad7aa1b88929d3dadc",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
},
|
},
|
||||||
"ffmpeg-ci": {
|
"ffmpeg-ci": {
|
||||||
|
|
|
||||||
44
externals/ffmpeg/CMakeLists.txt
vendored
44
externals/ffmpeg/CMakeLists.txt
vendored
|
|
@ -34,8 +34,8 @@ if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||||
# User attempts to do a FFmpeg cross compilation because...
|
# User attempts to do a FFmpeg cross compilation because...
|
||||||
# Here we just quickly test against host/system processors not matching
|
# Here we just quickly test against host/system processors not matching
|
||||||
# TODO: Test for versions not matching as well?
|
# TODO: Test for versions not matching as well?
|
||||||
elseif (NOT (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES CMAKE_SYSTEM_PROCESSOR
|
elseif (NOT ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "${CMAKE_SYSTEM_PROCESSOR}"
|
||||||
AND CMAKE_HOST_SYSTEM_NAME MATCHES CMAKE_SYSTEM_NAME))
|
AND "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "${CMAKE_SYSTEM_NAME}"))
|
||||||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" FFmpeg_SYSTEM_NAME)
|
string(TOLOWER "${CMAKE_SYSTEM_NAME}" FFmpeg_SYSTEM_NAME)
|
||||||
if (FFmpeg_SYSTEM_NAME STREQUAL "openorbis" OR FFmpeg_SYSTEM_NAME STREQUAL "managarm")
|
if (FFmpeg_SYSTEM_NAME STREQUAL "openorbis" OR FFmpeg_SYSTEM_NAME STREQUAL "managarm")
|
||||||
set(FFmpeg_SYSTEM_NAME "none")
|
set(FFmpeg_SYSTEM_NAME "none")
|
||||||
|
|
@ -50,7 +50,10 @@ if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||||
if (DEFINED FFmpeg_CROSS_PREFIX)
|
if (DEFINED FFmpeg_CROSS_PREFIX)
|
||||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS --cross-prefix="${FFmpeg_CROSS_PREFIX}")
|
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS --cross-prefix="${FFmpeg_CROSS_PREFIX}")
|
||||||
else()
|
else()
|
||||||
message(WARNING "Please set FFmpeg_CROSS_PREFIX to your cross toolchain prefix, for example: \${CMAKE_STAGING_PREFIX}/bin/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}-")
|
message(FATAL_ERROR "Please set FFmpeg_CROSS_PREFIX to your cross toolchain prefix, for example: \${CMAKE_STAGING_PREFIX}/bin/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}-"
|
||||||
|
"If this is not intended, check that:"
|
||||||
|
"${CMAKE_HOST_SYSTEM_PROCESSOR} = ${CMAKE_SYSTEM_PROCESSOR}"
|
||||||
|
"${CMAKE_HOST_SYSTEM_NAME} = ${CMAKE_SYSTEM_NAME}")
|
||||||
endif()
|
endif()
|
||||||
set(FFmpeg_IS_CROSS_COMPILING TRUE)
|
set(FFmpeg_IS_CROSS_COMPILING TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -65,8 +68,10 @@ elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING AND NOT ANDROID)
|
||||||
pkg_check_modules(CUDA cuda)
|
pkg_check_modules(CUDA cuda)
|
||||||
pkg_check_modules(FFNVCODEC ffnvcodec)
|
pkg_check_modules(FFNVCODEC ffnvcodec)
|
||||||
pkg_check_modules(VDPAU vdpau)
|
pkg_check_modules(VDPAU vdpau)
|
||||||
|
pkg_check_modules(VULKAN vulkan)
|
||||||
|
find_package(spirv-headers)
|
||||||
find_package(X11)
|
find_package(X11)
|
||||||
|
|
||||||
if(X11_FOUND)
|
if(X11_FOUND)
|
||||||
if (NOT APPLE)
|
if (NOT APPLE)
|
||||||
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||||
|
|
@ -137,7 +142,7 @@ elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING AND NOT ANDROID)
|
||||||
endif(CUDA_FOUND)
|
endif(CUDA_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (VDPAU_FOUND AND NOT APPLE)
|
if (VDPAU_FOUND)
|
||||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||||
--enable-vdpau
|
--enable-vdpau
|
||||||
--enable-hwaccel=h264_vdpau
|
--enable-hwaccel=h264_vdpau
|
||||||
|
|
@ -151,6 +156,21 @@ elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING AND NOT ANDROID)
|
||||||
list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vdpau)
|
list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vdpau)
|
||||||
message(WARNING "ffmpeg: libvdpau-dev not found, disabling Video Decode and Presentation API for Unix (VDPAU)...")
|
message(WARNING "ffmpeg: libvdpau-dev not found, disabling Video Decode and Presentation API for Unix (VDPAU)...")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (VULKAN_FOUND)
|
||||||
|
list(APPEND FFmpeg_HWACCEL_FLAGS --enable-vulkan)
|
||||||
|
list(APPEND FFmpeg_HWACCEL_LIBRARIES ${VULKAN_LIBRARIES})
|
||||||
|
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS ${VULKAN_INCLUDE_DIRS})
|
||||||
|
list(APPEND FFmpeg_HWACCEL_LDFLAGS ${VULKAN_LDFLAGS})
|
||||||
|
message(STATUS "ffmpeg: vulkan libraries version ${VULKAN_VERSION} found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (SPIRV_HEADERS_FOUND)
|
||||||
|
list(APPEND FFmpeg_HWACCEL_LIBRARIES ${SPIRV_HEADERS_LIBRARIES})
|
||||||
|
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS ${SPIRV_HEADERS_INCLUDE_DIRS})
|
||||||
|
list(APPEND FFmpeg_HWACCEL_LDFLAGS ${SPIRV_HEADERS_LDFLAGS})
|
||||||
|
message(STATUS "ffmpeg: spirv-headers libraries version ${SPIRV_HEADERS_VERSION} found")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (PLATFORM_PS4)
|
if (PLATFORM_PS4)
|
||||||
|
|
@ -247,8 +267,15 @@ else()
|
||||||
|
|
||||||
# `configure` parameters builds only exactly what yuzu needs from FFmpeg
|
# `configure` parameters builds only exactly what yuzu needs from FFmpeg
|
||||||
# `--disable-vdpau` is needed to avoid linking issues
|
# `--disable-vdpau` is needed to avoid linking issues
|
||||||
set(FFmpeg_CC ${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER})
|
set(FFmpeg_CC ${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER})
|
||||||
set(FFmpeg_CXX ${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER})
|
set(FFmpeg_CXX ${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER})
|
||||||
|
# A C++ compiler ought to make C++ binaries, unfortunely using raw `ld` often
|
||||||
|
# doesn't properly link libc/libstdc++, we don't exactly have `LD_C + LD_CXX` to diff
|
||||||
|
# between them, so use the C++ compiler wrapper launcher as a form of.. well...
|
||||||
|
# avoiding the issue of stdc++ not being linked, yes, this affects C libraries
|
||||||
|
# but due to the fact 99% of LD linkers use GC nowadays, this basically should resolve
|
||||||
|
# into a nop, MSVC untested.
|
||||||
|
set(FFmpeg_LD ${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${FFmpeg_MAKEFILE}
|
${FFmpeg_MAKEFILE}
|
||||||
|
|
@ -269,7 +296,7 @@ else()
|
||||||
--enable-pic
|
--enable-pic
|
||||||
--cc=${FFmpeg_CC}
|
--cc=${FFmpeg_CC}
|
||||||
--cxx=${FFmpeg_CXX}
|
--cxx=${FFmpeg_CXX}
|
||||||
--ld=${CMAKE_LINKER}
|
--ld=${FFmpeg_LD}
|
||||||
--extra-cflags=${CMAKE_C_FLAGS}
|
--extra-cflags=${CMAKE_C_FLAGS}
|
||||||
--extra-cxxflags=${CMAKE_CXX_FLAGS}
|
--extra-cxxflags=${CMAKE_CXX_FLAGS}
|
||||||
--extra-ldflags=${CMAKE_C_LINK_FLAGS}
|
--extra-ldflags=${CMAKE_C_LINK_FLAGS}
|
||||||
|
|
@ -280,6 +307,7 @@ else()
|
||||||
)
|
)
|
||||||
unset(FFmpeg_CC)
|
unset(FFmpeg_CC)
|
||||||
unset(FFmpeg_CXX)
|
unset(FFmpeg_CXX)
|
||||||
|
unset(FFmpeg_LD)
|
||||||
unset(FFmpeg_HWACCEL_FLAGS)
|
unset(FFmpeg_HWACCEL_FLAGS)
|
||||||
unset(FFmpeg_CROSS_COMPILE_FLAGS)
|
unset(FFmpeg_CROSS_COMPILE_FLAGS)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue