diff options
author | Chien-Yu Chen <cychen@google.com> | 2014-12-15 23:00:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-15 23:00:18 +0000 |
commit | 6eac9e2f04480e80adca05347ae69919037c968e (patch) | |
tree | 61c748999827befc634605283eb9112b41eea2f1 /services/camera | |
parent | 9f932418856844c6b8242d4c921654d0cc6af754 (diff) | |
parent | 2cec0dfa9f97b87733b8b250b49729fc6bb3a60a (diff) | |
download | frameworks_av-6eac9e2f04480e80adca05347ae69919037c968e.zip frameworks_av-6eac9e2f04480e80adca05347ae69919037c968e.tar.gz frameworks_av-6eac9e2f04480e80adca05347ae69919037c968e.tar.bz2 |
Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/api1/Camera2Client.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api1/Camera2Client.cpp b/services/camera/libcameraservice/api1/Camera2Client.cpp index 6e7824e..dcab4ad 100644 --- a/services/camera/libcameraservice/api1/Camera2Client.cpp +++ b/services/camera/libcameraservice/api1/Camera2Client.cpp @@ -917,6 +917,15 @@ void Camera2Client::stopPreviewL() { ALOGE("%s: Camera %d: Can't stop streaming: %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); } + + // Flush all in-process captures and buffer in order to stop + // preview faster. + res = mDevice->flush(); + if (res != OK) { + ALOGE("%s: Camera %d: Unable to flush pending requests: %s (%d)", + __FUNCTION__, mCameraId, strerror(-res), res); + } + res = mDevice->waitUntilDrained(); if (res != OK) { ALOGE("%s: Camera %d: Waiting to stop streaming failed: %s (%d)", |