diff options
author | Jianing Wei <jianingwei@google.com> | 2014-04-21 20:43:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-21 20:43:53 +0000 |
commit | e7ec24c9934c98a451e986a07651992df7fe6558 (patch) | |
tree | 08fb49483a4768b6ced305302d63ce217d80ecdf /services/camera/libcameraservice/device3 | |
parent | 106b83d2447d3209d12fdc05215b965e05c5efea (diff) | |
parent | 3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9 (diff) | |
download | frameworks_av-e7ec24c9934c98a451e986a07651992df7fe6558.zip frameworks_av-e7ec24c9934c98a451e986a07651992df7fe6558.tar.gz frameworks_av-e7ec24c9934c98a451e986a07651992df7fe6558.tar.bz2 |
Merge "CameraService: fix waitUntilIdle bug revealed by TestingCamera2."
Diffstat (limited to 'services/camera/libcameraservice/device3')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index 31dc103..729020b 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -1751,13 +1751,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; @@ -1891,13 +1892,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; |