summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/camera2/StreamingProcessor.cpp
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-05-21 11:38:49 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-22 17:30:23 +0000
commit82db9e6126812dd2ee74e33e4c475cae2c7e48f6 (patch)
tree78bf55cea9028079fde7993069538d446fe8a3d2 /services/camera/libcameraservice/camera2/StreamingProcessor.cpp
parentf21daf4718bbd5662eae843f5a56e039bd34a2f4 (diff)
downloadframeworks_av-82db9e6126812dd2ee74e33e4c475cae2c7e48f6.zip
frameworks_av-82db9e6126812dd2ee74e33e4c475cae2c7e48f6.tar.gz
frameworks_av-82db9e6126812dd2ee74e33e4c475cae2c7e48f6.tar.bz2
camera3: Fix recording failure when switching resolutions while preview on
Bug: 9069574 Change-Id: Ife2ae5467f799dbe37e66714b3a6c9a51e1fe328
Diffstat (limited to 'services/camera/libcameraservice/camera2/StreamingProcessor.cpp')
-rw-r--r--services/camera/libcameraservice/camera2/StreamingProcessor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/camera2/StreamingProcessor.cpp b/services/camera/libcameraservice/camera2/StreamingProcessor.cpp
index ab83714..f4a9217 100644
--- a/services/camera/libcameraservice/camera2/StreamingProcessor.cpp
+++ b/services/camera/libcameraservice/camera2/StreamingProcessor.cpp
@@ -316,7 +316,13 @@ status_t StreamingProcessor::updateRecordingStream(const Parameters &params) {
currentHeight != (uint32_t)params.videoHeight) {
// TODO: Should wait to be sure previous recording has finished
res = device->deleteStream(mRecordingStreamId);
- if (res != OK) {
+
+ if (res == -EBUSY) {
+ ALOGV("%s: Camera %d: Device is busy, call "
+ "updateRecordingStream after it becomes idle",
+ __FUNCTION__, mId);
+ return res;
+ } else if (res != OK) {
ALOGE("%s: Camera %d: Unable to delete old output stream "
"for recording: %s (%d)", __FUNCTION__,
mId, strerror(-res), res);