Updated: October 28, 2024 |
Retrieve the Screen buffer associated with a sensor buffer
#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)
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.
SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.