Stay organized with collections
Save and categorize content based on your preferences.
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[],null,["# AImageReader_ImageListener Struct Reference\n\nAImageReader_ImageListener\n==========================\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [context](#struct_a_image_reader___image_listener_1aab8ce50fde36aa13d22819fe327666a0) | `void *` Optional application context passed as the first parameter of the callback. |\n| [onImageAvailable](#struct_a_image_reader___image_listener_1af936340b8310f9afd64b3d149dc98810) | [AImageReader_ImageCallback](/ndk/reference/group/media#group___media_1gafb845f7a11bf6b4b64009f354b241264) This callback is called when there is a new image available in the image reader's queue. |\n\nPublic attributes\n-----------------\n\n### context\n\nDeclared in `media/NdkImageReader.h` \n\n```scdoc\nvoid * AImageReader_ImageListener::context\n``` \nOptional application context passed as the first parameter of the callback. \n\n### onImageAvailable\n\nDeclared in `media/NdkImageReader.h` \n\n```scdoc\nAImageReader_ImageCallback AImageReader_ImageListener::onImageAvailable\n``` \nThis callback is called when there is a new image available in the image reader's queue.\n\nThe callback happens on one dedicated thread per [AImageReader](/ndk/reference/group/media#group___media_1gaf14475eb37e14fc67030462d88ab1d28) instance. It is okay to use AImageReader_\\* and AImage_\\* methods within the callback. Note that it is possible that calling [AImageReader_acquireNextImage](/ndk/reference/group/media#group___media_1ga3f270ebce75bdecc4744f5a72100e1e6) or [AImageReader_acquireLatestImage](/ndk/reference/group/media#group___media_1ga1b6d5dfa37992c8f3dfb8a1b0d7decbd) returns [AMEDIA_IMGREADER_NO_BUFFER_AVAILABLE](/ndk/reference/group/media#group___media_1gga009a49041fe39f7bdc6d8b5cddbe760ca62da64570ae5163a55c88927f8c1f432) within this callback. For example, when there are multiple images and callbacks queued, if application called [AImageReader_acquireLatestImage](/ndk/reference/group/media#group___media_1ga1b6d5dfa37992c8f3dfb8a1b0d7decbd), some images will be returned to system before their corresponding callback is executed."]]