Package org.robolectric.shadows
Class ShadowNativeImageReader
java.lang.Object
org.robolectric.shadows.ShadowNativeImageReader
@Implements(value=android.media.ImageReader.class,
minSdk=28,
isInAndroidSdk=false,
shadowPicker=Picker.class,
callNativeMethodsByDefault=true)
public class ShadowNativeImageReader
extends Object
Shadow for
ImageReader
that is backed by native code-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
TheImageReader
static initializer invokes its own native methods in static initializer.protected Surface
This is a Java shim to supportImageReader.setOnImageAvailableListener(OnImageAvailableListener, Handler)
} until it is supported in native libhostgraphics.protected static void
We use a class initializer to allow the native code to cache some field offsets.protected void
protected int
protected void
protected Surface
protected int
protected int
nativeImageSetup
(Image i, boolean legacyValidateImageFormat) protected int
protected void
nativeInit
(Object weakSelf, int w, int h, int fmt, int maxImgs, long consumerUsage) protected void
nativeInit
(Object weakSelf, int w, int h, int maxImgs, long consumerUsage, int hardwareBufferFormat, int dataSpace) protected void
-
Constructor Details
-
ShadowNativeImageReader
public ShadowNativeImageReader()
-
-
Method Details
-
__staticInitializer__
TheImageReader
static initializer invokes its own native methods in static initializer. This has to be deferred starting in Android V. -
nativeInit
@Implementation(maxSdk=32) protected void nativeInit(Object weakSelf, int w, int h, int fmt, int maxImgs, long consumerUsage) -
nativeInit
@Implementation(minSdk=33, maxSdk=34) protected void nativeInit(Object weakSelf, int w, int h, int maxImgs, long consumerUsage, int hardwareBufferFormat, int dataSpace) -
nativeClose
-
nativeReleaseImage
-
nativeGetSurface
-
nativeDetachImage
-
nativeDiscardFreeBuffers
-
getSurface
This is a Java shim to supportImageReader.setOnImageAvailableListener(OnImageAvailableListener, Handler)
} until it is supported in native libhostgraphics. -
nativeImageSetup
- Returns:
- A return code
ACQUIRE_*
-
nativeImageSetup
@Implementation(minSdk=33, maxSdk=33) protected int nativeImageSetup(Image i, boolean legacyValidateImageFormat) -
nativeImageSetupPostT
@Implementation(minSdk=34, maxSdk=34, methodName="nativeImageSetup") protected int nativeImageSetupPostT(Image i) -
nativeClassInit
We use a class initializer to allow the native code to cache some field offsets.
-