SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::CameraRef Struct Reference

Semi-safe reference for Camera.

Inheritance diagram for SDL::CameraRef:
Inheritance graph
[legend]
Collaboration diagram for SDL::CameraRef:
Collaboration graph
[legend]

Public Member Functions

 CameraRef (CameraParam resource)
 Constructs from CameraParam. More...
 
 CameraRef (const CameraRef &other)
 Copy constructor.
 
 ~CameraRef ()
 Destructor.
 
- Public Member Functions inherited from SDL::Camera
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.
 
Cameraoperator= (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< CameraSpecGetFormat ()
 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...
 

Constructor & Destructor Documentation

◆ CameraRef()

SDL::CameraRef::CameraRef ( CameraParam  resource)
inline
Parameters
resourcea CameraRaw or Camera.

This does not takes ownership!


The documentation for this struct was generated from the following file: