Loading core/java/android/hardware/camera2/CameraDevice.java +2 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,8 @@ public abstract class CameraDevice implements AutoCloseable { * @see StreamConfigurationMap#getInputFormats * @see StreamConfigurationMap#getInputSizes * @see StreamConfigurationMap#getValidOutputFormatsForInput * @see StreamConfigurationMap#getOutputSizes * @see StreamConfigurationMap#getOutputSizes(int) * @see StreamConfigurationMap#getOutputSizes(Class) * @see android.media.ImageWriter * @see android.media.ImageReader * @deprecated Please use {@link Loading core/java/android/hardware/camera2/CameraManager.java +11 −8 Original line number Diff line number Diff line Loading @@ -129,14 +129,17 @@ public final class CameraManager { /** * Enable physical camera availability callbacks when the logical camera is unavailable * * <p>Previously once a logical camera becomes unavailable, no {@link * #onPhysicalCameraAvailable} or {@link #onPhysicalCameraUnavailable} will be called until * the logical camera becomes available again. The results in the app opening the logical * camera not able to receive physical camera availability change.</p> * * <p>With this change, the {@link #onPhysicalCameraAvailable} and {@link * #onPhysicalCameraUnavailable} can still be called while the logical camera is unavailable. * </p> * <p>Previously once a logical camera becomes unavailable, no * {@link AvailabilityCallback#onPhysicalCameraAvailable} or * {@link AvailabilityCallback#onPhysicalCameraUnavailable} will * be called until the logical camera becomes available again. The * results in the app opening the logical camera not able to * receive physical camera availability change.</p> * * <p>With this change, the {@link * AvailabilityCallback#onPhysicalCameraAvailable} and {@link * AvailabilityCallback#onPhysicalCameraUnavailable} can still be * called while the logical camera is unavailable. </p> */ @ChangeId @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) Loading core/java/android/hardware/camera2/package.html +22 −6 Original line number Diff line number Diff line Loading @@ -62,12 +62,28 @@ RAW buffers for {@link android.hardware.camera2.DngCreator} can be done with {@link android.media.ImageReader} with the {@link android.graphics.ImageFormat#JPEG} and {@link android.graphics.ImageFormat#RAW_SENSOR} formats. Application-driven processing of camera data in RenderScript, OpenGL ES, or directly in managed or native code is best done through {@link android.renderscript.Allocation} with a YUV {@link android.renderscript.Type}, {@link android.graphics.SurfaceTexture}, and {@link android.media.ImageReader} with a {@link android.graphics.ImageFormat#YUV_420_888} format, respectively.</p> processing of camera data in OpenGL ES, or directly in managed or native code is best done through {@link android.graphics.SurfaceTexture}, or {@link android.media.ImageReader} with a {@link android.graphics.ImageFormat#YUV_420_888} format, respectively. </p> <p>By default, YUV-format buffers provided by the camera are using the JFIF YUV<->RGB transform matrix (equivalent to Rec.601 full-range encoding), and after conversion to RGB with this matrix, the resulting RGB data is in the sRGB colorspace. Captured JPEG images may contain an ICC profile to specify their color space information; if not, they should be assumed to be in the sRGB space as well. On some devices, the output colorspace can be changed via {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace}. </p> <p> Note that although the YUV->RGB transform is the JFIF matrix (Rec.601 full-range), due to legacy and compatibility reasons, the output is in the sRGB colorspace, which uses the Rec.709 color primaries. Image processing code can safely treat the output RGB as being in the sRGB colorspace. </p> <p>The application then needs to construct a {@link android.hardware.camera2.CaptureRequest}, which defines all the Loading core/java/android/hardware/camera2/params/ColorSpaceProfiles.java +2 −2 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ public final class ColorSpaceProfiles { * @see OutputConfiguration#setDynamicRangeProfile * @see SessionConfiguration#setColorSpace * @see ColorSpace.Named * @see DynamicRangeProfiles.Profile * @see DynamicRangeProfiles */ public @NonNull Set<Long> getSupportedDynamicRangeProfiles(@NonNull ColorSpace.Named colorSpace, @ImageFormat.Format int imageFormat) { Loading Loading @@ -230,7 +230,7 @@ public final class ColorSpaceProfiles { * @see SessionConfiguration#setColorSpace * @see OutputConfiguration#setDynamicRangeProfile * @see ColorSpace.Named * @see DynamicRangeProfiles.Profile * @see DynamicRangeProfiles */ public @NonNull Set<ColorSpace.Named> getSupportedColorSpacesForDynamicRange( @ImageFormat.Format int imageFormat, Loading core/java/android/hardware/camera2/params/RecommendedStreamConfigurationMap.java +8 −6 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import java.util.Set; * Immutable class to store the recommended stream configurations to set up * {@link android.view.Surface Surfaces} for creating a * {@link android.hardware.camera2.CameraCaptureSession capture session} with * {@link android.hardware.camera2.CameraDevice#createCaptureSession}. * {@link android.hardware.camera2.CameraDevice#createCaptureSession(SessionConfiguration)}. * * <p>The recommended list does not replace or deprecate the exhaustive complete list found in * {@link StreamConfigurationMap}. It is a suggestion about available power and performance Loading @@ -70,7 +70,7 @@ import java.util.Set; * }</code></pre> * * @see CameraCharacteristics#getRecommendedStreamConfigurationMap * @see CameraDevice#createCaptureSession * @see CameraDevice#createCaptureSession(SessionConfiguration) */ public final class RecommendedStreamConfigurationMap { Loading Loading @@ -282,7 +282,7 @@ public final class RecommendedStreamConfigurationMap { /** * Determine whether or not output surfaces with a particular user-defined format can be passed * {@link CameraDevice#createCaptureSession createCaptureSession}. * {@link CameraDevice#createCaptureSession(SessionConfiguration) createCaptureSession}. * * <p> * For further information refer to {@link StreamConfigurationMap#isOutputSupportedFor}. Loading @@ -292,7 +292,7 @@ public final class RecommendedStreamConfigurationMap { * @param format an image format from either {@link ImageFormat} or {@link PixelFormat} * @return * {@code true} if using a {@code surface} with this {@code format} will be * supported with {@link CameraDevice#createCaptureSession} * supported with {@link CameraDevice#createCaptureSession(SessionConfiguration)} * * @throws IllegalArgumentException * if the image format was not a defined named constant Loading Loading @@ -508,8 +508,10 @@ public final class RecommendedStreamConfigurationMap { } /** * Determine whether or not the {@code surface} in its current state is suitable to be included * in a {@link CameraDevice#createCaptureSession capture session} as an output. * Determine whether or not the {@code surface} in its current * state is suitable to be included in a {@link * CameraDevice#createCaptureSession(SessionConfiguration) capture * session} as an output. * * <p>For more information refer to {@link StreamConfigurationMap#isOutputSupportedFor}. * </p> Loading Loading
core/java/android/hardware/camera2/CameraDevice.java +2 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,8 @@ public abstract class CameraDevice implements AutoCloseable { * @see StreamConfigurationMap#getInputFormats * @see StreamConfigurationMap#getInputSizes * @see StreamConfigurationMap#getValidOutputFormatsForInput * @see StreamConfigurationMap#getOutputSizes * @see StreamConfigurationMap#getOutputSizes(int) * @see StreamConfigurationMap#getOutputSizes(Class) * @see android.media.ImageWriter * @see android.media.ImageReader * @deprecated Please use {@link Loading
core/java/android/hardware/camera2/CameraManager.java +11 −8 Original line number Diff line number Diff line Loading @@ -129,14 +129,17 @@ public final class CameraManager { /** * Enable physical camera availability callbacks when the logical camera is unavailable * * <p>Previously once a logical camera becomes unavailable, no {@link * #onPhysicalCameraAvailable} or {@link #onPhysicalCameraUnavailable} will be called until * the logical camera becomes available again. The results in the app opening the logical * camera not able to receive physical camera availability change.</p> * * <p>With this change, the {@link #onPhysicalCameraAvailable} and {@link * #onPhysicalCameraUnavailable} can still be called while the logical camera is unavailable. * </p> * <p>Previously once a logical camera becomes unavailable, no * {@link AvailabilityCallback#onPhysicalCameraAvailable} or * {@link AvailabilityCallback#onPhysicalCameraUnavailable} will * be called until the logical camera becomes available again. The * results in the app opening the logical camera not able to * receive physical camera availability change.</p> * * <p>With this change, the {@link * AvailabilityCallback#onPhysicalCameraAvailable} and {@link * AvailabilityCallback#onPhysicalCameraUnavailable} can still be * called while the logical camera is unavailable. </p> */ @ChangeId @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) Loading
core/java/android/hardware/camera2/package.html +22 −6 Original line number Diff line number Diff line Loading @@ -62,12 +62,28 @@ RAW buffers for {@link android.hardware.camera2.DngCreator} can be done with {@link android.media.ImageReader} with the {@link android.graphics.ImageFormat#JPEG} and {@link android.graphics.ImageFormat#RAW_SENSOR} formats. Application-driven processing of camera data in RenderScript, OpenGL ES, or directly in managed or native code is best done through {@link android.renderscript.Allocation} with a YUV {@link android.renderscript.Type}, {@link android.graphics.SurfaceTexture}, and {@link android.media.ImageReader} with a {@link android.graphics.ImageFormat#YUV_420_888} format, respectively.</p> processing of camera data in OpenGL ES, or directly in managed or native code is best done through {@link android.graphics.SurfaceTexture}, or {@link android.media.ImageReader} with a {@link android.graphics.ImageFormat#YUV_420_888} format, respectively. </p> <p>By default, YUV-format buffers provided by the camera are using the JFIF YUV<->RGB transform matrix (equivalent to Rec.601 full-range encoding), and after conversion to RGB with this matrix, the resulting RGB data is in the sRGB colorspace. Captured JPEG images may contain an ICC profile to specify their color space information; if not, they should be assumed to be in the sRGB space as well. On some devices, the output colorspace can be changed via {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace}. </p> <p> Note that although the YUV->RGB transform is the JFIF matrix (Rec.601 full-range), due to legacy and compatibility reasons, the output is in the sRGB colorspace, which uses the Rec.709 color primaries. Image processing code can safely treat the output RGB as being in the sRGB colorspace. </p> <p>The application then needs to construct a {@link android.hardware.camera2.CaptureRequest}, which defines all the Loading
core/java/android/hardware/camera2/params/ColorSpaceProfiles.java +2 −2 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ public final class ColorSpaceProfiles { * @see OutputConfiguration#setDynamicRangeProfile * @see SessionConfiguration#setColorSpace * @see ColorSpace.Named * @see DynamicRangeProfiles.Profile * @see DynamicRangeProfiles */ public @NonNull Set<Long> getSupportedDynamicRangeProfiles(@NonNull ColorSpace.Named colorSpace, @ImageFormat.Format int imageFormat) { Loading Loading @@ -230,7 +230,7 @@ public final class ColorSpaceProfiles { * @see SessionConfiguration#setColorSpace * @see OutputConfiguration#setDynamicRangeProfile * @see ColorSpace.Named * @see DynamicRangeProfiles.Profile * @see DynamicRangeProfiles */ public @NonNull Set<ColorSpace.Named> getSupportedColorSpacesForDynamicRange( @ImageFormat.Format int imageFormat, Loading
core/java/android/hardware/camera2/params/RecommendedStreamConfigurationMap.java +8 −6 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import java.util.Set; * Immutable class to store the recommended stream configurations to set up * {@link android.view.Surface Surfaces} for creating a * {@link android.hardware.camera2.CameraCaptureSession capture session} with * {@link android.hardware.camera2.CameraDevice#createCaptureSession}. * {@link android.hardware.camera2.CameraDevice#createCaptureSession(SessionConfiguration)}. * * <p>The recommended list does not replace or deprecate the exhaustive complete list found in * {@link StreamConfigurationMap}. It is a suggestion about available power and performance Loading @@ -70,7 +70,7 @@ import java.util.Set; * }</code></pre> * * @see CameraCharacteristics#getRecommendedStreamConfigurationMap * @see CameraDevice#createCaptureSession * @see CameraDevice#createCaptureSession(SessionConfiguration) */ public final class RecommendedStreamConfigurationMap { Loading Loading @@ -282,7 +282,7 @@ public final class RecommendedStreamConfigurationMap { /** * Determine whether or not output surfaces with a particular user-defined format can be passed * {@link CameraDevice#createCaptureSession createCaptureSession}. * {@link CameraDevice#createCaptureSession(SessionConfiguration) createCaptureSession}. * * <p> * For further information refer to {@link StreamConfigurationMap#isOutputSupportedFor}. Loading @@ -292,7 +292,7 @@ public final class RecommendedStreamConfigurationMap { * @param format an image format from either {@link ImageFormat} or {@link PixelFormat} * @return * {@code true} if using a {@code surface} with this {@code format} will be * supported with {@link CameraDevice#createCaptureSession} * supported with {@link CameraDevice#createCaptureSession(SessionConfiguration)} * * @throws IllegalArgumentException * if the image format was not a defined named constant Loading Loading @@ -508,8 +508,10 @@ public final class RecommendedStreamConfigurationMap { } /** * Determine whether or not the {@code surface} in its current state is suitable to be included * in a {@link CameraDevice#createCaptureSession capture session} as an output. * Determine whether or not the {@code surface} in its current * state is suitable to be included in a {@link * CameraDevice#createCaptureSession(SessionConfiguration) capture * session} as an output. * * <p>For more information refer to {@link StreamConfigurationMap#isOutputSupportedFor}. * </p> Loading