Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aec59fa0 authored by Igor Murashkin's avatar Igor Murashkin Committed by Android (Google) Code Review
Browse files

Merge "camera2 api: Add CameraMetadata get/set support"

parents 84b2dd89 b519cc52
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -10760,7 +10760,7 @@ package android.hardware.photography {
  }
  public static class CameraMetadata.Key {
    ctor public CameraMetadata.Key(java.lang.String);
    ctor public CameraMetadata.Key(java.lang.String, java.lang.Class<T>);
    method public final boolean equals(java.lang.Object);
    method public final java.lang.String getName();
    method public final int hashCode();
@@ -10812,6 +10812,12 @@ package android.hardware.photography {
    method public int getScore();
  }
  public final class Rational {
    ctor public Rational(int, int);
    method public int getDenominator();
    method public int getNumerator();
  }
  public final class Size {
    method public final int getHeight();
    method public final int getWidth();
+643 −9

File changed.

Preview size limit exceeded, changes collapsed.

+11 −11
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public final class CameraProperties extends CameraMetadata {
     * removable cameras of the same model.
     */
    public static final Key<String> INFO_MODEL =
            new Key<String>("android.info.model");
            new Key<String>("android.info.model", String.class);

    /**
     * A unique identifier for this camera. For removable cameras, every
@@ -49,7 +49,7 @@ public final class CameraProperties extends CameraMetadata {
     * identifier is equal to the the device's id.
     */
    public static final Key<String> INFO_IDENTIFIER =
            new Key<String>("android.info.identifier");
            new Key<String>("android.info.identifier", String.class);

    /**
     * <p>Whether this camera is removable or not.</p>
@@ -59,7 +59,7 @@ public final class CameraProperties extends CameraMetadata {
     * determine if this camera is a match for a camera device seen earlier.</p>
     */
    public static final Key<Boolean> INFO_REMOVABLE =
            new Key<Boolean>("android.info.isRemovable");
            new Key<Boolean>("android.info.isRemovable", Boolean.TYPE);

    /**
     * <p>The hardware operational model of this device. One of the
@@ -100,7 +100,7 @@ public final class CameraProperties extends CameraMetadata {
     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
     */
    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
            new Key<Integer>("android.info.supportedHardwareLevel");
            new Key<Integer>("android.info.supportedHardwareLevel", Integer.TYPE);

    /**
     * <p>The type reported by limited-capability camera devices.</p>
@@ -164,8 +164,8 @@ public final class CameraProperties extends CameraMetadata {
     * {@link android.graphics.ImageFormat#YUV_420_888} are guaranteed to be
     * supported.</p>
     */
    public static final Key<Integer[]> SCALER_AVAILABLE_FORMATS =
            new Key<Integer[]>("android.scaler.availableFormats");
    public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
            new Key<int[]>("android.scaler.availableFormats", int[].class);

    /**
     * <p>The available output sizes for JPEG buffers from this camera
@@ -174,7 +174,7 @@ public final class CameraProperties extends CameraMetadata {
     * when using format {@link android.graphics.ImageFormat#JPEG}.</p>
     */
    public static final Key<Size[]> SCALER_AVAILABLE_JPEG_SIZES =
            new Key<Size[]>("android.scaler.availableJpegSizes");
            new Key<Size[]>("android.scaler.availableJpegSizes", Size[].class);

    /**
     * <p>The available sizes for output buffers from this camera device, when
@@ -194,7 +194,7 @@ public final class CameraProperties extends CameraMetadata {
     *
     */
    public static final Key<Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
            new Key<Size[]>("android.scaler.availableProcessedSizes");
            new Key<Size[]>("android.scaler.availableProcessedSizes", Size[].class);

    /**
     * <p>The available sizes for output buffers from this camera device, when
@@ -207,7 +207,7 @@ public final class CameraProperties extends CameraMetadata {
     * when using image format {@link android.graphics.ImageFormat#RAW_SENSOR}.</p>
     */
    public static final Key<Size[]> SCALER_AVAILABLE_RAW_SIZES =
            new Key<Size[]>("android.scaler.availableRawSizes");
            new Key<Size[]>("android.scaler.availableRawSizes", Size[].class);

    /**
     * <p>The coordinates of the sensor's active pixel array, relative to its
@@ -230,7 +230,7 @@ public final class CameraProperties extends CameraMetadata {
     * being the top-left corner of the active array.</p>
     */
    public static final Key<Rect> SENSOR_ACTIVE_ARRAY_SIZE =
            new Key<Rect>("android.sensor.activeArraySize");
            new Key<Rect>("android.sensor.activeArraySize", Rect.class);

    /**
     * <p>The size of the sensor's total pixel array available for readout. Some
@@ -240,7 +240,7 @@ public final class CameraProperties extends CameraMetadata {
     * the supported capture sizes.</p>
     */
    public static final Key<Size> SENSOR_PIXEL_ARRAY_SIZE =
            new Key<Size>("android.sensor.activeArraySize");
            new Key<Size>("android.sensor.activeArraySize", Size.class);

    // TODO: Many more of these.

+2 −2
Original line number Diff line number Diff line
@@ -58,14 +58,14 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     * The exposure time for this capture, in nanoseconds.
     */
    public static final Key<Long> SENSOR_EXPOSURE_TIME =
            new Key<Long>("android.sensor.exposureTime");
            new Key<Long>("android.sensor.exposureTime", Long.TYPE);

    /**
     * The sensor sensitivity (gain) setting for this camera.
     * This is represented as an ISO sensitivity value
     */
    public static final Key<Integer> SENSOR_SENSITIVITY =
            new Key<Integer>("android.sensor.sensitivity");
            new Key<Integer>("android.sensor.sensitivity", Integer.TYPE);

    // Many more settings

+6 −6
Original line number Diff line number Diff line
@@ -42,15 +42,15 @@ public final class CaptureResult extends CameraMetadata {
     * or {@link android.media.Image#getTimestamp Image.getTimestamp()} for this
     * capture's image data.
     */
    public static final Key SENSOR_TIMESTAMP =
            new Key<Long>("android.sensor.timestamp");
    public static final Key<Long> SENSOR_TIMESTAMP =
            new Key<Long>("android.sensor.timestamp", Long.TYPE);

    /**
     * The state of the camera device's auto-exposure algorithm. One of the
     * CONTROL_AE_STATE_* enumerations.
     */
    public static final Key CONTROL_AE_STATE =
            new Key<Integer>("android.control.aeState");
    public static final Key<Integer> CONTROL_AE_STATE =
            new Key<Integer>("android.control.aeState", Integer.TYPE);

    /**
     * The auto-exposure algorithm is inactive.
@@ -96,8 +96,8 @@ public final class CaptureResult extends CameraMetadata {
     * The list of faces detected in this capture. Available if face detection
     * was enabled for this capture
     */
    public static final Key STATISTICS_DETECTED_FACES =
            new Key<Face[]>("android.statistics.faces");
    public static final Key<Face[]> STATISTICS_DETECTED_FACES =
            new Key<Face[]>("android.statistics.faces", Face[].class);

    // TODO: Many many more

Loading