Updated: October 28, 2024 |
Start preview (the viewfinder) with the desired configuration
#include <camera/external_camera_api.h>
typedef int(* start_preview_func_t)(void *handle, camera_preview_params_t *params, camera_buffer_list_t *buflist);
This function is called to start preview (the viewfinder). The 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.
Some cameras need to know the details of all buffers that will be used prior to starting the preview. For this reason, you can provide a complete list of buffers in buflist when starting preview.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.