start_preview_func_t

Start preview (viewfinder) in the mode you want

Synopsis:

#include <camera/external_camera_api.h>
typedef int(* start_preview_func_t)(void *handle,
            camera_preview_params_t *params,
            camera_buffer_list_t *buflist);

Arguments:

handle
The handle that's returned from calling the function open_external_camera_func_t.
params
A set of preview parameters (e.g., resolution, rotation, framerate).
buflist
A complete list of the buffers which will be used for preview.

Library:

libcamapi

Description:

Call this function when preview mode should be started. This function configures the camera to start producing preview frames that are consumed by an upper-layer thread, which repeatedly calls into the blocking function get_preview_frame_func_t.

Note:

Some cameras need to know of all buffers that will be used prior to starting the preview in order to pre-map buffers or due to restrictions in the underlying Aamera API. For this reason, a complete buflist is provided when preview mode starts.

Returns:

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