summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/device2
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-07-14 17:09:23 -0700
committerZhijun He <zhijunhe@google.com>2014-07-16 15:27:17 -0700
commit204e3295e2814052aef7e45ee9edd60128efbbd0 (patch)
tree1110e6c06e489c9c2003398e1768b9194effee78 /services/camera/libcameraservice/device2
parent671160ffe81592efa376dc1ff0fc3f4ddcdebc35 (diff)
downloadframeworks_av-204e3295e2814052aef7e45ee9edd60128efbbd0.zip
frameworks_av-204e3295e2814052aef7e45ee9edd60128efbbd0.tar.gz
frameworks_av-204e3295e2814052aef7e45ee9edd60128efbbd0.tar.bz2
Camera HAL3: migrate from partial quirks to partial result
- Enable the normal partial result path for HAL3.2, the quirk is only used for the HAL version lower than HAL3.2. The partial quirks is no longer supported for HAL3.2 or higher versions. - Add CameraDeviceBase getDeviceVersion API. - Fix some build warnings Change-Id: I7a1b03d4d5fd5258d2addfba4368bee2ba691337
Diffstat (limited to 'services/camera/libcameraservice/device2')
-rw-r--r--services/camera/libcameraservice/device2/Camera2Device.cpp6
-rw-r--r--services/camera/libcameraservice/device2/Camera2Device.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp
index c33c166..89c6b10 100644
--- a/services/camera/libcameraservice/device2/Camera2Device.cpp
+++ b/services/camera/libcameraservice/device2/Camera2Device.cpp
@@ -123,6 +123,7 @@ status_t Camera2Device::initialize(camera_module_t *module)
mDeviceInfo = info.static_camera_characteristics;
mHal2Device = device;
+ mDeviceVersion = device->common.version;
return OK;
}
@@ -589,6 +590,11 @@ status_t Camera2Device::flush(int64_t* /*lastFrameNumber*/) {
return waitUntilDrained();
}
+uint32_t Camera2Device::getDeviceVersion() {
+ ATRACE_CALL();
+ return mDeviceVersion;
+}
+
/**
* Camera2Device::MetadataQueue
*/
diff --git a/services/camera/libcameraservice/device2/Camera2Device.h b/services/camera/libcameraservice/device2/Camera2Device.h
index 22a13ac..46182f8 100644
--- a/services/camera/libcameraservice/device2/Camera2Device.h
+++ b/services/camera/libcameraservice/device2/Camera2Device.h
@@ -78,12 +78,16 @@ class Camera2Device: public CameraDeviceBase {
buffer_handle_t *buffer, wp<BufferReleasedListener> listener);
// Flush implemented as just a wait
virtual status_t flush(int64_t *lastFrameNumber = NULL);
+ virtual uint32_t getDeviceVersion();
+
private:
const int mId;
camera2_device_t *mHal2Device;
CameraMetadata mDeviceInfo;
+ uint32_t mDeviceVersion;
+
/**
* Queue class for both sending requests to a camera2 device, and for
* receiving frames from a camera2 device.