diff options
author | Chien-Yu Chen <cychen@google.com> | 2014-12-16 02:02:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-16 02:02:33 +0000 |
commit | 667d3ea42b3557f90d7d2a7638d2575db0b13470 (patch) | |
tree | 1af067c29945d6b1e0f492c55f924bf989757137 | |
parent | abb627e4e971e134e1618d9fb602f23696717c6a (diff) | |
parent | 045513fc55cd500225071c11b06e1f4bb133681f (diff) | |
download | frameworks_av-667d3ea42b3557f90d7d2a7638d2575db0b13470.zip frameworks_av-667d3ea42b3557f90d7d2a7638d2575db0b13470.tar.gz frameworks_av-667d3ea42b3557f90d7d2a7638d2575db0b13470.tar.bz2 |
am 045513fc: am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev
* commit '045513fc55cd500225071c11b06e1f4bb133681f':
Camera2Client: flush requests in stopPreviewL
-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)", |