diff options
author | Chien-Yu Chen <cychen@google.com> | 2014-12-16 00:54:24 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-16 00:54:24 +0000 |
commit | 0fd52ac2929f6ded984cc3a063645d65b5e2006f (patch) | |
tree | 61c748999827befc634605283eb9112b41eea2f1 /services/camera | |
parent | 42818cca55fa4e4faca5b5686c7930070c2bf434 (diff) | |
parent | 6eac9e2f04480e80adca05347ae69919037c968e (diff) | |
download | frameworks_av-0fd52ac2929f6ded984cc3a063645d65b5e2006f.zip frameworks_av-0fd52ac2929f6ded984cc3a063645d65b5e2006f.tar.gz frameworks_av-0fd52ac2929f6ded984cc3a063645d65b5e2006f.tar.bz2 |
am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev
* commit '6eac9e2f04480e80adca05347ae69919037c968e':
Camera2Client: flush requests in stopPreviewL
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)", |