AImageReader_ImageListener

Summary

Public attributes

context
void *
Optional application context passed as the first parameter of the callback.
onImageAvailable
This callback is called when there is a new image available in the image reader's queue.

Public attributes

context

Declared in media/NdkImageReader.h
void * AImageReader_ImageListener::context

Optional application context passed as the first parameter of the callback.

onImageAvailable

Declared in media/NdkImageReader.h
AImageReader_ImageCallback AImageReader_ImageListener::onImageAvailable

This callback is called when there is a new image available in the image reader's queue.

The callback happens on one dedicated thread per AImageReader instance. It is okay to use AImageReader_* and AImage_* methods within the callback. Note that it is possible that calling AImageReader_acquireNextImage or AImageReader_acquireLatestImage returns AMEDIA_IMGREADER_NO_BUFFER_AVAILABLE within this callback. For example, when there are multiple images and callbacks queued, if application called AImageReader_acquireLatestImage, some images will be returned to system before their corresponding callback is executed.