SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for Camera.
Public Member Functions | |
CameraRef (CameraParam resource) | |
Constructs from CameraParam. More... | |
CameraRef (const CameraRef &other) | |
Copy constructor. | |
~CameraRef () | |
Destructor. | |
![]() | |
constexpr | Camera ()=default |
Default ctor. | |
constexpr | Camera (const CameraRaw resource) |
Constructs from CameraParam. More... | |
constexpr | Camera (const Camera &other)=delete |
Copy constructor. | |
constexpr | Camera (Camera &&other) |
Move constructor. | |
constexpr | Camera (const CameraRef &other)=delete |
constexpr | Camera (CameraRef &&other)=delete |
Camera (CameraID instance_id, OptionalRef< const CameraSpec > spec={}) | |
Open a video recording device (a "camera"). More... | |
~Camera () | |
Destructor. | |
Camera & | operator= (Camera other) |
Assignment operator. | |
constexpr CameraRaw | get () const |
Retrieves underlying CameraRaw. | |
constexpr CameraRaw | release () |
Retrieves underlying CameraRaw and clear this. | |
constexpr auto | operator<=> (const Camera &other) const =default |
Comparison. | |
constexpr bool | operator== (std::nullptr_t _) const |
Comparison. | |
constexpr | operator bool () const |
Converts to bool. | |
constexpr | operator CameraParam () const |
Converts to CameraParam. | |
void | Close () |
Use this function to shut down camera processing and close the camera device. More... | |
int | GetPermissionState () |
Query if camera access has been approved by the user. More... | |
CameraID | GetID () |
Get the instance ID of an opened camera. More... | |
PropertiesRef | GetProperties () |
Get the properties associated with an opened camera. More... | |
std::optional< CameraSpec > | GetFormat () |
Get the spec that a camera is using when generating images. More... | |
Surface | AcquireFrame (Uint64 *timestampNS=nullptr) |
Acquire a frame. More... | |
void | ReleaseFrame (SurfaceParam frame) |
Release a frame of video acquired from a camera. More... | |
|
inline |
resource | a CameraRaw or Camera. |
This does not takes ownership!