From b6eb52ffc51cec78c3adc2e5b25c4c3214344983 Mon Sep 17 00:00:00 2001
From: Eino-Ville Talvala
When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}, - * this metadata will list the supported high speed video size and fps range - * configurations. All the sizes listed in this configuration will be a subset - * of the sizes reported by StreamConfigurationMap#getOutputSizes for processed + *
When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}, this metadata + * will list the supported high speed video size and fps range configurations. All the sizes + * listed in this configuration will be a subset of the sizes reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } for processed * non-stalling formats.
*For the high speed video use case, where the application will set
* {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must
@@ -1116,11 +1115,12 @@ public final class CameraCharacteristics extends CameraMetadata Range of valid values: For processed (and stalling) format streams, >= 1.
*
*
In particular, a RAW
format is typically one of:
RAW
LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} ==
LEGACY)
* never support raw streams.
For full guarantees, query StreamConfigurationMap#getOutputStallDuration with - * a processed format -- it will return 0 for a non-stalling stream.
+ *For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a + * processed format -- it will return 0 for a non-stalling stream.
*LEGACY devices will support at least 2 processing/non-stalling streams.
*Range of valid values:
>= 3
@@ -1212,10 +1211,11 @@ public final class CameraCharacteristics extends CameraMetadata
A processed and stalling format is defined as any non-RAW format with a stallDurations > 0.
- * Typically only the JPEG
format (ImageFormat#JPEG) is a stalling format.
For full guarantees, query StreamConfigurationMap#getOutputStallDuration with - * a processed format -- it will return a non-0 value for a stalling stream.
+ *A processed and stalling format is defined as any non-RAW format with a stallDurations + * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a + * stalling format.
+ *For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a + * processed format -- it will return a non-0 value for a stalling stream.
*LEGACY devices will support up to 1 processing/stalling stream.
*Range of valid values:
>= 1
@@ -1232,10 +1232,9 @@ public final class CameraCharacteristics extends CameraMetadataWhen set to 0, it means no input stream is supported.
- *The image format for a input stream can be any supported - * format returned by StreamConfigurationMap#getInputFormats. When using an - * input stream, there must be at least one output stream - * configured to to receive the reprocessed images.
+ *The image format for a input stream can be any supported format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }. When using an + * input stream, there must be at least one output stream configured to to receive the + * reprocessed images.
*When an input stream and some output streams are used in a reprocessing request, * only the input buffer will be used to produce these output stream buffers, and a * new sensor image will not be captured.
@@ -1352,7 +1351,7 @@ public final class CameraCharacteristics extends CameraMetadataAttempting to set a key into a CaptureRequest that is not * listed here will result in an invalid request and will be rejected * by the camera device.
@@ -1370,7 +1369,7 @@ public final class CameraCharacteristics extends CameraMetadataAttempting to get a key from a CaptureResult that is not
* listed here will always return a null
value. Getting a key from
* a CaptureResult that is listed here will generally never return a null
@@ -1396,7 +1395,7 @@ public final class CameraCharacteristics extends CameraMetadata
This entry follows the same rules as
* android.request.availableResultKeys (except that it applies for
* CameraCharacteristics instead of CaptureResult). See above for more
@@ -1535,34 +1534,31 @@ public final class CameraCharacteristics extends CameraMetadata PRIVATE refers to a device-internal format that is not directly application-visible.
- * A PRIVATE input surface can be acquired by
- * ImageReader.newOpaqueInstance(width, height, maxImages).
- * For a OPAQUE_REPROCESSING-capable camera device, using the PRIVATE format
- * as either input or output will never hurt maximum frame rate (i.e.
- * StreamConfigurationMap#getOutputStallDuration(format, size) is always 0),
- * where format is ImageFormat#PRIVATE. PRIVATE refers to a device-internal format that is not directly application-visible. A
+ * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newOpaqueInstance }. For a OPAQUE_REPROCESSING-capable camera device, using the PRIVATE format as either input
+ * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0), Attempting to configure an input stream with output streams not
* listed as available in this map is not valid. Optional - This value may be {@code null} on some devices. (Keep in sync with
- * StreamConfigurationMap#getOutputMinFrameDuration)
- *
* PRIVATE (ImageFormat#PRIVATE)
- * JPEG
+ * {@link android.graphics.ImageFormat#PRIVATE }
+ * {@link android.graphics.ImageFormat#JPEG }
* OPAQUE_REPROCESSING
*
- *
* PRIVATE
- * YUV_420_888
+ * {@link android.graphics.ImageFormat#PRIVATE }
+ * {@link android.graphics.ImageFormat#YUV_420_888 }
* OPAQUE_REPROCESSING
*
- *
* YUV_420_888
- * JPEG
+ * {@link android.graphics.ImageFormat#YUV_420_888 }
+ * {@link android.graphics.ImageFormat#JPEG }
* YUV_REPROCESSING
*
- *
*
*
- * YUV_420_888
- * YUV_420_888
+ * {@link android.graphics.ImageFormat#YUV_420_888 }
+ * {@link android.graphics.ImageFormat#YUV_420_888 }
* YUV_REPROCESSING
*
Units: (format, width, height, ns) x n
*This key is available on all devices.
* @@ -1734,12 +1730,13 @@ public final class CameraCharacteristics extends CameraMetadataThe following formats may always have a stall duration:
*The following formats will never have a stall duration:
*All other formats may or may not have an allowed stall duration on
* a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
@@ -1747,7 +1744,7 @@ public final class CameraCharacteristics extends CameraMetadata
(Keep up to date with - * StreamConfigurationMap#getOutputStallDuration(int, Size) )
+ * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } ) *Units: (format, width, height, ns) x n
*This key is available on all devices.
* @@ -1786,57 +1783,57 @@ public final class CameraCharacteristics extends CameraMetadataRefer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional - * mandatory stream configurations on a per-capability basis.
+ *Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory + * stream configurations on a per-capability basis.
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL @@ -1973,8 +1970,8 @@ public final class CameraCharacteristics extends CameraMetadataRefer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum - * frame duration values.
+ *Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } + * for the minimum frame duration values.
*Units: Nanoseconds
*Range of valid values:
* For FULL capability devices
@@ -2707,8 +2704,7 @@ public final class CameraCharacteristics extends CameraMetadata
(Keep in sync with - * StreamConfigurationMap#getOutputMinFrameDuration)
+ *(Keep in sync with {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration })
*Units: (format, width, height, ns) x n
*Optional - This value may be {@code null} on some devices.
*Limited capability -
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 2d9f61d..ca9439b 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -461,19 +461,17 @@ public abstract class CameraMetadata The camera device supports the Zero Shutter Lag reprocessing use case.
*
{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1
.
{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1
.The camera device can produce depth measurements from its field of view.
*This capability requires the camera device to support the following:
*Generally, depth output operates at a slower frame rate than standard color capture, * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that * should be accounted for (see - * android.hardware.camera2.StreamConfigurationMap#getOutputStallDuration). On a device - * that supports both depth and color-based output, to enable smooth preview, using a - * repeating burst is recommended, where a depth-output target is only included once - * every N frames, where N is the ratio between preview output rate and depth output + * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }). + * On a device that supports both depth and color-based output, to enable smooth preview, + * using a repeating burst is recommended, where a depth-output target is only included + * once every N frames, where N is the ratio between preview output rate and depth output * rate, including depth stall time.
* * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE + * @see CameraCharacteristics#LENS_FACING * @see CameraCharacteristics#LENS_POSE_ROTATION * @see CameraCharacteristics#LENS_POSE_TRANSLATION * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES @@ -711,7 +711,7 @@ public abstract class CameraMetadataTimestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as - * android.os.SystemClock#elapsedRealtimeNanos(), + * {@link android.os.SystemClock#elapsedRealtimeNanos }, * and they can be compared to other timestamps using that base.
* * @see CaptureResult#SENSOR_TIMESTAMP @@ -870,7 +870,7 @@ public abstract class CameraMetadataEvery frame has the requests immediately applied.
*Furthermore for all results,
- * android.sync.frameNumber == CaptureResult#getFrameNumber()
android.sync.frameNumber == {@link android.hardware.camera2.CaptureResult#getFrameNumber }
* Changing controls over multiple requests one after another will * produce results that have those controls applied atomically * each frame.
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 9106060..ab6ce91 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -2040,8 +2040,8 @@ public final class CaptureRequest extends CameraMetadataThe necessary information for the application, given the model above, - * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field - * using StreamConfigurationMap#getOutputMinFrameDuration(int, Size). + * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field using + * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }. * These are used to determine the maximum frame rate / minimum frame * duration that is possible for a given stream configuration.
*Specifically, the application can use the following rules to
@@ -2050,21 +2050,19 @@ public final class CaptureRequest extends CameraMetadata If none of the streams in If none of the streams in A repeating request For more details about stalling, see
- * StreamConfigurationMap#getOutputStallDuration(int,Size).
*
- * S
.S
, by
- * looking it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using
- * StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with
- * its respective size/format). Let this set of frame durations be called
- * F
.S
, by looking
+ * it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
+ * (with its respective size/format). Let this set of frame durations be
+ * called F
.R
, the minimum frame duration allowed
* for R
is the maximum out of all values in F
. Let the streams
* used in R
be called S_r
.S_r
have a stall time (listed in
- * StreamConfigurationMap#getOutputStallDuration(int,Size) using its
- * respective size/format), then the frame duration in
- * F
determines the steady state frame rate that the application will
- * get if it uses R
as a repeating request. Let this special kind
- * of request be called Rsimple
.S_r
have a stall time (listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }
+ * using its respective size/format), then the frame duration in F
+ * determines the steady state frame rate that the application will get
+ * if it uses R
as a repeating request. Let this special kind of
+ * request be called Rsimple
.Rsimple
can be occasionally interleaved
* by a single capture of a new request Rstall
(which has at least
* one in-use stream with a non-0 stall time) and if Rstall
has the
@@ -2072,7 +2070,7 @@ public final class CaptureRequest extends CameraMetadataRstall
have already been
* delivered.
This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to * OFF; otherwise the auto-exposure algorithm will override this value.
*Units: Nanoseconds
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 8c8f0dc..3dc8970 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2886,8 +2886,8 @@ public class CaptureResult extends CameraMetadataThe necessary information for the application, given the model above, - * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field - * using StreamConfigurationMap#getOutputMinFrameDuration(int, Size). + * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field using + * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }. * These are used to determine the maximum frame rate / minimum frame * duration that is possible for a given stream configuration.
*Specifically, the application can use the following rules to
@@ -2896,21 +2896,19 @@ public class CaptureResult extends CameraMetadata If none of the streams in If none of the streams in A repeating request For more details about stalling, see
- * StreamConfigurationMap#getOutputStallDuration(int,Size).
*
- * S
.S
, by
- * looking it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using
- * StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with
- * its respective size/format). Let this set of frame durations be called
- * F
.S
, by looking
+ * it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
+ * (with its respective size/format). Let this set of frame durations be
+ * called F
.R
, the minimum frame duration allowed
* for R
is the maximum out of all values in F
. Let the streams
* used in R
be called S_r
.S_r
have a stall time (listed in
- * StreamConfigurationMap#getOutputStallDuration(int,Size) using its
- * respective size/format), then the frame duration in
- * F
determines the steady state frame rate that the application will
- * get if it uses R
as a repeating request. Let this special kind
- * of request be called Rsimple
.S_r
have a stall time (listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }
+ * using its respective size/format), then the frame duration in F
+ * determines the steady state frame rate that the application will get
+ * if it uses R
as a repeating request. Let this special kind of
+ * request be called Rsimple
.Rsimple
can be occasionally interleaved
* by a single capture of a new request Rstall
(which has at least
* one in-use stream with a non-0 stall time) and if Rstall
has the
@@ -2918,7 +2916,7 @@ public class CaptureResult extends CameraMetadataRstall
have already been
* delivered.
This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to * OFF; otherwise the auto-exposure algorithm will override this value.
*Units: Nanoseconds
@@ -2980,11 +2978,10 @@ public class CaptureResult extends CameraMetadataWhen {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} ==
REALTIME,
- * the timestamps measure time in the same timebase as
- * android.os.SystemClock#elapsedRealtimeNanos(), and they can be
- * compared to other timestamps from other subsystems that are using
- * that base.
When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} ==
REALTIME, the
+ * timestamps measure time in the same timebase as {@link android.os.SystemClock#elapsedRealtimeNanos }, and they can
+ * be compared to other timestamps from other subsystems that
+ * are using that base.
Units: Nanoseconds
*Range of valid values:
* > 0
Units: Nanoseconds
*Range of valid values:
* >= 0 and <
- * StreamConfigurationMap#getOutputMinFrameDuration(int, Size).
Optional - This value may be {@code null} on some devices.
*Limited capability - * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the -- cgit v1.1