diff options
author | Chien-Yu Chen <cychen@google.com> | 2014-12-16 01:53:39 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-16 01:53:39 +0000 |
commit | 045513fc55cd500225071c11b06e1f4bb133681f (patch) | |
tree | 9f335db2eec74d16d2eeabfc7af4425f6a4939f3 /services/camera | |
parent | d1f0f143fecd65c0987691fd33ee3975708479ec (diff) | |
parent | 0fd52ac2929f6ded984cc3a063645d65b5e2006f (diff) | |
download | frameworks_av-045513fc55cd500225071c11b06e1f4bb133681f.zip frameworks_av-045513fc55cd500225071c11b06e1f4bb133681f.tar.gz frameworks_av-045513fc55cd500225071c11b06e1f4bb133681f.tar.bz2 |
am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev
* commit '0fd52ac2929f6ded984cc3a063645d65b5e2006f':
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 60939f9..0ed5586 100644 --- a/services/camera/libcameraservice/api1/Camera2Client.cpp +++ b/services/camera/libcameraservice/api1/Camera2Client.cpp @@ -918,6 +918,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)", |