Merge "camera2: Rename CameraProperties to CameraCharacteristics" into klp-dev

This commit is contained in:
Igor Murashkin
2013-09-22 16:54:11 +00:00
committed by Android (Google) Code Review
10 changed files with 92 additions and 85 deletions

View File

@ -10845,6 +10845,51 @@ package android.hardware.camera2 {
field public static final int CAMERA_ERROR = 3; // 0x3 field public static final int CAMERA_ERROR = 3; // 0x3
} }
public final class CameraCharacteristics extends android.hardware.camera2.CameraMetadata {
method public T get(android.hardware.camera2.CameraMetadata.Key<T>);
method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureRequestKeys();
method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureResultKeys();
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_ANTIBANDING_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_STEP;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AF_AVAILABLE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_EFFECTS;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_SCENE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AWB_AVAILABLE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_MAX_REGIONS;
field public static final android.hardware.camera2.CameraMetadata.Key FLASH_INFO_AVAILABLE;
field public static final android.hardware.camera2.CameraMetadata.Key INFO_SUPPORTED_HARDWARE_LEVEL;
field public static final android.hardware.camera2.CameraMetadata.Key JPEG_AVAILABLE_THUMBNAIL_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_FACING;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_APERTURES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_FILTER_DENSITIES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_FOCAL_LENGTHS;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_HYPERFOCAL_DISTANCE;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_MINIMUM_FOCUS_DISTANCE;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_SHADING_MAP_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key REQUEST_MAX_NUM_OUTPUT_STREAMS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_FORMATS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_JPEG_MIN_DURATIONS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_JPEG_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_BASE_GAIN_FACTOR;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_ACTIVE_ARRAY_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_EXPOSURE_TIME_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_MAX_FRAME_DURATION;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_PHYSICAL_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_SENSITIVITY_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_MAX_ANALOG_SENSITIVITY;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_ORIENTATION;
field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_MAX_FACE_COUNT;
field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_MAX_CURVE_POINTS;
}
public abstract interface CameraDevice implements java.lang.AutoCloseable { public abstract interface CameraDevice implements java.lang.AutoCloseable {
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 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.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.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
@ -10853,7 +10898,7 @@ package android.hardware.camera2 {
method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) 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 void flush() throws android.hardware.camera2.CameraAccessException;
method public abstract java.lang.String getId(); method public abstract java.lang.String getId();
method public abstract android.hardware.camera2.CameraProperties getProperties() throws android.hardware.camera2.CameraAccessException; method public abstract android.hardware.camera2.CameraCharacteristics getProperties() throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingBurst(java.util.List<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.CaptureRequest>, 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 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 stopRepeating() throws android.hardware.camera2.CameraAccessException;
@ -10891,8 +10936,8 @@ package android.hardware.camera2 {
public final class CameraManager { public final class CameraManager {
method public void addAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener, android.os.Handler); method public void addAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener, android.os.Handler);
method public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(java.lang.String) throws android.hardware.camera2.CameraAccessException;
method public java.lang.String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException; method public java.lang.String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException;
method public android.hardware.camera2.CameraProperties getCameraProperties(java.lang.String) throws android.hardware.camera2.CameraAccessException;
method public void openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException; method public void openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public void removeAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener); method public void removeAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener);
} }
@ -11029,51 +11074,6 @@ package android.hardware.camera2 {
method public final int hashCode(); method public final int hashCode();
} }
public final class CameraProperties extends android.hardware.camera2.CameraMetadata {
method public T get(android.hardware.camera2.CameraMetadata.Key<T>);
method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureRequestKeys();
method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureResultKeys();
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_ANTIBANDING_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_STEP;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AF_AVAILABLE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_EFFECTS;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_SCENE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AWB_AVAILABLE_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_MAX_REGIONS;
field public static final android.hardware.camera2.CameraMetadata.Key FLASH_INFO_AVAILABLE;
field public static final android.hardware.camera2.CameraMetadata.Key INFO_SUPPORTED_HARDWARE_LEVEL;
field public static final android.hardware.camera2.CameraMetadata.Key JPEG_AVAILABLE_THUMBNAIL_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_FACING;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_APERTURES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_FILTER_DENSITIES;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_FOCAL_LENGTHS;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_HYPERFOCAL_DISTANCE;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_MINIMUM_FOCUS_DISTANCE;
field public static final android.hardware.camera2.CameraMetadata.Key LENS_INFO_SHADING_MAP_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key REQUEST_MAX_NUM_OUTPUT_STREAMS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_FORMATS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_JPEG_MIN_DURATIONS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_JPEG_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS;
field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_SIZES;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_BASE_GAIN_FACTOR;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_ACTIVE_ARRAY_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_EXPOSURE_TIME_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_MAX_FRAME_DURATION;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_PHYSICAL_SIZE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_INFO_SENSITIVITY_RANGE;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_MAX_ANALOG_SENSITIVITY;
field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_ORIENTATION;
field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES;
field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_MAX_FACE_COUNT;
field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_MAX_CURVE_POINTS;
}
public class CaptureFailure { public class CaptureFailure {
method public int getFrameNumber(); method public int getFrameNumber();
method public int getReason(); method public int getReason();

View File

@ -32,7 +32,7 @@ import java.util.List;
* @see CameraDevice * @see CameraDevice
* @see CameraManager * @see CameraManager
*/ */
public final class CameraProperties extends CameraMetadata { public final class CameraCharacteristics extends CameraMetadata {
private final CameraMetadataNative mProperties; private final CameraMetadataNative mProperties;
private List<Key<?>> mAvailableRequestKeys; private List<Key<?>> mAvailableRequestKeys;
@ -42,7 +42,7 @@ public final class CameraProperties extends CameraMetadata {
* Takes ownership of the passed-in properties object * Takes ownership of the passed-in properties object
* @hide * @hide
*/ */
public CameraProperties(CameraMetadataNative properties) { public CameraCharacteristics(CameraMetadataNative properties) {
mProperties = properties; mProperties = properties;
} }
@ -60,7 +60,7 @@ public final class CameraProperties extends CameraMetadata {
* *
* <p>Each key is only listed once in the list. The order of the keys is undefined.</p> * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
* *
* <p>Note that there is no {@code getAvailableCameraPropertiesKeys()} -- use * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
* {@link #getKeys()} instead.</p> * {@link #getKeys()} instead.</p>
* *
* @return List of keys supported by this CameraDevice for CaptureRequests. * @return List of keys supported by this CameraDevice for CaptureRequests.
@ -81,7 +81,7 @@ public final class CameraProperties extends CameraMetadata {
* *
* <p>Each key is only listed once in the list. The order of the keys is undefined.</p> * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
* *
* <p>Note that there is no {@code getAvailableCameraPropertiesKeys()} -- use * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
* {@link #getKeys()} instead.</p> * {@link #getKeys()} instead.</p>
* *
* @return List of keys supported by this CameraDevice for CaptureResults. * @return List of keys supported by this CameraDevice for CaptureResults.

View File

@ -118,22 +118,22 @@ public interface CameraDevice extends AutoCloseable {
* this camera device.</p> * this camera device.</p>
* *
* <p>This ID can be used to query the camera device's {@link * <p>This ID can be used to query the camera device's {@link
* CameraProperties fixed properties} with {@link * CameraCharacteristics fixed properties} with {@link
* CameraManager#getCameraProperties}.</p> * CameraManager#getCameraCharacteristics}.</p>
* *
* <p>This method can be called even if the device has been closed or has encountered * <p>This method can be called even if the device has been closed or has encountered
* a serious error.</p> * a serious error.</p>
* *
* @return the ID for this camera device * @return the ID for this camera device
* *
* @see CameraManager#getCameraProperties * @see CameraManager#getCameraCharacteristics
* @see CameraManager#getDeviceIdList * @see CameraManager#getDeviceIdList
*/ */
public String getId(); public String getId();
/** /**
* Get the static properties for this camera. These are identical to the * Get the static properties for this camera. These are identical to the
* properties returned by {@link CameraManager#getCameraProperties}. * properties returned by {@link CameraManager#getCameraCharacteristics}.
* *
* @return the static properties of the camera * @return the static properties of the camera
* *
@ -141,10 +141,9 @@ public interface CameraDevice extends AutoCloseable {
* encountered a fatal error * encountered a fatal error
* @throws IllegalStateException if the camera device has been closed * @throws IllegalStateException if the camera device has been closed
* *
* @see CameraManager#getCameraProperties * @see CameraManager#getCameraCharacteristics
*/ */
public CameraProperties getProperties() throws CameraAccessException; public CameraCharacteristics getProperties() throws CameraAccessException;
/** /**
* <p>Set up a new output set of Surfaces for the camera device.</p> * <p>Set up a new output set of Surfaces for the camera device.</p>
* *
@ -165,7 +164,7 @@ public interface CameraDevice extends AutoCloseable {
* the size of the Surface with * the size of the Surface with
* {@link android.view.SurfaceHolder#setFixedSize} to be one of the * {@link android.view.SurfaceHolder#setFixedSize} to be one of the
* supported * supported
* {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes} * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* before calling {@link android.view.SurfaceHolder#getSurface}.</li> * before calling {@link android.view.SurfaceHolder#getSurface}.</li>
* *
* <li>For accessing through an OpenGL texture via a * <li>For accessing through an OpenGL texture via a
@ -173,14 +172,14 @@ public interface CameraDevice extends AutoCloseable {
* the SurfaceTexture with * the SurfaceTexture with
* {@link android.graphics.SurfaceTexture#setDefaultBufferSize} to be one * {@link android.graphics.SurfaceTexture#setDefaultBufferSize} to be one
* of the supported * of the supported
* {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes} * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* before creating a Surface from the SurfaceTexture with * before creating a Surface from the SurfaceTexture with
* {@link Surface#Surface}.</li> * {@link Surface#Surface}.</li>
* *
* <li>For recording with {@link android.media.MediaCodec}: Call * <li>For recording with {@link android.media.MediaCodec}: Call
* {@link android.media.MediaCodec#createInputSurface} after configuring * {@link android.media.MediaCodec#createInputSurface} after configuring
* the media codec to use one of the * the media codec to use one of the
* {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes} * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* </li> * </li>
* *
* <li>For recording with {@link android.media.MediaRecorder}: TODO</li> * <li>For recording with {@link android.media.MediaRecorder}: TODO</li>
@ -189,16 +188,16 @@ public interface CameraDevice extends AutoCloseable {
* Create a RenderScript * Create a RenderScript
* {@link android.renderscript.Allocation Allocation} with a supported YUV * {@link android.renderscript.Allocation Allocation} with a supported YUV
* type, the IO_INPUT flag, and one of the supported * type, the IO_INPUT flag, and one of the supported
* {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}. Then * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}. Then
* obtain the Surface with * obtain the Surface with
* {@link android.renderscript.Allocation#getSurface}.</li> * {@link android.renderscript.Allocation#getSurface}.</li>
* *
* <li>For access to uncompressed or JPEG data in the application: Create a * <li>For access to uncompressed or JPEG data in the application: Create a
* {@link android.media.ImageReader} object with the desired * {@link android.media.ImageReader} object with the desired
* {@link CameraProperties#SCALER_AVAILABLE_FORMATS image format}, and a * {@link CameraCharacteristics#SCALER_AVAILABLE_FORMATS image format}, and a
* size from the matching * size from the matching
* {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed}, * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed},
* {@link CameraProperties#SCALER_AVAILABLE_JPEG_SIZES jpeg}. Then obtain * {@link CameraCharacteristics#SCALER_AVAILABLE_JPEG_SIZES jpeg}. Then obtain
* a Surface from it.</li> * a Surface from it.</li>
* *
* </ul> * </ul>

View File

@ -166,7 +166,7 @@ public final class CameraManager {
* @see #getCameraIdList * @see #getCameraIdList
* @see android.app.admin.DevicePolicyManager#setCameraDisabled * @see android.app.admin.DevicePolicyManager#setCameraDisabled
*/ */
public CameraProperties getCameraProperties(String cameraId) public CameraCharacteristics getCameraCharacteristics(String cameraId)
throws CameraAccessException { throws CameraAccessException {
synchronized (mLock) { synchronized (mLock) {
@ -179,7 +179,7 @@ public final class CameraManager {
// TODO: implement and call a service function to get the capabilities on C++ side // TODO: implement and call a service function to get the capabilities on C++ side
// TODO: get properties from service // TODO: get properties from service
return new CameraProperties(new CameraMetadataNative()); return new CameraCharacteristics(new CameraMetadataNative());
} }
/** /**

View File

@ -40,11 +40,19 @@ import java.util.List;
* *
* @see CameraDevice * @see CameraDevice
* @see CameraManager * @see CameraManager
* @see CameraProperties * @see CameraCharacteristics
**/ **/
public abstract class CameraMetadata { public abstract class CameraMetadata {
/** /**
* Set a camera metadata field to a value. The field definitions can be
* found in {@link CameraCharacteristics}, {@link CaptureResult}, and
* {@link CaptureRequest}.
*
* @param key The metadata field to write.
* @param value The value to set the field to, which must be of a matching
* type to the key.
*
* @hide * @hide
*/ */
protected CameraMetadata() { protected CameraMetadata() {
@ -54,7 +62,7 @@ public abstract class CameraMetadata {
* Get a camera metadata field value. * Get a camera metadata field value.
* *
* <p>The field definitions can be * <p>The field definitions can be
* found in {@link CameraProperties}, {@link CaptureResult}, and * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
* {@link CaptureRequest}.</p> * {@link CaptureRequest}.</p>
* *
* <p>Querying the value for the same key more than once will return a value * <p>Querying the value for the same key more than once will return a value
@ -195,43 +203,43 @@ public abstract class CameraMetadata {
*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
// //
// Enumeration values for CameraProperties#LENS_FACING // Enumeration values for CameraCharacteristics#LENS_FACING
// //
/** /**
* @see CameraProperties#LENS_FACING * @see CameraCharacteristics#LENS_FACING
*/ */
public static final int LENS_FACING_FRONT = 0; public static final int LENS_FACING_FRONT = 0;
/** /**
* @see CameraProperties#LENS_FACING * @see CameraCharacteristics#LENS_FACING
*/ */
public static final int LENS_FACING_BACK = 1; public static final int LENS_FACING_BACK = 1;
// //
// Enumeration values for CameraProperties#LED_AVAILABLE_LEDS // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
// //
/** /**
* <p> * <p>
* android.led.transmit control is used * android.led.transmit control is used
* </p> * </p>
* @see CameraProperties#LED_AVAILABLE_LEDS * @see CameraCharacteristics#LED_AVAILABLE_LEDS
* @hide * @hide
*/ */
public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0; public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
// //
// Enumeration values for CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
// //
/** /**
* @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
*/ */
public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
/** /**
* @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
*/ */
public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;

View File

@ -128,7 +128,7 @@ public final class Face {
* Bounds of the face. * Bounds of the face.
* *
* <p>A rectangle relative to the sensor's * <p>A rectangle relative to the sensor's
* {@link CameraProperties#SENSOR_INFO_ACTIVE_ARRAY_SIZE}, with (0,0) * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE}, with (0,0)
* representing the top-left corner of the active array rectangle.</p> * representing the top-left corner of the active array rectangle.</p>
* *
* <p>There is no constraints on the the Rectangle value other than it * <p>There is no constraints on the the Rectangle value other than it

View File

@ -20,7 +20,7 @@ import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraMetadata; import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.CameraProperties; import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult; import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.ICameraDeviceCallbacks; import android.hardware.camera2.ICameraDeviceCallbacks;
@ -88,7 +88,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
} }
@Override @Override
public CameraProperties getProperties() throws CameraAccessException { public CameraCharacteristics getProperties() throws CameraAccessException {
CameraMetadataNative info = new CameraMetadataNative(); CameraMetadataNative info = new CameraMetadataNative();
@ -101,7 +101,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
return null; return null;
} }
CameraProperties properties = new CameraProperties(info); CameraCharacteristics properties = new CameraCharacteristics(info);
return properties; return properties;
} }

View File

@ -101,7 +101,7 @@ public class CameraMetadataNative extends CameraMetadata implements Parcelable {
/** /**
* Set a camera metadata field to a value. The field definitions can be * Set a camera metadata field to a value. The field definitions can be
* found in {@link CameraProperties}, {@link CaptureResult}, and * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
* {@link CaptureRequest}. * {@link CaptureRequest}.
* *
* @param key The metadata field to write. * @param key The metadata field to write.

View File

@ -34,7 +34,7 @@ framerate on most Android devices.</p>
CameraDevices} provide a set of static property information that CameraDevices} provide a set of static property information that
describes the hardware device and the available settings and output describes the hardware device and the available settings and output
parameters for the device. This information is provided through the parameters for the device. This information is provided through the
{@link android.hardware.camera2.CameraProperties} object.</p> {@link android.hardware.camera2.CameraCharacteristics} object.</p>
<p>To capture or stream images from a camera device, the application <p>To capture or stream images from a camera device, the application
must first configure a set of output Surfaces for use with the camera must first configure a set of output Surfaces for use with the camera

View File

@ -18,7 +18,7 @@ package com.android.mediaframeworktest.integration;
import android.graphics.SurfaceTexture; import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraMetadata; import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.CameraProperties; import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.ICameraDeviceCallbacks; import android.hardware.camera2.ICameraDeviceCallbacks;
import android.hardware.camera2.ICameraDeviceUser; import android.hardware.camera2.ICameraDeviceUser;
@ -269,7 +269,7 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
assertEquals(CameraBinderTestUtils.NO_ERROR, status); assertEquals(CameraBinderTestUtils.NO_ERROR, status);
assertFalse(info.isEmpty()); assertFalse(info.isEmpty());
assertNotNull(info.get(CameraProperties.SCALER_AVAILABLE_FORMATS)); assertNotNull(info.get(CameraCharacteristics.SCALER_AVAILABLE_FORMATS));
} }
@SmallTest @SmallTest