sensor_get_screen_buffer()

Retrieve screen buffer associated with a sensor buffer

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_get_screen_buffer(sensor_handle_t handle,
                                        sensor_buffer_t *sensor_buffer,
                                        screen_buffer_t *screen_buffer)

Arguments:

handle
The handle that's returned from calling sensor_open().
sensor_buffer
The buffer with the sensor data.
screen_buffer
On success, it is set to the screen buffer.

Library:

libsensor

Description:

After having called sensor_start() to start streaming on a sensor of type SENSOR_TYPE_ANY_CAMERA, call this function to retrieve the screen buffer associated with a given sensor buffer. The screen buffer is useful to perform zero-copy of buffers using OpenGL.

Returns:

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