|optional application context. More...|
optional application context.
This callback is called when an old AHardwareBuffer is about to be removed from the image reader.
Note that registering this callback is optional unless the user holds on extra reference to AHardwareBuffer returned from AImage_getHardwareBuffer by calling AHardwareBuffer_acquire or creating external graphic objects, such as EglImage, from it.
If the callback is registered, the AImageReader will hold on the last of its references to the AHardwareBuffer until this callback returns. User can use the callback to get notified that it becomes the last owner of the buffer. It is up to the user to decide to either 1) immediately release all of its references to the buffer; or 2) keep using the buffer and release it in future. Note that, if option 2 if used, user of this API is responsible to deallocate the buffer properly by calling AHardwareBuffer_release.
The documentation for this struct was generated from the following file: