OSDN Git Service

Camera: Fix tests per camera service interface change
authorYin-Chia Yeh <yinchiayeh@google.com>
Thu, 12 Mar 2015 22:09:27 +0000 (15:09 -0700)
committerYin-Chia Yeh <yinchiayeh@google.com>
Mon, 16 Mar 2015 20:11:11 +0000 (13:11 -0700)
Also clarify rotation field has no meaning and will always be 0
for a input stream.

Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333

include/hardware/camera3.h
tests/camera2/CameraMultiStreamTests.cpp
tests/camera2/CameraStreamFixture.h

index 284c78b..fd3a45d 100644 (file)
@@ -1540,7 +1540,9 @@ typedef struct camera3_stream {
      * with stream width and height. For example, if the rotation is 90 degree
      * and the stream width and height is 720 and 1280 respectively, camera service
      * will supply buffers of size 720x1280, and HAL should capture a 1280x720 image
-     * and rotate the image by 90 degree counterclockwise.
+     * and rotate the image by 90 degree counterclockwise. The rotation field is
+     * no-op when the stream type is input. Camera HAL must ignore the rotation
+     * field for an input stream.
      *
      * <= CAMERA_DEVICE_API_VERSION_3_2:
      *
index 1edc28e..bfadfea 100644 (file)
@@ -209,7 +209,7 @@ public:
             ASSERT_EQ(OK,
                 mDevice->createStream(mNativeWindow,
                     mWidth, mHeight, mFormat, HAL_DATASPACE_UNKNOWN,
-                    &mStreamId));
+                    CAMERA3_STREAM_ROTATION_0, &mStreamId));
 
             ASSERT_NE(-1, mStreamId);
         }
index ff110d8..8a8c27d 100644 (file)
@@ -258,6 +258,7 @@ protected:
             device->createStream(mNativeWindow,
                 mWidth, mHeight, format,
                 HAL_DATASPACE_UNKNOWN,
+                CAMERA3_STREAM_ROTATION_0,
                 &mStreamId));
 
         ASSERT_NE(-1, mStreamId);