summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-05-06 03:18:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-06 03:18:23 +0000
commit41af583462d06aeac417567d08d10d21a484aa00 (patch)
tree3795c4d7919cd0c90a3350ca435258fe4e00ae6d /services
parenta6560120f96685d7929d535319198485d1d5ccdf (diff)
parent073f8570d8404b6d1ea3a1bd34954c6332ba991a (diff)
downloadframeworks_av-41af583462d06aeac417567d08d10d21a484aa00.zip
frameworks_av-41af583462d06aeac417567d08d10d21a484aa00.tar.gz
frameworks_av-41af583462d06aeac417567d08d10d21a484aa00.tar.bz2
Merge "camera3: Don't eagerly finish configuring bidi streams more than once" into jb-mr2-dev
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/Camera3Device.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/services/camera/libcameraservice/Camera3Device.cpp b/services/camera/libcameraservice/Camera3Device.cpp
index 5f87e8b..5e5bfc2 100644
--- a/services/camera/libcameraservice/Camera3Device.cpp
+++ b/services/camera/libcameraservice/Camera3Device.cpp
@@ -1060,7 +1060,7 @@ status_t Camera3Device::configureStreamsLocked() {
// TODO: Try to relax this later back to lazy completion, which should be
// faster
- if (mInputStream != NULL) {
+ if (mInputStream != NULL && mInputStream->isConfiguring()) {
res = mInputStream->finishConfiguration(mHal3Device);
if (res != OK) {
SET_ERR_L("Can't finish configuring input stream %d: %s (%d)",
@@ -1070,11 +1070,15 @@ status_t Camera3Device::configureStreamsLocked() {
}
for (size_t i = 0; i < mOutputStreams.size(); i++) {
- res = mOutputStreams.editValueAt(i)->finishConfiguration(mHal3Device);
- if (res != OK) {
- SET_ERR_L("Can't finish configuring output stream %d: %s (%d)",
- mOutputStreams[i]->getId(), strerror(-res), res);
- return res;
+ sp<Camera3OutputStreamInterface> outputStream =
+ mOutputStreams.editValueAt(i);
+ if (outputStream->isConfiguring()) {
+ res = outputStream->finishConfiguration(mHal3Device);
+ if (res != OK) {
+ SET_ERR_L("Can't finish configuring output stream %d: %s (%d)",
+ outputStream->getId(), strerror(-res), res);
+ return res;
+ }
}
}