camera_get_viewfinder_buffers()

Updated: April 19, 2023

Retrieve image buffers from the camera

Synopsis:

#include <camera/camera_api.h>
camera_error_t camera_get_viewfinder_buffers(camera_handle_t handle,
                                             camera_eventkey_t key,
                                             camera_buffer_t *inbuffer,
                                             camera_buffer_t *outbuffer)

Arguments:

handle
The handle returned by a call to the camera_open() function.
key
The camera_eventkey_t value that was returned by a call to the camera_enable_viewfinder_event() function.
inbuffer
A pointer to the input camera_buffer_t struct returned by the camera.
outbuffer
A pointer to the output camera_buffer_t struct returned by the camera.

Library:

libcamapi

Description:

Use this function to retrieve buffers with viewfinder data. Call this function only after receiving a viewfinder event.

Viewfinder events are enabled using camera_enable_viewfinder_event(). Call camera_return_buffer() when you are finished processing a buffer. For more information about event mode, see Using event mode. For more information about when inbuffer and outbuffer are used, see camera_eventmode_t.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.