diff options
author | Lajos Molnar <lajos@google.com> | 2014-07-10 19:26:36 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-08-06 20:00:10 -0700 |
commit | 8d563a20776b476df77f2a4f3de1feebcf7c255f (patch) | |
tree | 2ba67cad293f838b24dbaffc771fe6bfdf522b0e | |
parent | 8f333f19222ac9415152e31f10e0df2b571b0b77 (diff) | |
download | frameworks_base-8d563a20776b476df77f2a4f3de1feebcf7c255f.zip frameworks_base-8d563a20776b476df77f2a4f3de1feebcf7c255f.tar.gz frameworks_base-8d563a20776b476df77f2a4f3de1feebcf7c255f.tar.bz2 |
ImageReader: fix documentation, relax some guarantees
MediaCodec does not guarantee any of this.
Change-Id: Id73c917baad9ca72de87b98c16374505c8028e86
-rw-r--r-- | media/java/android/media/ImageReader.java | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/media/java/android/media/ImageReader.java b/media/java/android/media/ImageReader.java index 6e1b80a..b786f94 100644 --- a/media/java/android/media/ImageReader.java +++ b/media/java/android/media/ImageReader.java @@ -77,9 +77,9 @@ public class ImageReader implements AutoCloseable { * data.</p> * * @param width - * The width in pixels of the Images that this reader will produce. + * The default width in pixels of the Images that this reader will produce. * @param height - * The height in pixels of the Images that this reader will produce. + * The default height in pixels of the Images that this reader will produce. * @param format * The format of the Image that this reader will produce. This * must be one of the {@link android.graphics.ImageFormat} or @@ -130,39 +130,43 @@ public class ImageReader implements AutoCloseable { } /** - * The width of each {@link Image}, in pixels. + * The default width of {@link Image Images}, in pixels. * - * <p>ImageReader guarantees that all Images acquired from ImageReader (for example, with - * {@link #acquireNextImage}) will have the same dimensions as specified in - * {@link #newInstance}.</p> + * <p>The width may be overridden by the producer sending buffers to this + * ImageReader's Surface. If so, the actual width of the images can be + * found using {@link Image#getWidth}.</p> * - * @return the width of an Image + * @return the expected width of an Image */ public int getWidth() { return mWidth; } /** - * The height of each {@link Image}, in pixels. + * The default height of {@link Image Images}, in pixels. * - * <p>ImageReader guarantees that all Images acquired from ImageReader (for example, with - * {@link #acquireNextImage}) will have the same dimensions as specified in - * {@link #newInstance}.</p> + * <p>The height may be overridden by the producer sending buffers to this + * ImageReader's Surface. If so, the actual height of the images can be + * found using {@link Image#getHeight}.</p> * - * @return the height of an Image + * @return the expected height of an Image */ public int getHeight() { return mHeight; } /** - * The {@link ImageFormat image format} of each Image. + * The default {@link ImageFormat image format} of {@link Image Images}. * - * <p>ImageReader guarantees that all {@link Image Images} acquired from ImageReader - * (for example, with {@link #acquireNextImage}) will have the same format as specified in - * {@link #newInstance}.</p> + * <p>Some color formats may be overridden by the producer sending buffers to + * this ImageReader's Surface if the default color format allows. ImageReader + * guarantees that all {@link Image Images} acquired from ImageReader + * (for example, with {@link #acquireNextImage}) will have a "compatible" + * format to what was specified in {@link #newInstance}. + * As of now, each format is only compatible to itself. + * The actual format of the images can be found using {@link Image#getFormat}.</p> * - * @return the format of an Image + * @return the expected format of an Image * * @see ImageFormat */ |