Stay organized with collections
Save and categorize content based on your preferences.
ImageWriter.OnImageReleasedListener
public
static
interface
ImageWriter.OnImageReleasedListener
android.media.ImageWriter.OnImageReleasedListener
|
ImageWriter callback interface, used to to asynchronously notify the
application of various ImageWriter events.
Summary
Public methods |
abstract
void
|
onImageReleased(ImageWriter writer)
Callback that is called when an input Image is released back to
ImageWriter after the data consumption.
|
Public methods
public abstract void onImageReleased (ImageWriter writer)
Callback that is called when an input Image is released back to
ImageWriter after the data consumption.
The client can use this callback to be notified that an input Image
has been consumed and released by the downstream consumer. More
specifically, this callback will be fired for below cases:
The application dequeues an input Image via the
dequeueInputImage()
method,
uses it, and then queues it back to this ImageWriter via the
queueInputImage()
method. After
the downstream consumer uses and releases this image to this
ImageWriter, this callback will be fired. This image will be
available to be dequeued after this callback.
The application obtains an Image from some other component (e.g.
an ImageReader
), uses it, and then queues it to this
ImageWriter via queueInputImage()
.
After the downstream consumer uses and releases this image to this
ImageWriter, this callback will be fired.
Parameters |
writer |
ImageWriter : the ImageWriter the callback is associated with. |
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 2025-02-10 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 2025-02-10 UTC."],[],[],null,["# ImageWriter.OnImageReleasedListener\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nImageWriter.OnImageReleasedListener\n===================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/ImageWriter.OnImageReleasedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nImageWriter.OnImageReleasedListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------|\n| android.media.ImageWriter.OnImageReleasedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nImageWriter callback interface, used to to asynchronously notify the\napplication of various ImageWriter events.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onImageReleased](/reference/android/media/ImageWriter.OnImageReleasedListener#onImageReleased(android.media.ImageWriter))`(`[ImageWriter](/reference/android/media/ImageWriter)` writer) ` \u003cbr /\u003e Callback that is called when an input Image is released back to ImageWriter after the data consumption. |\n\nPublic methods\n--------------\n\n### onImageReleased\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onImageReleased (ImageWriter writer)\n```\n\n\u003cbr /\u003e\n\n\nCallback that is called when an input Image is released back to\nImageWriter after the data consumption.\n\n\nThe client can use this callback to be notified that an input Image\nhas been consumed and released by the downstream consumer. More\nspecifically, this callback will be fired for below cases:\n- The application dequeues an input Image via the [dequeueInputImage()](/reference/android/media/ImageWriter#dequeueInputImage()) method, uses it, and then queues it back to this ImageWriter via the [queueInputImage()](/reference/android/media/ImageWriter#queueInputImage(android.media.Image)) method. After the downstream consumer uses and releases this image to this ImageWriter, this callback will be fired. This image will be available to be dequeued after this callback.\n- The application obtains an Image from some other component (e.g. an [ImageReader](/reference/android/media/ImageReader)), uses it, and then queues it to this ImageWriter via [queueInputImage()](/reference/android/media/ImageWriter#queueInputImage(android.media.Image)). After the downstream consumer uses and releases this image to this ImageWriter, this callback will be fired.\n\n| Parameters ||\n|----------|------------------------------------------------------------------------|\n| `writer` | `ImageWriter`: the ImageWriter the callback is associated with. \u003cbr /\u003e |\n\n**See also:**\n\n- [ImageWriter](/reference/android/media/ImageWriter)\n- [Image](/reference/android/media/Image)"]]