CAMGetState

Syntax

#include <cafe/camera/camera.h>

int CAMGetState(CAMHandle hCam, CAM_STATE state, int *pVal);

Parameters

hCam Handle returned from CAMInit.
state Camera state of the type CAM_STATE.
pVal Pointer to the returned value of the camera state.

Return Values

A value of zero 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 CAMGetState 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 get the value of a camera state. CAMGetState does not support all the camera states. The table below shows which ones are supported. Each state is explained in CAM_STATE.

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 Supported; 1: DRC Attached, 0: DRC Detached
CAMERA_GENERATE_KEY_FRAME Unsupported

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
CAMHandle
CAMInit
CAMSetState
CAMGetStateInfo

Revision History

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


CONFIDENTIAL