From 6bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 5 Sep 2013 12:22:00 -0700 Subject: camera2: Add capture sequences and capture failures - CaptureResult#getRequest is used to tie a result to a request (for convenience) - Add new CaptureFailure class to describe capture failure - Results/frame numbers also return frame numbers, sequence ids - Captures now all return the sequence id - A sequence id onComplete is available in the CaptureListener Bug: 10360518 Change-Id: I9ebaa45698c718a1185b5ae920b7975925fe2f60 --- api/current.txt | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'api') diff --git a/api/current.txt b/api/current.txt index 779f0f3..5fc7edd 100644 --- a/api/current.txt +++ b/api/current.txt @@ -10846,16 +10846,16 @@ package android.hardware.camera2 { } public abstract interface CameraDevice implements java.lang.AutoCloseable { - method public abstract void capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; - method public abstract void captureBurst(java.util.List, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; + method public abstract int capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; + method public abstract int captureBurst(java.util.List, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; method public abstract void close(); method public abstract void configureOutputs(java.util.List) throws android.hardware.camera2.CameraAccessException; method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException; method public abstract void flush() throws android.hardware.camera2.CameraAccessException; method public abstract java.lang.String getId(); method public abstract android.hardware.camera2.CameraProperties getProperties() throws android.hardware.camera2.CameraAccessException; - method public abstract void setRepeatingBurst(java.util.List, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; - method public abstract void setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; + method public abstract int setRepeatingBurst(java.util.List, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; + method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException; method public abstract void waitUntilIdle() throws android.hardware.camera2.CameraAccessException; field public static final int TEMPLATE_PREVIEW = 1; // 0x1 @@ -10867,7 +10867,8 @@ package android.hardware.camera2 { public static abstract class CameraDevice.CaptureListener { ctor public CameraDevice.CaptureListener(); method public void onCaptureCompleted(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureResult); - method public void onCaptureFailed(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest); + method public void onCaptureFailed(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureFailure); + method public void onCaptureSequenceCompleted(android.hardware.camera2.CameraDevice, int, int); method public void onCaptureStarted(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest, long); } @@ -11073,6 +11074,16 @@ package android.hardware.camera2 { field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_MAX_CURVE_POINTS; } + public class CaptureFailure { + method public int getFrameNumber(); + method public int getReason(); + method public android.hardware.camera2.CaptureRequest getRequest(); + method public int getSequenceId(); + method public boolean wasImageCaptured(); + field public static final int REASON_ERROR = 0; // 0x0 + field public static final int REASON_FLUSHED = 1; // 0x1 + } + public final class CaptureRequest extends android.hardware.camera2.CameraMetadata implements android.os.Parcelable { method public int describeContents(); method public T get(android.hardware.camera2.CameraMetadata.Key); @@ -11139,6 +11150,9 @@ package android.hardware.camera2 { public final class CaptureResult extends android.hardware.camera2.CameraMetadata { method public T get(android.hardware.camera2.CameraMetadata.Key); + method public int getFrameNumber(); + method public android.hardware.camera2.CaptureRequest getRequest(); + method public int getSequenceId(); field public static final android.hardware.camera2.CameraMetadata.Key BLACK_LEVEL_LOCK; field public static final android.hardware.camera2.CameraMetadata.Key COLOR_CORRECTION_GAINS; field public static final android.hardware.camera2.CameraMetadata.Key COLOR_CORRECTION_TRANSFORM; -- cgit v1.1