Class ImageReaderNatives


public final class ImageReaderNatives extends Object
Native methods for ImageReader JNI registration.

Native method signatures are derived from

 API 33 (T, Android 13)

 API 31/32 (S, S_V2, Android 12)

 API 30 (R, Android 11)

 API 29 (Q, Android 10)
  • Field Details

    • mNativeContext

      public long mNativeContext

      public static final int ACQUIRE_SUCCESS
      Returned by nativeImageSetup when acquiring the image was successful.
      See Also:

      public static final int ACQUIRE_NO_BUFS
      Returned by nativeImageSetup when we couldn't acquire the buffer, because there were no buffers available to acquire.
      See Also:

      public static final int ACQUIRE_MAX_IMAGES
      Returned by nativeImageSetup when we couldn't acquire the buffer because the consumer has already acquired maxImages and cannot acquire more than that.
      See Also:
  • Constructor Details

    • ImageReaderNatives

      public ImageReaderNatives()
  • Method Details

    • postEventFromNative

      public static void postEventFromNative(Object o)
    • nativeInit

      public void nativeInit(Object weakSelf, int w, int h, int fmt, int maxImgs, long consumerUsage)
    • nativeClose

      public void nativeClose()
    • nativeReleaseImage

      public void nativeReleaseImage(Image i)
    • nativeGetSurface

      public Surface nativeGetSurface()
    • nativeDetachImage

      public int nativeDetachImage(Image i)
    • nativeDiscardFreeBuffers

      public void nativeDiscardFreeBuffers()
    • nativeImageSetup

      public int nativeImageSetup(Image i)
      A return code ACQUIRE_*
      See Also:
    • nativeClassInit

      public static void nativeClassInit()
      We use a class initializer to allow the native code to cache some field offsets.