summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/device3/Camera3Device.cpp
diff options
context:
space:
mode:
authorJianing Wei <jianingwei@google.com>2014-04-21 11:34:34 -0700
committerJianing Wei <jianingwei@google.com>2014-04-21 11:34:34 -0700
commit3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9 (patch)
treea316962310eaa4fd603c88ec6149eeb0cab16e76 /services/camera/libcameraservice/device3/Camera3Device.cpp
parent77d4f613bbed8b646c8ddade6a0737fcbd391b07 (diff)
downloadframeworks_av-3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9.zip
frameworks_av-3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9.tar.gz
frameworks_av-3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9.tar.bz2
CameraService: fix waitUntilIdle bug revealed by TestingCamera2.
* clear mStreamingRequestList in flush * fix frame number checker in notify and processCaptureResult Bug: 14166437 Change-Id: I022421080d05138f9068c1b9b85d83bd613b04fb
Diffstat (limited to 'services/camera/libcameraservice/device3/Camera3Device.cpp')
-rw-r--r--services/camera/libcameraservice/device3/Camera3Device.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
index f965136..25e97f3 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
@@ -1749,13 +1749,14 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) {
gotResult = true;
- if (frameNumber != mNextResultFrameNumber) {
+ // TODO: need to track errors for tighter bounds on expected frame number
+ if (frameNumber < mNextResultFrameNumber) {
SET_ERR("Out-of-order capture result metadata submitted! "
"(got frame number %d, expecting %d)",
frameNumber, mNextResultFrameNumber);
return;
}
- mNextResultFrameNumber++;
+ mNextResultFrameNumber = frameNumber + 1;
CaptureResult captureResult;
captureResult.mResultExtras = resultExtras;
@@ -1889,13 +1890,14 @@ void Camera3Device::notify(const camera3_notify_msg *msg) {
// Verify ordering of shutter notifications
{
Mutex::Autolock l(mOutputLock);
- if (frameNumber != mNextShutterFrameNumber) {
+ // TODO: need to track errors for tighter bounds on expected frame number.
+ if (frameNumber < mNextShutterFrameNumber) {
SET_ERR("Shutter notification out-of-order. Expected "
"notification for frame %d, got frame %d",
mNextShutterFrameNumber, frameNumber);
break;
}
- mNextShutterFrameNumber++;
+ mNextShutterFrameNumber = frameNumber + 1;
}
CaptureResultExtras resultExtras;