commit | b4235aabf383c9ea3e5bcaddcab37d69b4cb6d44 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Thu Nov 07 17:18:31 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Nov 07 17:18:31 2019 +0000 |
tree | 6b6ecfa3475471c5f91a1b6b9a21b8c4510fb77c | |
parent | efe567a24ba2a171782c20ce2aa4c773c78fc798 [diff] | |
parent | 039b9e940fc575861e6cd652105b0c3a36a1d574 [diff] |
Merge "Camera: Decrease latency when joining sequencer thread"
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp index 88799f9..0c01a91 100644 --- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp
@@ -265,7 +265,7 @@ Mutex::Autolock l(mInputMutex); while (!mStartCapture) { res = mStartCaptureSignal.waitRelative(mInputMutex, - kWaitDuration); + kIdleWaitDuration); if (res == TIMED_OUT) break; } if (mStartCapture) {
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.h b/services/camera/libcameraservice/api1/client2/CaptureSequencer.h index 727dd53..9475a39 100644 --- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.h +++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.h
@@ -111,6 +111,7 @@ * Internal to CaptureSequencer */ static const nsecs_t kWaitDuration = 100000000; // 100 ms + static const nsecs_t kIdleWaitDuration = 10000000; // 10 ms static const int kMaxTimeoutsForPrecaptureStart = 10; // 1 sec static const int kMaxTimeoutsForPrecaptureEnd = 20; // 2 sec static const int kMaxTimeoutsForCaptureEnd = 40; // 4 sec