CoreAudio::HLE: Add FFmpeg aac decoder

This commit is contained in:
B3N30 2018-12-09 22:25:45 +01:00
parent bf1dbb47dc
commit c521f3b7d6
14 changed files with 850 additions and 5 deletions

View file

@ -20,8 +20,17 @@ option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
option(ENABLE_FFMPEG "Enable FFmpeg decoder/encoder" ON)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
<<<<<<< HEAD
=======
option(ENABLE_SCRIPTING "Enables scripting support" OFF)
CMAKE_DEPENDENT_OPTION(CITRA_USE_BUNDLED_FFMPEG "Download bundled FFmpeg binaries" ON "MSVC" OFF)
>>>>>>> CoreAudio::HLE: Add FFmpeg aac decoder
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
message(STATUS "Copying pre-commit hook")
file(COPY hooks/pre-commit
@ -251,6 +260,31 @@ if (ENABLE_QT)
endif()
endif()
if (ENABLE_FFMPEG)
if (CITRA_USE_BUNDLED_FFMPEG)
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
set(FFmpeg_VER "ffmpeg-4.0.2-msvc")
else()
message(FATAL_ERROR "No bundled FFmpeg binaries for your toolchain. Disable CITRA_USE_BUNDLED_FFMPEG and provide your own.")
endif()
if (DEFINED FFmpeg_VER)
download_bundled_external("ffmpeg/" ${FFmpeg_VER} FFmpeg_PREFIX)
set(FFMPEG_DIR "${FFmpeg_PREFIX}")
set(FFMPEG_FOUND YES)
endif()
else()
find_package(FFmpeg REQUIRED COMPONENTS avcodec)
if ("${FFmpeg_avcodec_VERSION}" VERSION_LESS "57.48.101")
message(FATAL_ERROR "Found version for libavcodec is too low. The required version is at least 57.48.101 (included in FFmpeg 3.1 and later).")
else()
set(FFMPEG_FOUND YES)
endif()
endif()
else()
set(FFMPEG_FOUND NO)
endif()
# Platform-specific library requirements
# ======================================