Updated: October 28, 2024 |
Retrieve the next available preview frame
#include <camera/external_camera_api.h>
typedef int(* get_preview_frame_func_t)(void *handle, void *bufferIn, camera_preview_frame_flags_t *flags, void **bufferOut, int64_t *timestamp, void *metaOut, uint64_t *metaSize);
This is the main interface between the preview thread and the camera. The Sensor service runs the preview thread that repeatedly calls this function to retrieve the next available frame from the camera. This operation both enqueues empty buffers for use by the camera (i.e., to pipeline) and expects to receive filled buffers from the camera. If the camera's hardware requires pipelining, this function doesn't return any new frames until enough empty buffers have been supplied.
This function call is blocking when the camera is fully pipelined.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.