Package org.robolectric.nativeruntime
Class ImageReaderNatives
java.lang.Object
org.robolectric.nativeruntime.ImageReaderNatives
Native methods for
ImageReader
JNI registration.
Native method signatures are derived from
API 33 (T, Android 13) https://cs.android.com/android/platform/superproject/+/android-13.0.0_r1:frameworks/base/media/java/android/media/ImageReader.java API 31/32 (S, S_V2, Android 12) https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/media/java/android/media/ImageReader.java https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/media/jni/android_media_ImageReader.cpp API 30 (R, Android 11) https://cs.android.com/android/platform/superproject/+/android-11.0.0_r1:frameworks/base/media/java/android/media/ImageReader.java API 29 (Q, Android 10) https://cs.android.com/android/platform/superproject/+/android-10.0.0_r1:frameworks/base/media/java/android/media/ImageReader.java
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Returned by nativeImageSetup when we couldn't acquire the buffer because the consumer has already acquiredmaxImages
and cannot acquire more than that.static final int
Returned by nativeImageSetup when we couldn't acquire the buffer, because there were no buffers available to acquire.static final int
Returned by nativeImageSetup when acquiring the image was successful.long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
We use a class initializer to allow the native code to cache some field offsets.void
int
void
int
void
nativeInit
(Object weakSelf, int w, int h, int fmt, int maxImgs, long consumerUsage) void
static void
-
Field Details
-
mNativeContext
public long mNativeContext -
ACQUIRE_SUCCESS
public static final int ACQUIRE_SUCCESSReturned by nativeImageSetup when acquiring the image was successful.- See Also:
-
ACQUIRE_NO_BUFS
public static final int ACQUIRE_NO_BUFSReturned by nativeImageSetup when we couldn't acquire the buffer, because there were no buffers available to acquire.- See Also:
-
ACQUIRE_MAX_IMAGES
public static final int ACQUIRE_MAX_IMAGESReturned by nativeImageSetup when we couldn't acquire the buffer because the consumer has already acquiredmaxImages
and cannot acquire more than that.- See Also:
-
-
Constructor Details
-
ImageReaderNatives
public ImageReaderNatives()
-
-
Method Details
-
postEventFromNative
-
nativeInit
-
nativeClose
public void nativeClose() -
nativeReleaseImage
-
nativeGetSurface
-
nativeDetachImage
-
nativeDiscardFreeBuffers
public void nativeDiscardFreeBuffers() -
nativeImageSetup
- Returns:
- 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.
-