Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -14205,11 +14205,14 @@ package android.media { public abstract class Image implements java.lang.AutoCloseable { method public abstract void close(); method public android.graphics.Rect getCropRect(); method public abstract int getFormat(); method public abstract int getHeight(); method public abstract android.media.Image.Plane[] getPlanes(); method public abstract long getTimestamp(); method public abstract int getWidth(); method public void setCropRect(android.graphics.Rect); field protected android.graphics.Rect mCropRect; } public static abstract class Image.Plane { media/java/android/media/Image.java +30 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.media; import java.nio.ByteBuffer; import java.lang.AutoCloseable; import android.graphics.Rect; /** * <p>A single complete image buffer to use with a media source such as a * {@link MediaCodec} or a Loading Loading @@ -121,6 +123,34 @@ public abstract class Image implements AutoCloseable { */ public abstract long getTimestamp(); protected Rect mCropRect; /** * Get the crop rectangle associated with this frame. * <p> * The crop rectangle specifies the region of valid pixels in the image, * using coordinates in the largest-resolution plane. */ public Rect getCropRect() { if (mCropRect == null) { return new Rect(0, 0, getWidth(), getHeight()); } else { return new Rect(mCropRect); // return a copy } } /** * Set the crop rectangle associated with this frame. * <p> * The crop rectangle specifies the region of valid pixels in the image, * using coordinates in the largest-resolution plane. */ public void setCropRect(Rect cropRect) { cropRect = new Rect(cropRect); // make a copy cropRect.intersect(0, 0, getWidth(), getHeight()); mCropRect = cropRect; } /** * Get the array of pixel planes for this Image. The number of planes is * determined by the format of the Image. Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -14205,11 +14205,14 @@ package android.media { public abstract class Image implements java.lang.AutoCloseable { method public abstract void close(); method public android.graphics.Rect getCropRect(); method public abstract int getFormat(); method public abstract int getHeight(); method public abstract android.media.Image.Plane[] getPlanes(); method public abstract long getTimestamp(); method public abstract int getWidth(); method public void setCropRect(android.graphics.Rect); field protected android.graphics.Rect mCropRect; } public static abstract class Image.Plane {
media/java/android/media/Image.java +30 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.media; import java.nio.ByteBuffer; import java.lang.AutoCloseable; import android.graphics.Rect; /** * <p>A single complete image buffer to use with a media source such as a * {@link MediaCodec} or a Loading Loading @@ -121,6 +123,34 @@ public abstract class Image implements AutoCloseable { */ public abstract long getTimestamp(); protected Rect mCropRect; /** * Get the crop rectangle associated with this frame. * <p> * The crop rectangle specifies the region of valid pixels in the image, * using coordinates in the largest-resolution plane. */ public Rect getCropRect() { if (mCropRect == null) { return new Rect(0, 0, getWidth(), getHeight()); } else { return new Rect(mCropRect); // return a copy } } /** * Set the crop rectangle associated with this frame. * <p> * The crop rectangle specifies the region of valid pixels in the image, * using coordinates in the largest-resolution plane. */ public void setCropRect(Rect cropRect) { cropRect = new Rect(cropRect); // make a copy cropRect.intersect(0, 0, getWidth(), getHeight()); mCropRect = cropRect; } /** * Get the array of pixel planes for this Image. The number of planes is * determined by the format of the Image. Loading