Add SDL Video Capture, with back-end for linux/macos/ios/android
This commit is contained in:
@@ -343,6 +343,7 @@ set_option(SDL_METAL "Enable Metal support" ${APPLE})
|
||||
set_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
|
||||
dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF)
|
||||
set_option(SDL_OFFSCREEN "Use offscreen video driver" ON)
|
||||
dep_option(SDL_VIDEO_CAPTURE "Enable video capturing" ON SDL_VIDEO OFF)
|
||||
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
||||
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
||||
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
||||
@@ -2047,6 +2048,10 @@ elseif(APPLE)
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
endif()
|
||||
|
||||
if(IOS OR TVOS OR MACOSX OR DARWIN)
|
||||
sdl_sources("${SDL3_SOURCE_DIR}/src/video/SDL_video_capture_apple.m")
|
||||
endif()
|
||||
|
||||
if(SDL_MISC)
|
||||
if(IOS OR TVOS OR VISIONOS)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/ios/*.m")
|
||||
@@ -2230,6 +2235,10 @@ elseif(APPLE)
|
||||
|
||||
# Actually load the frameworks at the end so we don't duplicate include.
|
||||
if(SDL_FRAMEWORK_COREVIDEO)
|
||||
find_library(COREMEDIA CoreMedia)
|
||||
if(COREMEDIA)
|
||||
sdl_link_dependency(corevideo LINK_OPTIONS "-Wl,-framework,CoreMedia")
|
||||
endif()
|
||||
sdl_link_dependency(corevideo LINK_OPTIONS "-Wl,-framework,CoreVideo")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COCOA)
|
||||
|
||||
Reference in New Issue
Block a user