mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-12-01 10:14:46 +00:00
Add support for VDPAU video acceleration
This commit is contained in:
1 parent
078b6d1c49
commit
4fce2292bb
4 files changed
+255
-10
No files matched your search
@@ -26,9 +26,16 @@ pkg_check_modules(SDL sdl2>=2.0.4)
|
||||
pkg_check_modules(AVCODEC libavcodec)
|
||||
pkg_check_modules(AVUTIL libavutil)
|
||||
pkg_check_modules(SWSCALE libswscale)
|
||||
pkg_check_modules(XLIB x11-xcb)
|
||||
pkg_check_modules(LIBVA vdpau)
|
||||
|
||||
if(AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND AND SDL_FOUND)
|
||||
set(SOFTWARE_FOUND TRUE)
|
||||
if(XLIB_FOUND AND LIBVA_FOUND)
|
||||
set(VDPAU_FOUND TRUE)
|
||||
else()
|
||||
set(VDPAU_FOUND FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(SOFTWARE_FOUND FALSE)
|
||||
endif()
|
||||
@@ -46,6 +53,10 @@ endif()
|
||||
if (SOFTWARE_FOUND)
|
||||
list(APPEND SRC_LIST ./src/video/ffmpeg.c ./src/video/sdl.c ./src/audio/sdl.c)
|
||||
list(APPEND MOONLIGHT_DEFINITIONS HAVE_SDL)
|
||||
if(VDPAU_FOUND)
|
||||
list(APPEND SRC_LIST ./src/video/ffmpeg_vdpau.c)
|
||||
list(APPEND MOONLIGHT_DEFINITIONS HAVE_VDPAU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BROADCOM_FOUND OR FREESCALE_FOUND OR CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
@@ -87,6 +98,10 @@ endif()
|
||||
if (SOFTWARE_FOUND)
|
||||
target_include_directories(moonlight PRIVATE ${SDL_INCLUDE_DIRS} ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS})
|
||||
target_link_libraries(moonlight ${SDL_LIBRARIES} ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES} ${SWSCALE_LIBRARIES})
|
||||
if(VDPAU_FOUND)
|
||||
target_include_directories(moonlight PRIVATE ${XLIB_INCLUDE_DIRS} ${LIBVA_INCLUDE_DIRS})
|
||||
target_link_libraries(moonlight ${XLIB_LIBRARIES} ${LIBVA_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET moonlight PROPERTY COMPILE_DEFINITIONS ${MOONLIGHT_DEFINITIONS})
|
||||
|
||||
Reference in new issue
Block a user