Merge "Camera: Decrease latency when joining sequencer thread"

gugelfrei
TreeHugger Robot 5 years ago committed by Android (Google) Code Review
commit b4235aabf3

@ -265,7 +265,7 @@ CaptureSequencer::CaptureState CaptureSequencer::manageIdle(
Mutex::Autolock l(mInputMutex);
while (!mStartCapture) {
res = mStartCaptureSignal.waitRelative(mInputMutex,
kWaitDuration);
kIdleWaitDuration);
if (res == TIMED_OUT) break;
}
if (mStartCapture) {

@ -111,6 +111,7 @@ class CaptureSequencer:
* 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

Loading…
Cancel
Save