summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-04-23 16:16:35 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-23 16:16:36 +0000
commit5e43772296d7c5b8faf4b0ce4efe68778729bc74 (patch)
tree04981446dbcee38febeaa1b69e3a0c9a3211adc4 /services
parent4613b7e38b1830535cbf00e962afdfa5fe1308ba (diff)
parentcc8d4f8f280dfdcc76df4f18f63e7f9c21684455 (diff)
downloadframeworks_av-5e43772296d7c5b8faf4b0ce4efe68778729bc74.zip
frameworks_av-5e43772296d7c5b8faf4b0ce4efe68778729bc74.tar.gz
frameworks_av-5e43772296d7c5b8faf4b0ce4efe68778729bc74.tar.bz2
Merge "Camera3: Register all stream buffers at stream configuration time." into jb-mr2-dev
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/Camera3Device.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/Camera3Device.cpp b/services/camera/libcameraservice/Camera3Device.cpp
index d67b535..1433108 100644
--- a/services/camera/libcameraservice/Camera3Device.cpp
+++ b/services/camera/libcameraservice/Camera3Device.cpp
@@ -907,6 +907,28 @@ status_t Camera3Device::configureStreamsLocked() {
return res;
}
+ // Finish all stream configuration immediately.
+ // TODO: Try to relax this later back to lazy completion, which should be
+ // faster
+
+ if (mInputStream != NULL) {
+ res = mInputStream->finishConfiguration(mHal3Device);
+ if (res != OK) {
+ SET_ERR_L("Can't finish configuring input stream %d: %s (%d)",
+ mInputStream->getId(), strerror(-res), res);
+ return res;
+ }
+ }
+
+ 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;
+ }
+ }
+
// Request thread needs to know to avoid using repeat-last-settings protocol
// across configure_streams() calls
mRequestThread->configurationComplete();