From b8cee5175d7cbc4901bd2d56aa6a380b1464a074 Mon Sep 17 00:00:00 2001 From: Sol Boucher Date: Wed, 11 Jun 2014 16:35:57 -0700 Subject: camera2: Remove stray

in CameraDevice#createCaptureSession This was causing strange indentation. The change also clarifies how to get the supported output sizes in the ImageReader flow: Although the doc (correctly) instructed the developer to use StreamConfigurationMap#getOutputSizes(int) with an ImageReader, this instruction appeared after the bulleted list of output types. Since all other items in that list specify that getOutputSizes(Class) should be used, the reader shouldn't be expected to read beyond the list only in this specific case. Bug: 15574400 Change-Id: Id952b46ae52322d75abbcaffea678d5ba50b22a5 --- core/java/android/hardware/camera2/CameraDevice.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'core/java/android/hardware') diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 68f4d64..77d0c41 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -190,22 +190,18 @@ public abstract class CameraDevice implements AutoCloseable { * Then obtain the Surface with * {@link android.renderscript.Allocation#getSurface}. * - *
  • For access to raw, uncompressed or JPEG data in the application: Create a - * {@link android.media.ImageReader} object with the one of the supported - * {@link StreamConfigurationMap#getOutputFormats() output image formats}, and a - * size from the supported - * {@link StreamConfigurationMap#getOutputSizes(int) sizes for that format}. Then obtain - * a Surface from it with {@link android.media.ImageReader#getSurface}.
  • + *
  • For access to raw, uncompressed JPEG data in the application: Create an + * {@link android.media.ImageReader} object with one of the supported output formats given by + * {@link StreamConfigurationMap#getOutputFormats()}, setting its size to one of the + * corresponding supported sizes by passing the chosen output format into + * {@link StreamConfigurationMap#getOutputSizes(int)}. Then obtain a + * {@link android.view.Surface} from it with {@link android.media.ImageReader#getSurface()}. + *
  • * * * - *

    - * *

    The camera device will query each Surface's size and formats upon this - * call, so they must be set to a valid setting at this time (in particular: - * if the format is user-visible, it must be one of - * {@link StreamConfigurationMap#getOutputFormats}; and the size must be one of - * {@link StreamConfigurationMap#getOutputSizes(int)}).

    + * call, so they must be set to a valid setting at this time.

    * *

    It can take several hundred milliseconds for the session's configuration to complete, * since camera hardware may need to be powered on or reconfigured. Once the configuration is -- cgit v1.1 From 5ae1ca5b6932b27f8d3d5a3b4a124fe2b5b84e27 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 12 Jun 2014 16:46:58 -0700 Subject: camera2 docs: Fix instructions for using SurfaceView. Bug: 15597178 Change-Id: I802369e61725451ddd8df855c384608c80e12693 --- core/java/android/hardware/camera2/CameraDevice.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/java/android/hardware') diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 77d0c41..1f89d33 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -154,10 +154,11 @@ public abstract class CameraDevice implements AutoCloseable { * *