camera: Reenabled macOS/iOS support, with rewritten CoreMedia implementation.

This commit is contained in:
Ryan C. Gordon
2024-02-06 01:19:12 -05:00
parent f8fa08d2b1
commit 99d1337de2
8 changed files with 344 additions and 456 deletions

View File

@@ -66,8 +66,8 @@ typedef struct SDL_CameraSpec
Uint32 format; /**< Frame SDL_PixelFormatEnum format */
int width; /**< Frame width */
int height; /**< Frame height */
int interval_numerator; /**< Frame rate numerator ((dom / num) == fps) */
int interval_denominator; /**< Frame rate demoninator ((dom / num) == fps)*/
int interval_numerator; /**< Frame rate numerator ((dom / num) == fps, (num / dom) == duration) */
int interval_denominator; /**< Frame rate demoninator ((dom / num) == fps, (num / dom) == duration) */
} SDL_CameraSpec;
/**

View File

@@ -246,8 +246,6 @@
#cmakedefine USE_POSIX_SPAWN @USE_POSIX_SPAWN@
#cmakedefine HAVE_COREMEDIA
/* SDL internal assertion support */
#if @SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED@
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@

View File

@@ -198,8 +198,6 @@
#define SDL_VIDEO_METAL 1
#endif
#define HAVE_COREMEDIA 1
/* Enable system power support */
#define SDL_POWER_UIKIT 1
@@ -213,6 +211,10 @@
#define SDL_FILESYSTEM_COCOA 1
/* enable camera support */
#ifndef SDL_PLATFORM_TVOS
#define SDL_CAMERA_DRIVER_COREMEDIA 1
#endif
#define SDL_CAMERA_DRIVER_DUMMY 1
#endif /* SDL_build_config_ios_h_ */

View File

@@ -261,8 +261,6 @@
#endif
#endif
#define HAVE_COREMEDIA 1
/* Enable system power support */
#define SDL_POWER_MACOSX 1