Allow for the va library to be used with ffmpeg.
This needs verifying.
This commit is contained in:
@@ -26,6 +26,7 @@ else()
|
||||
option(WITH_FFMPEG "Build with FFMPEG." ON)
|
||||
# Builder beware: later versions of ffmpeg may break!
|
||||
option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG." OFF)
|
||||
option(WITH_LIBVA "Build with libVa support for Video Acceleration." OFF)
|
||||
option(WITH_TTY "Build with Linux TTY Input Support." OFF)
|
||||
option(WITH_PROFILING "Build with Profiling Support." OFF)
|
||||
option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Find the Video Acceleration library.
|
||||
|
||||
# The following will be set:
|
||||
|
||||
# VA_INCLUDE_DIR
|
||||
# VA_LIBRARY
|
||||
# VA_FOUND
|
||||
|
||||
find_path(VA_INCLUDE_DIR NAMES va/va.h)
|
||||
|
||||
set(VA_NAMES "${VA_NAMES}" "va" "libva")
|
||||
find_library(VA_LIBRARY NAMES ${VA_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VA DEFAULT_MSG VA_LIBRARY VA_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(VA_LIBRARY VA_INCLUDE_DIR)
|
||||
@@ -256,6 +256,10 @@ elseif(LINUX)
|
||||
endif()
|
||||
|
||||
if(WITH_FFMPEG)
|
||||
if(WITH_LIBVA)
|
||||
find_package(VA)
|
||||
endif()
|
||||
|
||||
if (WITH_SYSTEM_FFMPEG)
|
||||
find_package("FFMPEG")
|
||||
if(NOT FFMPEG_FOUND)
|
||||
@@ -293,6 +297,12 @@ elseif(LINUX)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_LIBVA AND VA_FOUND)
|
||||
list(APPEND FFMPEG_CONFIGURE
|
||||
"--extra-ldflags=-lva"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
|
||||
externalproject_add("ffmpeg"
|
||||
SOURCE_DIR "${SM_FFMPEG_SRC_DIR}"
|
||||
|
||||
Reference in New Issue
Block a user