Added an example of video decoding with ffmpeg

This commit is contained in:
Sam Lantinga
2023-10-07 02:01:35 -07:00
parent d88bf687a8
commit 88f2fb9dcf
3 changed files with 716 additions and 0 deletions

View File

@@ -182,6 +182,16 @@ if(HAVE_LIBUDEV_H)
add_definitions(-DHAVE_LIBUDEV_H)
endif()
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
include("${SDL3_SOURCE_DIR}/cmake/FindFFmpeg.cmake")
if(FFMPEG_FOUND)
add_sdl_test_executable(testspriteffmpeg NO_C90 SOURCES testspriteffmpeg.c ${icon_bmp_header})
target_include_directories(testspriteffmpeg PRIVATE ${FFMPEG_INCLUDE_DIRS})
target_link_libraries(testspriteffmpeg PRIVATE ${FFMPEG_LIBRARIES})
else()
message(STATUS "Cannot find ffmpeg, skipping testspriteffmpeg")
endif()
add_sdl_test_executable(checkkeys SOURCES checkkeys.c)
add_sdl_test_executable(checkkeysthreads SOURCES checkkeysthreads.c)
add_sdl_test_executable(loopwave NEEDS_RESOURCES TESTUTILS SOURCES loopwave.c)