summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/device2
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-09-06 09:32:43 -0700
committerEino-Ville Talvala <etalvala@google.com>2013-10-02 18:11:21 -0700
commitf1e98d857ec377f2c9b916073d40732e6ebb7ced (patch)
tree2a435e723f17c0c7b3e6db323d68be6cfb7d5c66 /services/camera/libcameraservice/device2
parentf05e50eb06d3f70e50fa7f44c1fd32128033b49d (diff)
downloadframeworks_av-f1e98d857ec377f2c9b916073d40732e6ebb7ced.zip
frameworks_av-f1e98d857ec377f2c9b916073d40732e6ebb7ced.tar.gz
frameworks_av-f1e98d857ec377f2c9b916073d40732e6ebb7ced.tar.bz2
Camera API 2, Device 2/3: Implement idle and shutter callbacks
- Update callback Binder interface - Rename frameId to be requestId to be consistent and disambiguate from frameNumber. - Implement shutter callback from HAL2/3 notify() - Add in-flight tracking to HAL2 - Add requestId to in-flight tracking - Report requestId from shutter callback - Implement idle callback from HAL3 process_capture_result - Add new idle tracker thread - Update all idle waiting to use the tracker - Add reporting from request thread, all streams to tracker - Remove existing idle waiting infrastructure Bug: 10549462 Change-Id: I867bfc248e3848c50e71527e3561fe92dc037958
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, 8 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp
index fe2cd77..2bc1a8a 100644
--- a/services/camera/libcameraservice/device2/Camera2Device.cpp
+++ b/services/camera/libcameraservice/device2/Camera2Device.cpp
@@ -464,8 +464,10 @@ void Camera2Device::notificationCallback(int32_t msg_type,
listener->notifyError(ext1, ext2, ext3);
break;
case CAMERA2_MSG_SHUTTER: {
- nsecs_t timestamp = (nsecs_t)ext2 | ((nsecs_t)(ext3) << 32 );
- listener->notifyShutter(ext1, timestamp);
+ // TODO: Only needed for camera2 API, which is unsupported
+ // by HAL2 directly.
+ // nsecs_t timestamp = (nsecs_t)ext2 | ((nsecs_t)(ext3) << 32 );
+ // listener->notifyShutter(requestId, timestamp);
break;
}
case CAMERA2_MSG_AUTOFOCUS:
diff --git a/services/camera/libcameraservice/device2/Camera2Device.h b/services/camera/libcameraservice/device2/Camera2Device.h
index 2aa22a2..1f53c56 100644
--- a/services/camera/libcameraservice/device2/Camera2Device.h
+++ b/services/camera/libcameraservice/device2/Camera2Device.h
@@ -28,6 +28,10 @@ namespace android {
/**
* CameraDevice for HAL devices with version CAMERA_DEVICE_API_VERSION_2_0
+ *
+ * TODO for camera2 API implementation:
+ * Does not produce notifyShutter / notifyIdle callbacks to NotificationListener
+ * Use waitUntilDrained for idle.
*/
class Camera2Device: public CameraDeviceBase {
public: