DescriptionRejigger audio capture pipeline to work with separate main+worker threads (Mac).
The audio capture pipeline (specifically: WebContentsAudioInputStream, VirtualAudio[In|Out]putStream, and FakeAudioConsumer) was implemented under the assumption that the thread pumping audio data was the same as the thread invoking Open/Start/Stop/Close. This assumption was correct until SVN rev 204130 (https://codereview.chromium.org/14273018/), where these tasks were split across two separate threads.
This change restores functionality by utilizing the same design assumptions as the normal, "non-virtual" input/output stream implementations. Data pumping is assumed to occur by one thread, and the implementation must block the control thread on a call to Stop() and not return from Stop() until the data pumping has ceased.
Augmented VirtualAudioInputStream unit testing to run all tests under the one-thread (non-Mac platforms) versus two-thread (Mac only) scenario.
BUG=249089
TEST=media_unittests, content_unittests, manual confirmation
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207105
Patch Set 1 : #Patch Set 2 : Replace WaitableEvents with Worker class + locks. #Patch Set 3 : Replace use of scoped_refptr<Worker> with simple DeleteSoon() scheme. #Messages
Total messages: 10 (0 generated)
|