Skip to main content
Version: 21 Aug 2024

MediaNativeBindings

NameSpace: Media

Public Methods

MediaStatus AImageReader_acquireLatestImage

public MediaStatus AImageReader_acquireLatestImage(
AImageReader reader,
out AImage image
)

Parameters

TypeNameDescription
AImageReaderreader
out AImageimage

MediaStatus AImageReader_acquireNextImage

public MediaStatus AImageReader_acquireNextImage(
AImageReader reader,
out AImage image
)

Parameters

TypeNameDescription
AImageReaderreader
out AImageimage

void AImageReader_delete

public void AImageReader_delete(
AImageReader reader
)

Parameters

TypeNameDescription
AImageReaderreader

MediaStatus AImageReader_getFormat

public MediaStatus AImageReader_getFormat(
AImageReader reader,
out MediaFormat format
)

Parameters

TypeNameDescription
AImageReaderreader
out MediaFormatformat

MediaStatus AImageReader_getHeight

public MediaStatus AImageReader_getHeight(
AImageReader reader,
out int height
)

Parameters

TypeNameDescription
AImageReaderreader
out intheight

MediaStatus AImageReader_getMaxImages

public MediaStatus AImageReader_getMaxImages(
AImageReader reader,
out int maxImages
)

Parameters

TypeNameDescription
AImageReaderreader
out intmaxImages

MediaStatus AImageReader_getWidth

public MediaStatus AImageReader_getWidth(
AImageReader reader,
out int width
)

Parameters

TypeNameDescription
AImageReaderreader
out intwidth

MediaStatus AImageReader_getWindow

public MediaStatus AImageReader_getWindow(
AImageReader reader,
out ANativeWindow window
)

Parameters

TypeNameDescription
AImageReaderreader
out ANativeWindowwindow

MediaStatus AImageReader_new

public MediaStatus AImageReader_new(
int width,
int height,
MediaFormat format,
int maxImages,
out AImageReader reader
)

Parameters

TypeNameDescription
intwidth
intheight
MediaFormatformat
intmaxImages
out AImageReaderreader

MediaStatus AImageReader_newWithUsage

public MediaStatus AImageReader_newWithUsage(
int width,
int height,
MediaFormat format,
AHardwareBuffer.Usage usage,
int maxImages,
out AImageReader reader
)

Parameters

TypeNameDescription
intwidth
intheight
MediaFormatformat
AHardwareBuffer.Usageusage
intmaxImages
out AImageReaderreader

MediaStatus AImageReader_setImageListener

public MediaStatus AImageReader_setImageListener(
AImageReader reader,
ref AImageReader.ImageListener callback
)

Parameters

TypeNameDescription
AImageReaderreader
ref AImageReader.ImageListenercallback

void AImage_delete

public void AImage_delete(
AImage image
)

Parameters

TypeNameDescription
AImageimage

MediaStatus AImage_getCropRect

public MediaStatus AImage_getCropRect(
AImage image,
out ARect cropRect
)

Parameters

TypeNameDescription
AImageimage
out ARectcropRect

MediaStatus AImage_getFormat

public MediaStatus AImage_getFormat(
AImage image,
out MediaFormat format
)

Parameters

TypeNameDescription
AImageimage
out MediaFormatformat

MediaStatus AImage_getHardwareBuffer

public MediaStatus AImage_getHardwareBuffer(
AImage image,
out AHardwareBuffer buffer
)

Parameters

TypeNameDescription
AImageimage
out AHardwareBufferbuffer

MediaStatus AImage_getHeight

public MediaStatus AImage_getHeight(
AImage image,
out int height
)

Parameters

TypeNameDescription
AImageimage
out intheight

MediaStatus AImage_getNumberOfPlanes

public MediaStatus AImage_getNumberOfPlanes(
AImage image,
out int numPlanes
)

Parameters

TypeNameDescription
AImageimage
out intnumPlanes

unsafe MediaStatus AImage_getPlaneData

public unsafe MediaStatus AImage_getPlaneData(
AImage image,
int planeIdx,
out byte * data,
out int dataLength
)

Parameters

TypeNameDescription
AImageimage
intplaneIdx
out byte *data
out intdataLength

MediaStatus AImage_getPlanePixelStride

public MediaStatus AImage_getPlanePixelStride(
AImage image,
int planeIdx,
out int pixelStride
)

Parameters

TypeNameDescription
AImageimage
intplaneIdx
out intpixelStride

MediaStatus AImage_getPlaneRowStride

public MediaStatus AImage_getPlaneRowStride(
AImage image,
int planeIdx,
out int rowStride
)

Parameters

TypeNameDescription
AImageimage
intplaneIdx
out introwStride

MediaStatus AImage_getTimestamp

public MediaStatus AImage_getTimestamp(
AImage image,
out long timestampNs
)

Parameters

TypeNameDescription
AImageimage
out longtimestampNs

MediaStatus AImage_getWidth

public MediaStatus AImage_getWidth(
AImage image,
out int width
)

Parameters

TypeNameDescription
AImageimage
out intwidth