setNativeBuffers abstract method

void setNativeBuffers(
  1. int textureId,
  2. int enabled
)

Attaches the native buffer to frames (CameraFrame.nativeBuffer) — vision-camera's frame.getNativeBuffer(), for handing the camera's own buffer to GPU / ML code without a copy. One buffer is held at a time, so the camera pool never starves. Throws NATIVE_BUFFER_UNSUPPORTED: below Android 9. enabled: 1 = on, 0 = off (releases a held buffer).

Implementation

void setNativeBuffers(int textureId, int enabled);