summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJianing Wei <jianingwei@google.com>2014-04-10 14:17:57 -0700
committerJianing Wei <jianingwei@google.com>2014-04-10 14:17:57 -0700
commitf816eea8f1604841866e530453f956063af624bd (patch)
treebcd59f7faab196f7b7819825a121a273d08f0374 /tests
parent692231f348076dc98724342e21ac9e67c7b0334e (diff)
downloadhardware_libhardware-f816eea8f1604841866e530453f956063af624bd.zip
hardware_libhardware-f816eea8f1604841866e530453f956063af624bd.tar.gz
hardware_libhardware-f816eea8f1604841866e530453f956063af624bd.tar.bz2
Camera2 test: fix build break due to change in camera service.
Change-Id: If8785df9209c83ccd1454b89b46d5e885f897cae
Diffstat (limited to 'tests')
-rw-r--r--tests/camera2/CameraBurstTests.cpp8
-rw-r--r--tests/camera2/CameraFrameTests.cpp4
-rw-r--r--tests/camera2/CameraMultiStreamTests.cpp4
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/camera2/CameraBurstTests.cpp b/tests/camera2/CameraBurstTests.cpp
index 7301fce..51a6b0e 100644
--- a/tests/camera2/CameraBurstTests.cpp
+++ b/tests/camera2/CameraBurstTests.cpp
@@ -233,8 +233,8 @@ TEST_F(CameraBurstTest, ManualExposureControl) {
ALOGV("Reading capture request %d with exposure %lld", i, exposures[i]);
ASSERT_EQ(OK, mDevice->waitForNextFrame(CAMERA_FRAME_TIMEOUT));
ALOGV("Reading capture request-1 %d", i);
- CameraMetadata frameMetadata;
- ASSERT_EQ(OK, mDevice->getNextFrame(&frameMetadata));
+ CaptureResult result;
+ ASSERT_EQ(OK, mDevice->getNextResult(&result));
ALOGV("Reading capture request-2 %d", i);
ASSERT_EQ(OK, mFrameListener->waitForFrame(CAMERA_FRAME_TIMEOUT));
@@ -645,8 +645,8 @@ TEST_F(CameraBurstTest, VariableBurst) {
ASSERT_EQ(OK, mDevice->waitForNextFrame(waitLimit));
ALOGV("Reading capture request-1 %d", i);
- CameraMetadata frameMetadata;
- ASSERT_EQ(OK, mDevice->getNextFrame(&frameMetadata));
+ CaptureResult result;
+ ASSERT_EQ(OK, mDevice->getNextResult(&result));
ALOGV("Reading capture request-2 %d", i);
ASSERT_EQ(OK, mFrameListener->waitForFrame(CAMERA_FRAME_TIMEOUT));
diff --git a/tests/camera2/CameraFrameTests.cpp b/tests/camera2/CameraFrameTests.cpp
index e78a862..3c5abf7 100644
--- a/tests/camera2/CameraFrameTests.cpp
+++ b/tests/camera2/CameraFrameTests.cpp
@@ -115,8 +115,8 @@ TEST_P(CameraFrameTest, GetFrame) {
ALOGV("Reading capture request %d", i);
ASSERT_EQ(OK, mDevice->waitForNextFrame(CAMERA_FRAME_TIMEOUT));
- CameraMetadata frameMetadata;
- ASSERT_EQ(OK, mDevice->getNextFrame(&frameMetadata));
+ CaptureResult result;
+ ASSERT_EQ(OK, mDevice->getNextResult(&result));
// wait for buffer to be available
ASSERT_EQ(OK, mFrameListener->waitForFrame(CAMERA_FRAME_TIMEOUT));
diff --git a/tests/camera2/CameraMultiStreamTests.cpp b/tests/camera2/CameraMultiStreamTests.cpp
index 75c7139..c7db679 100644
--- a/tests/camera2/CameraMultiStreamTests.cpp
+++ b/tests/camera2/CameraMultiStreamTests.cpp
@@ -380,11 +380,13 @@ public:
waitLimit = exposures[i] * EXP_WAIT_MULTIPLIER;
}
+ CaptureResult result;
CameraMetadata frameMetadata;
int32_t resultRequestId;
do {
ASSERT_EQ(OK, mDevice->waitForNextFrame(waitLimit));
- ASSERT_EQ(OK, mDevice->getNextFrame(&frameMetadata));
+ ASSERT_EQ(OK, mDevice->getNextResult(&result));
+ frameMetadata = result.mMetadata;
camera_metadata_entry_t resultEntry = frameMetadata.find(ANDROID_REQUEST_ID);
ASSERT_EQ(1u, resultEntry.count);