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/api2 | |
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/api2')
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index 86f82a3..80c797a 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp @@ -254,9 +254,17 @@ status_t CameraDeviceClient::beginConfigure() { } status_t CameraDeviceClient::endConfigure() { - // TODO: Implement this. - ALOGE("%s: Not implemented yet.", __FUNCTION__); - return OK; + ALOGV("%s: ending configure (%zu streams)", + __FUNCTION__, mStreamMap.size()); + + status_t res; + if ( (res = checkPid(__FUNCTION__) ) != OK) return res; + + Mutex::Autolock icl(mBinderSerializationLock); + + if (!mDevice.get()) return DEAD_OBJECT; + + return mDevice->configureStreams(); } status_t CameraDeviceClient::deleteStream(int streamId) { |