get_buffer_requirements()

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

Synopsis:

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

Arguments:

handle
The handle that's returned from calling the open_external_sensor() function.
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.