Iliyan Malchev 32b7f2804e libcamera: avoid a race condition on starting and stopping a recording
precondition: preview is running
-- call startRecording()
-- a preview frame arrives, causing the record callback to be called, and then
   blocks on mRecordWait.wait()
-- call stopRecording(), which sets mReleasedRecordingFrame and signals
   mRecordWait;
-- call startRecording(), which clears mReleasedRecordingFrame;
-- receivePreviewFrame() wakes up, checks mReleasedRecordingFrame, and
   blocks again on mRecordWait.wait(), without having notified the client.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-06-10 18:40:32 -07:00
..