get_buffer_requirements_func_t

Updated: April 19, 2023

Identify the number of buffers and the size of each buffer that are required by the sensor

Synopsis:

#include <sensor/external_sensor_api.h>
typedef int(* get_buffer_requirements_func_t)(void *handle,
            uint32_t *numBuffers,
            uint32_t *bufSize);

Arguments:

handle
The handle that's returned from calling the function referred to by open_external_sensor_func_t.
numBuffers
Must be set to the minimum number of buffers required.
bufSize
Must be set to the size in bytes required for the buffers.

Library:

libsensor

Description:

The details of buffer are required based on the current configuration and are also required to allocate buffers prior to streaming being started.

Returns:

SENSOR_EOK when the function successfully completes; otherwise another sensor_error_t value that provides the reason that the call failed.