summaryrefslogtreecommitdiffstats
path: root/tests/camera2/CameraBurstTests.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-06-25 18:12:19 -0700
committerEino-Ville Talvala <etalvala@google.com>2013-06-27 18:02:24 -0700
commit4c543a1456cd34a94e2c3a09879aa65ed8cd2f3a (patch)
tree15bf4a8edf1aecdf2bf59b3f88c5ba3e07a923b6 /tests/camera2/CameraBurstTests.cpp
parent1a70c0fd39eed070c2c28fc0731fa689d15931c4 (diff)
downloadhardware_libhardware-4c543a1456cd34a94e2c3a09879aa65ed8cd2f3a.zip
hardware_libhardware-4c543a1456cd34a94e2c3a09879aa65ed8cd2f3a.tar.gz
hardware_libhardware-4c543a1456cd34a94e2c3a09879aa65ed8cd2f3a.tar.bz2
Enable native HAL tests to work for camera3 devices
Change-Id: Ie11270cc8cf301ec94795b595f0517ee3bad2817
Diffstat (limited to 'tests/camera2/CameraBurstTests.cpp')
-rw-r--r--tests/camera2/CameraBurstTests.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/camera2/CameraBurstTests.cpp b/tests/camera2/CameraBurstTests.cpp
index e39970c..5c4b6e7 100644
--- a/tests/camera2/CameraBurstTests.cpp
+++ b/tests/camera2/CameraBurstTests.cpp
@@ -34,7 +34,7 @@
#define CAMERA_EXPOSURE_DOUBLE 2
#define CAMERA_EXPOSURE_DOUBLING_THRESHOLD 1.0f
#define CAMERA_EXPOSURE_DOUBLING_COUNT 4
-#define CAMERA_EXPOSURE_FORMAT HAL_PIXEL_FORMAT_YCrCb_420_SP
+#define CAMERA_EXPOSURE_FORMAT CAMERA_STREAM_AUTO_CPU_FORMAT
#define CAMERA_EXPOSURE_STARTING 100000 // 1/10ms, up to 51.2ms with 10 steps
#if CAMERA_BURST_DEBUGGING
@@ -86,7 +86,7 @@ public:
TEST_EXTENSION_FORKING_TEAR_DOWN;
}
- /* this assumes the format is YUV420sp */
+ /* this assumes the format is YUV420sp or flexible YUV */
long long TotalBrightness(const CpuConsumer::LockedBuffer& imgBuffer,
int *underexposed,
int *overexposed) const {
@@ -170,6 +170,11 @@ TEST_F(CameraBurstTest, ManualExposureControl) {
uint8_t cmOff = static_cast<uint8_t>(ANDROID_CONTROL_MODE_OFF);
ASSERT_EQ(OK, previewRequest.update(ANDROID_CONTROL_MODE,
&cmOff, 1));
+
+ int requestId = 1;
+ ASSERT_EQ(OK, previewRequest.update(ANDROID_REQUEST_ID,
+ &requestId, 1));
+
if (CAMERA_BURST_DEBUGGING) {
int frameCount = 0;
ASSERT_EQ(OK, previewRequest.update(ANDROID_REQUEST_FRAME_COUNT,
@@ -255,4 +260,3 @@ TEST_F(CameraBurstTest, ManualExposureControl) {
}
}
}
-