sensor_get_screen_buffer()

Retrieve the 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
A pointer to the buffer with the sensor data.
screen_buffer
On success, the memory pointed to by this argument contains the Screen buffer.

Library:

libsensor

Description:

After having called sensor_start() to start streaming on a sensor of type SENSOR_TYPE_ANY_CAMERA, call sensor_get_screen_buffer() 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.