Developer

API Reference

ICAMERA_Preview()

Brew Release
Brew MP 1.0.2
See Also
ICAMERA_Start() ICAMERA_Stop() ICAMERA_Pause() ICAMERA_Resume() ICAMERA_GetFrame() ICAMERA_SetDisplaySize() ICAMERA_SetSize()
Description
This function starts the camera operation in preview mode, which causes ICamera to start sending raw frames to the client.
Parameters
  • pICamera
    []:
    Pointer to ICamera Interface.
Interface
ICAMERA
Prototype
    int ICAMERA_Preview(ICamera * pICamera);
Return
SUCCESS: Asynchronous command accepted. Check callback for result and completion. EFAILED: General failure EBADPARM: Bad parameter is passed ENOMEMORY: Not enough memory EBADSTATE: Cannot execute operation because the camera is in the wrong mode.
Side Effect
None.
Comment
This function is always asynchronous. This function should be called when the camera is in CAM_MODE_READY. You need to set the frame display size before calling this function. All the events that originate due to this API and due to the following APIs will be reported via the user-specified callback:
  • ICAMERA_Stop()
  • ICAMERA_Pause()
  • ICAMERA_Resume()
  • CAM_STATUS_START callback happens once the preview begins.
  • CAM_STATUS_FRAME callbacks happen only when CAM_PARM_LCD_DIRECT_ACCESS is not enabled.
  • CAM_STATUS_DONE callback occurs when preview is stopped.
  • CAM_STATUS_ABORT callback occurs when preview is aborted.
In the callback, AEECameraNotify,
    nCmd = CAM_CMD_START
    nSubCmd = CAM_MODE_PREVIEW.
  • Follow