FreeRDP
Loading...
Searching...
No Matches
ICamHal Struct Reference

interface to implement for the camera HAL More...

#include <camera.h>

Data Fields

WINPR_ATTR_NODISCARD UINT(* Enumerate )(ICamHal *ihal, ICamHalEnumCallback callback, CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel)
 
WINPR_ATTR_NODISCARD BOOL(* Activate )(ICamHal *ihal, const char *deviceId, CAM_ERROR_CODE *errorCode)
 
WINPR_ATTR_NODISCARD BOOL(* Deactivate )(ICamHal *ihal, const char *deviceId, CAM_ERROR_CODE *errorCode)
 
WINPR_ATTR_NODISCARD INT16(* GetMediaTypeDescriptions )(ICamHal *ihal, const char *deviceId, size_t streamIndex, const CAM_MEDIA_FORMAT_INFO *supportedFormats, size_t nSupportedFormats, CAM_MEDIA_TYPE_DESCRIPTION *mediaTypes, size_t *nMediaTypes)
 
WINPR_ATTR_NODISCARD CAM_ERROR_CODE(* StartStream )(ICamHal *ihal, CameraDevice *dev, size_t streamIndex, const CAM_MEDIA_TYPE_DESCRIPTION *mediaType, ICamHalSampleCapturedCallback callback)
 
CAM_ERROR_CODE(* StopStream )(ICamHal *ihal, const char *deviceId, size_t streamIndex)
 
CAM_ERROR_CODE(* Free )(ICamHal *ihal)
 

Detailed Description

interface to implement for the camera HAL

Definition at line 162 of file camera.h.

Field Documentation

◆ Activate

WINPR_ATTR_NODISCARD BOOL(* ICamHal::Activate) (ICamHal *ihal, const char *deviceId, CAM_ERROR_CODE *errorCode)

callback to activate a given camera device

Parameters
ihalthe hal interface
deviceIdthe name of the device
errorCodea pointer to an error code set if the call failed
Returns
if the operation was successful
Since
3.18.0

Definition at line 183 of file camera.h.

◆ Deactivate

WINPR_ATTR_NODISCARD BOOL(* ICamHal::Deactivate) (ICamHal *ihal, const char *deviceId, CAM_ERROR_CODE *errorCode)

callback to deactivate a given camera device

Parameters
ihalthe hal interface
deviceIdthe name of the device
errorCodea pointer to an error code set if the call failed
Returns
if the operation was successful
Since
3.18.0

Definition at line 194 of file camera.h.

◆ Enumerate

WINPR_ATTR_NODISCARD UINT(* ICamHal::Enumerate) (ICamHal *ihal, ICamHalEnumCallback callback, CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel)

callback to enumerate available camera calling callback for each found item

Parameters
ihalthe hal interface
callbackthe enum callback
ecamthe camera plugin
hchannelthe generic freerdp channel
Returns
the number of found cameras

Definition at line 172 of file camera.h.

◆ Free

CAM_ERROR_CODE(* ICamHal::Free) (ICamHal *ihal)

callback to free the ICamHal

Parameters
halthe hal interface
Returns
CAM_ERROR_CODE_None on success, a CAM_Error otherwise

Definition at line 241 of file camera.h.

◆ GetMediaTypeDescriptions

WINPR_ATTR_NODISCARD INT16(* ICamHal::GetMediaTypeDescriptions) (ICamHal *ihal, const char *deviceId, size_t streamIndex, const CAM_MEDIA_FORMAT_INFO *supportedFormats, size_t nSupportedFormats, CAM_MEDIA_TYPE_DESCRIPTION *mediaTypes, size_t *nMediaTypes)

callback that returns the list of compatible media types given a set of supported formats

Parameters
ihalthe hal interface
deviceIdthe name of the device
streamIndexstream index number
supportedFormatsa pointer to supported formats
nSupportedFormatsnumber of supported formats
mediaTypesresulting media type descriptors
nMediaTypesoutput number of media descriptors
Returns
number of matched supported formats

Definition at line 208 of file camera.h.

◆ StartStream

WINPR_ATTR_NODISCARD CAM_ERROR_CODE(* ICamHal::StartStream) (ICamHal *ihal, CameraDevice *dev, size_t streamIndex, const CAM_MEDIA_TYPE_DESCRIPTION *mediaType, ICamHalSampleCapturedCallback callback)

callback to start a stream

Parameters
ihalthe hal interface
dev
streamIndexstream index number
mediaType
callback
Returns
CAM_ERROR_CODE_None on success, a CAM_Error otherwise

Definition at line 222 of file camera.h.

◆ StopStream

CAM_ERROR_CODE(* ICamHal::StopStream) (ICamHal *ihal, const char *deviceId, size_t streamIndex)

callback to stop a stream

Parameters
ihalthe hal interface
deviceIdthe name of the device
streamIndexstream index number
Returns
CAM_ERROR_CODE_None on success, a CAM_Error otherwise

Definition at line 234 of file camera.h.


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