Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Issue 17122006: Rejigger audio capture pipeline to work with separate main+worker threads (Mac). (Closed)

Created:
7 years, 6 months ago by miu
Modified:
7 years, 6 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Rejigger 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -131 lines) Patch
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/web_contents_audio_input_stream.h View 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/web_contents_audio_input_stream.cc View 15 chunks +21 lines, -21 lines 0 comments Download
M content/browser/renderer_host/media/web_contents_audio_input_stream_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M media/audio/fake_audio_consumer.h View 1 2 2 chunks +18 lines, -26 lines 0 comments Download
M media/audio/fake_audio_consumer.cc View 1 2 2 chunks +121 lines, -20 lines 0 comments Download
M media/audio/fake_audio_consumer_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/virtual_audio_input_stream.h View 1 5 chunks +17 lines, -7 lines 0 comments Download
M media/audio/virtual_audio_input_stream.cc View 1 5 chunks +33 lines, -17 lines 0 comments Download
M media/audio/virtual_audio_input_stream_unittest.cc View 11 chunks +29 lines, -9 lines 0 comments Download
M media/audio/virtual_audio_output_stream.h View 4 chunks +3 lines, -6 lines 0 comments Download
M media/audio/virtual_audio_output_stream.cc View 1 3 chunks +18 lines, -15 lines 0 comments Download
M media/audio/virtual_audio_output_stream_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
miu
Dale, Please review Patch Set 2 as a candidate for commit. Patch Set 1 is ...
7 years, 6 months ago (2013-06-15 04:38:17 UTC) #1
miu
Hey Dale, Hold off on the review. Or, go ahead and review, but note I'm ...
7 years, 6 months ago (2013-06-17 19:33:55 UTC) #2
DaleCurtis
FYI, there's base::ThreadRestrictions which has a ScopedAllowWait() method, we just need to talk to jam@ ...
7 years, 6 months ago (2013-06-17 19:50:36 UTC) #3
DaleCurtis
Also, feel free to iterate, but remember that if dev channel still shows crashes i'll ...
7 years, 6 months ago (2013-06-17 19:51:21 UTC) #4
miu
On 2013/06/17 19:51:21, DaleCurtis wrote: > Also, feel free to iterate, but remember that if ...
7 years, 6 months ago (2013-06-18 01:43:05 UTC) #5
miu
On 2013/06/18 01:43:05, Yuri wrote: > I'd prefer we proceed anyway, if that's okay with ...
7 years, 6 months ago (2013-06-18 01:47:51 UTC) #6
DaleCurtis
lgtm
7 years, 6 months ago (2013-06-18 19:27:19 UTC) #7
miu
On 2013/06/18 19:27:19, DaleCurtis wrote: > lgtm Thanks! :)
7 years, 6 months ago (2013-06-18 20:05:48 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/17122006/20001
7 years, 6 months ago (2013-06-18 20:06:13 UTC) #9
commit-bot: I haz the power
7 years, 6 months ago (2013-06-18 23:10:59 UTC) #10
Message was sent while issue was closed.
Change committed as 207105

Powered by Google App Engine
This is Rietveld 408576698