sdl.camera

SDL Camera Handling

Members

Aliases

SDL_CameraID
alias SDL_CameraID = Uint32

This is a unique ID for a camera device for the time it is connected to the system, and is never reused for the lifetime of the application.

Enums

SDL_CameraPosition
enum SDL_CameraPosition

The position of camera in relation to system device.

Functions

SDL_AcquireCameraFrame
SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, Uint64* timestampNS)

Acquire a frame.

SDL_CloseCamera
void SDL_CloseCamera(SDL_Camera* camera)

Use this function to shut down camera processing and close the camera device.

SDL_GetCameraDriver
const(char)* SDL_GetCameraDriver(int index)

Use this function to get the name of a built in camera driver.

SDL_GetCameraFormat
bool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec)

Get the spec that a camera is using when generating images.

SDL_GetCameraID
SDL_CameraID SDL_GetCameraID(SDL_Camera* camera)

Get the instance ID of an opened camera.

SDL_GetCameraName
const(char)* SDL_GetCameraName(SDL_CameraID instance_id)

Get the human-readable device name for a camera.

SDL_GetCameraPermissionState
int SDL_GetCameraPermissionState(SDL_Camera* camera)

Query if camera access has been approved by the user.

SDL_GetCameraPosition
SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id)

Get the position of the camera in relation to the system.

SDL_GetCameraProperties
SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera)

Get the properties associated with an opened camera.

SDL_GetCameraSupportedFormats
SDL_CameraSpec** SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int* count)

Get the list of native formats/sizes a camera supports.

SDL_GetCameras
SDL_CameraID* SDL_GetCameras(int* count)

Get a list of currently connected camera devices.

SDL_GetCurrentCameraDriver
const(char)* SDL_GetCurrentCameraDriver()

Get the name of the current camera driver.

SDL_GetNumCameraDrivers
int SDL_GetNumCameraDrivers()

Use this function to get the number of built-in camera drivers.

SDL_OpenCamera
SDL_Camera* SDL_OpenCamera(SDL_CameraID instance_id, SDL_CameraSpec* spec)

Open a video recording device (a "camera").

SDL_ReleaseCameraFrame
void SDL_ReleaseCameraFrame(SDL_Camera* camera, SDL_Surface* frame)

Release a frame of video acquired from a camera.

Structs

SDL_Camera
struct SDL_Camera

The opaque structure used to identify an opened SDL camera.

SDL_CameraSpec
struct SDL_CameraSpec

The details of an output format for a camera device.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen