mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Set the FFmpeg video player HW decoding as disabled by default.
This commit is contained in:
parent
ac4710a18e
commit
d3b135e387
|
@ -29,13 +29,13 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/Packages)
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/Packages)
|
||||||
|
|
||||||
# Define the options.
|
# Define the options.
|
||||||
option(GLES "Set to ON if targeting Embedded OpenGL" ${GLES})
|
|
||||||
option(GL "Set to ON if targeting Desktop OpenGL" ${GL})
|
option(GL "Set to ON if targeting Desktop OpenGL" ${GL})
|
||||||
|
option(GLES "Set to ON if targeting Embedded OpenGL" ${GLES})
|
||||||
option(RPI "Set to ON to enable Raspberry Pi specific build" ${RPI})
|
option(RPI "Set to ON to enable Raspberry Pi specific build" ${RPI})
|
||||||
option(CEC "Set to ON to enable CEC" ${CEC})
|
option(CEC "Set to ON to enable CEC" ${CEC})
|
||||||
|
option(VIDEO_HW_DECODING "Set to ON to enable FFmpeg HW decoding" ${VIDEO_HW_DECODING})
|
||||||
option(VLC_PLAYER "Set to ON to build the VLC-based video player" ${VLC_PLAYER})
|
option(VLC_PLAYER "Set to ON to build the VLC-based video player" ${VLC_PLAYER})
|
||||||
option(CLANG_TIDY "Set to ON to build using the clang-tidy static analyzer" ${CLANG_TIDY})
|
option(CLANG_TIDY "Set to ON to build using the clang-tidy static analyzer" ${CLANG_TIDY})
|
||||||
option(VIDEO_HW_DECODING "Set to OFF to disable FFmpeg HW decoding" ON)
|
|
||||||
|
|
||||||
if(CLANG_TIDY)
|
if(CLANG_TIDY)
|
||||||
find_program(CLANG_TIDY_BINARY NAMES clang-tidy)
|
find_program(CLANG_TIDY_BINARY NAMES clang-tidy)
|
||||||
|
@ -70,17 +70,11 @@ set_property(CACHE GLSYSTEM PROPERTY STRINGS "Desktop OpenGL" "Embedded OpenGL")
|
||||||
#---------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
# Raspberry Pi setup.
|
# Raspberry Pi setup.
|
||||||
|
|
||||||
# If manually set to RPI (used for testing purposes).
|
|
||||||
if(RPI)
|
|
||||||
set(VIDEO_HW_DECODING OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Raspberry Pi OS 32-bit (armv7l)
|
# Raspberry Pi OS 32-bit (armv7l)
|
||||||
if(EXISTS "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/bcm_host.h")
|
if(EXISTS "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/bcm_host.h")
|
||||||
set(RPI ON)
|
set(RPI ON)
|
||||||
set(RPI_32 ON)
|
set(RPI_32 ON)
|
||||||
set(VIDEO_HW_DECODING OFF)
|
set(BCMHOST ON)
|
||||||
set(BCMHOST found)
|
|
||||||
message("-- Building on a Raspberry Pi (32-bit OS)")
|
message("-- Building on a Raspberry Pi (32-bit OS)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -88,8 +82,7 @@ endif()
|
||||||
if(EXISTS "/usr/include/bcm_host.h")
|
if(EXISTS "/usr/include/bcm_host.h")
|
||||||
set(RPI ON)
|
set(RPI ON)
|
||||||
set(RPI_64 ON)
|
set(RPI_64 ON)
|
||||||
set(VIDEO_HW_DECODING OFF)
|
set(BCMHOST ON)
|
||||||
set(BCMHOST found)
|
|
||||||
message("-- Building on a Raspberry Pi (64-bit OS)")
|
message("-- Building on a Raspberry Pi (64-bit OS)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -220,10 +213,6 @@ if(RPI)
|
||||||
add_definitions(-D_RPI_)
|
add_definitions(-D_RPI_)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VLC_PLAYER)
|
|
||||||
add_definitions(-DBUILD_VLC_PLAYER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(DEFINED libCEC_FOUND)
|
if(DEFINED libCEC_FOUND)
|
||||||
add_definitions(-DHAVE_LIBCEC)
|
add_definitions(-DHAVE_LIBCEC)
|
||||||
endif()
|
endif()
|
||||||
|
@ -232,6 +221,10 @@ if(VIDEO_HW_DECODING)
|
||||||
add_definitions(-DVIDEO_HW_DECODING)
|
add_definitions(-DVIDEO_HW_DECODING)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(VLC_PLAYER)
|
||||||
|
add_definitions(-DBUILD_VLC_PLAYER)
|
||||||
|
endif()
|
||||||
|
|
||||||
# GLM library options.
|
# GLM library options.
|
||||||
add_definitions(-DGLM_FORCE_CXX17)
|
add_definitions(-DGLM_FORCE_CXX17)
|
||||||
add_definitions(-DGLM_FORCE_XYZW_ONLY)
|
add_definitions(-DGLM_FORCE_XYZW_ONLY)
|
||||||
|
@ -272,6 +265,7 @@ set(COMMON_INCLUDE_DIRS ${CURL_INCLUDE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/external/nanosvg/src
|
${CMAKE_CURRENT_SOURCE_DIR}/external/nanosvg/src
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/external/rapidjson/include
|
${CMAKE_CURRENT_SOURCE_DIR}/external/rapidjson/include
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/es-core/src)
|
${CMAKE_CURRENT_SOURCE_DIR}/es-core/src)
|
||||||
|
|
||||||
if(VLC_PLAYER)
|
if(VLC_PLAYER)
|
||||||
set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS} ${VLC_INCLUDE_DIR})
|
set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS} ${VLC_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -391,7 +385,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Raspberry Pi.
|
# Raspberry Pi.
|
||||||
if(DEFINED BCMHOST)
|
if(BCMHOST)
|
||||||
list(APPEND COMMON_LIBRARIES bcm_host vchiq_arm)
|
list(APPEND COMMON_LIBRARIES bcm_host vchiq_arm)
|
||||||
if(RPI_32)
|
if(RPI_32)
|
||||||
link_directories("${CMAKE_FIND_ROOT_PATH}/opt/vc/lib")
|
link_directories("${CMAKE_FIND_ROOT_PATH}/opt/vc/lib")
|
||||||
|
|
|
@ -229,7 +229,7 @@ void Settings::setDefaults()
|
||||||
// Other settings.
|
// Other settings.
|
||||||
mStringMap["MediaDirectory"] = {"", ""};
|
mStringMap["MediaDirectory"] = {"", ""};
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
mIntMap["MaxVRAM"] = {180, 180};
|
mIntMap["MaxVRAM"] = {184, 184};
|
||||||
#else
|
#else
|
||||||
mIntMap["MaxVRAM"] = {256, 256};
|
mIntMap["MaxVRAM"] = {256, 256};
|
||||||
#endif
|
#endif
|
||||||
|
@ -249,7 +249,7 @@ void Settings::setDefaults()
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
mBoolMap["LaunchWorkaround"] = {true, true};
|
mBoolMap["LaunchWorkaround"] = {true, true};
|
||||||
#endif
|
#endif
|
||||||
#if !defined(VIDEO_HW_DECODING)
|
#if defined(VIDEO_HW_DECODING)
|
||||||
mBoolMap["VideoHardwareDecoding"] = {false, false};
|
mBoolMap["VideoHardwareDecoding"] = {false, false};
|
||||||
#endif
|
#endif
|
||||||
mBoolMap["VideoUpscaleFrameRate"] = {false, false};
|
mBoolMap["VideoUpscaleFrameRate"] = {false, false};
|
||||||
|
|
|
@ -1227,10 +1227,10 @@ void VideoFFmpegComponent::startVideo()
|
||||||
|
|
||||||
// Video stream setup.
|
// Video stream setup.
|
||||||
|
|
||||||
#if !defined(VIDEO_HW_DECODING)
|
#if defined(VIDEO_HW_DECODING)
|
||||||
bool hwDecoding = false;
|
|
||||||
#else
|
|
||||||
bool hwDecoding = Settings::getInstance()->getBool("VideoHardwareDecoding");
|
bool hwDecoding = Settings::getInstance()->getBool("VideoHardwareDecoding");
|
||||||
|
#else
|
||||||
|
bool hwDecoding = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mVideoStreamIndex =
|
mVideoStreamIndex =
|
||||||
|
|
Loading…
Reference in a new issue