diff options
Diffstat (limited to 'android/media/ImageWriter.java')
-rw-r--r-- | android/media/ImageWriter.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/android/media/ImageWriter.java b/android/media/ImageWriter.java index 2b7309f1..8ee27ae5 100644 --- a/android/media/ImageWriter.java +++ b/android/media/ImageWriter.java @@ -371,7 +371,7 @@ public class ImageWriter implements AutoCloseable { Rect crop = image.getCropRect(); nativeQueueInputImage(mNativeContext, image, image.getTimestamp(), crop.left, crop.top, - crop.right, crop.bottom); + crop.right, crop.bottom, image.getTransform()); /** * Only remove and cleanup the Images that are owned by this @@ -557,7 +557,8 @@ public class ImageWriter implements AutoCloseable { // buffer caused leak. Rect crop = image.getCropRect(); nativeAttachAndQueueImage(mNativeContext, image.getNativeContext(), image.getFormat(), - image.getTimestamp(), crop.left, crop.top, crop.right, crop.bottom); + image.getTimestamp(), crop.left, crop.top, crop.right, crop.bottom, + image.getTransform()); } /** @@ -674,6 +675,8 @@ public class ImageWriter implements AutoCloseable { private final long DEFAULT_TIMESTAMP = Long.MIN_VALUE; private long mTimestamp = DEFAULT_TIMESTAMP; + private int mTransform = 0; //Default no transform + public WriterSurfaceImage(ImageWriter writer) { mOwner = writer; } @@ -711,6 +714,13 @@ public class ImageWriter implements AutoCloseable { } @Override + public int getTransform() { + throwISEIfImageIsInvalid(); + + return mTransform; + } + + @Override public long getTimestamp() { throwISEIfImageIsInvalid(); @@ -856,11 +866,11 @@ public class ImageWriter implements AutoCloseable { private synchronized native void nativeDequeueInputImage(long nativeCtx, Image wi); private synchronized native void nativeQueueInputImage(long nativeCtx, Image image, - long timestampNs, int left, int top, int right, int bottom); + long timestampNs, int left, int top, int right, int bottom, int transform); private synchronized native int nativeAttachAndQueueImage(long nativeCtx, long imageNativeBuffer, int imageFormat, long timestampNs, int left, - int top, int right, int bottom); + int top, int right, int bottom, int transform); private synchronized native void cancelImage(long nativeCtx, Image image); |