WVR_GetCameraFrameBuffer

WVR_EXPORT bool WVR_GetCameraFrameBuffer(uint8_t * pframebuffer, uint32_t frameBufferSize)

Function to get raw image relate to camera.

This API will copy the raw image from camera. The buffer size should be got from the return size from WVR_StartCamera API. This API’s performance will have worse performance due to memory copy. This API must be called by main thread.

Parameters
  • uint8_t* -

    memory that user would like to copy to

  • uint32_t -

    the buffer size that pframebuffer allocated

Return Value
  • true -

    update pframebuffer success,

  • false -

    update pframebuffer fail*

How to use

Here is an example for the function:

#include <wvr/wvr_camera.h>

// You should allocate the size form WVR_CameraInfo that is filled by WVR_StartCamera
uint8_t *framebuffer = (uint8_t *)malloc(size);
bool ret = false;
ret = WVR_GetCameraFrameBuffer(*framebuffer, size);