CAMGetStateInfo

Syntax

#include <cafe/camera/camera.h>

int CAMGetStateInfo(CAMHandle hCam, CAM_STATE state, CAMStateInfo *pInfo);

Parameters

hCam Handle returned from CAMInit.
state Camera state of the type CAM_STATE.
pInfo Pointer to CAMStateInfo structure.

Return Values

A return value of 0 indicates success and any other value indicates the type of error that was encountered.

The following error codes can be returned:

CAMERA_ERROR_INVALID_HANDLE hCam handle is invalid.
CAMERA_ERROR_INVALID_ARG One or more of the arguments is invalid.
CAMERA_ERROR_UNIINITIALIZED The camera driver is either not initialized or it is not open.
CAMERA_ERROR_NOT_SUPPORTED CAMGetStateInfo does not support querying this state.
CAMERA_ERROR_UNKNOWN Camera streaming device failed to respond.
CAMERA_ERROR_NONE No error.

Description

Calling this function will populate the CAMStateInfo structure for the desired camera state. CAMStateInfo encapsulates some ancillary information for camera states like their resolution and their maximum and minimum possible values.

CAMGetStateInfo does not support all the camera states. The table below shows which ones are supported.

CAMERA_DEVICE_POWER_MODE Unsupported
CAMERA_AUTO_EXPOSURE_MODE Supported
CAMERA_AUTO_EXPOSURE_TIME_ABSOLUTE Supported
CAMERA_BRIGHTNESS Supported
CAMERA_CONTRAST Supported
CAMERA_GAIN Supported
CAMERA_POWER_LINE_FREQUENCY Supported
CAMERA_HUE Supported
CAMERA_SATURATION Supported
CAMERA_SHARPNESS Supported
CAMERA_GAMMA Supported
CAMERA_DIGITAL_MULTIPLIER_STEP Unsupported
CAMERA_DIGITAL_MULTIPLIER_LIMIT Unsupported
CAMERA_WHITE_BALANCE_COMPONENT Supported
CAMERA_WHITE_BALANCE_COMPONENT_AUTO Supported
CAMERA_DRC_CONNECTION_STATE Unsupported
CAMERA_GENERATE_KEY_FRAME Supported

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also

CAM_STATE
CAMStateInfo
CAMHandle
CAMInit
CAMSetState
CAMGetState

Revision History

2013/05/08 Automated cleanup pass.
2012/08/02 Cleanup Pass.
2012/04/03 Initial version.


CONFIDENTIAL