summaryrefslogtreecommitdiff
path: root/camera/device/3.2/default/CameraDevice.cpp
diff options
context:
space:
mode:
authorYin-Chia Yeh <yinchiayeh@google.com>2017-03-06 14:14:17 -0800
committerYin-Chia Yeh <yinchiayeh@google.com>2017-03-19 21:36:49 -0700
commitbed3a9473e43030d98678e14e4e4cc69dae41a6f (patch)
tree950d9e71e9944c80d5bbad5f179220bd9d7a0ca7 /camera/device/3.2/default/CameraDevice.cpp
parentaf5b837f6fc9d0ee08b7f8b7920a1603ccc323ad (diff)
Camera: add batching support
Currently only batching high speed recording request/results. Test: GCA slow motion recording working Bug: 34899394 Change-Id: Id83b9d1cefe011391c86a5e7e898262a169cc9e7
Diffstat (limited to 'camera/device/3.2/default/CameraDevice.cpp')
-rw-r--r--camera/device/3.2/default/CameraDevice.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/camera/device/3.2/default/CameraDevice.cpp b/camera/device/3.2/default/CameraDevice.cpp
index 0a457ad91d..a742335548 100644
--- a/camera/device/3.2/default/CameraDevice.cpp
+++ b/camera/device/3.2/default/CameraDevice.cpp
@@ -229,7 +229,18 @@ Return<void> CameraDevice::open(const sp<ICameraDeviceCallback>& callback, open_
return Void();
}
- session = new CameraDeviceSession(device, callback);
+ struct camera_info info;
+ res = mModule->getCameraInfo(mCameraIdInt, &info);
+ if (res != OK) {
+ ALOGE("%s: Could not open camera: getCameraInfo failed", __FUNCTION__);
+ device->common.close(&device->common);
+ mLock.unlock();
+ _hidl_cb(Status::ILLEGAL_ARGUMENT, nullptr);
+ return Void();
+ }
+
+ session = new CameraDeviceSession(
+ device, info.static_camera_characteristics, callback);
if (session == nullptr) {
ALOGE("%s: camera device session allocation failed", __FUNCTION__);
mLock.unlock();