diff options
author | Igor Murashkin <iam@google.com> | 2014-08-19 16:19:59 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2014-08-20 20:58:57 +0000 |
commit | e2d167eb689d7a536805f950c31f11b9e9c578ae (patch) | |
tree | 8ef8aef0adfb4ad847d5031468dd6193acf6610d /services/camera/libcameraservice/device2 | |
parent | e0b5cf7eae5ae16699864eeb8ae36975caa7a26c (diff) | |
download | frameworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.zip frameworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.tar.gz frameworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.tar.bz2 |
camera: Configure streams immediately when API2 does configuration
This makes the configuration more eager (no more waiting until the first
request) and also allows any errors to immediately be sent back to the
client.
Bug: 16629195
Change-Id: I0c365bc8f760466916dcc089217a43c43f9f4c9d
Diffstat (limited to 'services/camera/libcameraservice/device2')
-rw-r--r-- | services/camera/libcameraservice/device2/Camera2Device.cpp | 13 | ||||
-rw-r--r-- | services/camera/libcameraservice/device2/Camera2Device.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp index d473a76..8caadd6 100644 --- a/services/camera/libcameraservice/device2/Camera2Device.cpp +++ b/services/camera/libcameraservice/device2/Camera2Device.cpp @@ -415,6 +415,19 @@ status_t Camera2Device::deleteReprocessStream(int id) { return OK; } +status_t Camera2Device::configureStreams() { + ATRACE_CALL(); + ALOGV("%s: E", __FUNCTION__); + + /** + * HAL2 devices do not need to configure streams; + * streams are created on the fly. + */ + ALOGW("%s: No-op for HAL2 devices", __FUNCTION__); + + return OK; +} + status_t Camera2Device::createDefaultRequest(int templateId, CameraMetadata *request) { diff --git a/services/camera/libcameraservice/device2/Camera2Device.h b/services/camera/libcameraservice/device2/Camera2Device.h index d0ca46e..2a3f1d9 100644 --- a/services/camera/libcameraservice/device2/Camera2Device.h +++ b/services/camera/libcameraservice/device2/Camera2Device.h @@ -64,6 +64,8 @@ class Camera2Device: public CameraDeviceBase { virtual status_t setStreamTransform(int id, int transform); virtual status_t deleteStream(int id); virtual status_t deleteReprocessStream(int id); + // No-op on HAL2 devices + virtual status_t configureStreams(); virtual status_t createDefaultRequest(int templateId, CameraMetadata *request); virtual status_t waitUntilDrained(); virtual status_t setNotifyCallback(NotificationListener *listener); |