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

Issue 14273018: Use the browser UI thread for audio on OSX. (Closed)

Created:
7 years, 8 months ago by DaleCurtis
Modified:
7 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, sail+watch_chromium.org
Visibility:
Public.

Description

Use the browser UI thread for audio on OSX. After months of attempted workarounds, there appears no avenue left except to move CoreAudio calls onto the main thread. Sadly that turns out to be the UI thread. This CL swaps the message loop normally used by AudioManagerBase with a pointer to the message loop on which the audio manager is created (the UI loop in Chrome). The audio thread used by Chrome is spun up on demand if a class asks for it. Currently only Tab Audio capture will use this thread. BUG=158170 TEST=No more crashes. miu manually tested tab capture. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204130

Patch Set 1 : Tracing. #

Patch Set 2 : Keep the worker thread. #

Patch Set 3 : Fix device listener. #

Total comments: 20

Patch Set 4 : Comments. #

Patch Set 5 : Rebase. #

Patch Set 6 : Fix test failures. #

Total comments: 5

Patch Set 7 : Really fix tests. #

Total comments: 4

Patch Set 8 : Comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -293 lines) Patch
M chrome/browser/notifications/notification_audio_controller_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/test/webrtc_audio_device_test.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M media/audio/audio_input_controller.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/audio/audio_input_controller.cc View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M media/audio/audio_manager.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M media/audio/audio_manager_base.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/audio_manager_base.cc View 1 2 3 4 5 6 7 4 chunks +34 lines, -14 lines 0 comments Download
M media/audio/mac/audio_device_listener_mac.h View 1 2 chunks +2 lines, -33 lines 0 comments Download
M media/audio/mac/audio_device_listener_mac.cc View 6 chunks +13 lines, -180 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 2 3 4 5 6 2 chunks +12 lines, -9 lines 0 comments Download
M media/audio/mock_audio_manager.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/mock_audio_manager.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/media_switches.h View 1 2 3 4 1 chunk +20 lines, -19 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 1 chunk +37 lines, -31 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
DaleCurtis
7 years, 6 months ago (2013-05-31 01:30:42 UTC) #1
DaleCurtis
+miu for WebContents changes. I don't think that particular code section is covered by any ...
7 years, 6 months ago (2013-05-31 01:32:14 UTC) #2
jam
lgtm
7 years, 6 months ago (2013-05-31 07:18:03 UTC) #3
scherkus (not reviewing)
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { when would this be NULL? https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode61 media/audio/audio_manager_base.cc:61: ...
7 years, 6 months ago (2013-05-31 19:30:34 UTC) #4
DaleCurtis
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/05/31 19:30:35, scherkus wrote: > when ...
7 years, 6 months ago (2013-06-03 19:51:10 UTC) #5
miu
lgtm Thanks for taking care of making sure tab audio capture had its own thread.
7 years, 6 months ago (2013-06-03 21:48:41 UTC) #6
scherkus (not reviewing)
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/03 19:51:10, DaleCurtis wrote: > On ...
7 years, 6 months ago (2013-06-03 22:04:28 UTC) #7
DaleCurtis
No changes, just comments. https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/03 22:04:28, ...
7 years, 6 months ago (2013-06-03 22:26:35 UTC) #8
DaleCurtis
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/03 22:26:35, DaleCurtis wrote: > On ...
7 years, 6 months ago (2013-06-03 22:59:28 UTC) #9
scherkus (not reviewing)
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/03 22:26:35, DaleCurtis wrote: > On ...
7 years, 6 months ago (2013-06-03 23:22:17 UTC) #10
scherkus (not reviewing)
oh, and lgtm
7 years, 6 months ago (2013-06-03 23:22:38 UTC) #11
scherkus (not reviewing)
On 2013/06/03 23:22:38, scherkus wrote: > oh, and lgtm food for thought: this is a ...
7 years, 6 months ago (2013-06-03 23:59:04 UTC) #12
DaleCurtis
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/03 23:22:18, scherkus wrote: > On ...
7 years, 6 months ago (2013-06-04 00:15:17 UTC) #13
scherkus (not reviewing)
https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/20001/media/audio/audio_manager_base.cc#newcode55 media/audio/audio_manager_base.cc:55: base::MessageLoopProxy::current()) { On 2013/06/04 00:15:17, DaleCurtis wrote: > On ...
7 years, 6 months ago (2013-06-04 00:21:30 UTC) #14
DaleCurtis
crogers: Any comments?
7 years, 6 months ago (2013-06-04 00:41:19 UTC) #15
Chris Rogers
Thanks Dale, lgtm -- you can choose to ignore or incorporate the suggestion below https://codereview.chromium.org/14273018/diff/35007/media/audio/audio_manager_base.cc ...
7 years, 6 months ago (2013-06-04 19:16:51 UTC) #16
DaleCurtis
Thanks for review everyone! https://codereview.chromium.org/14273018/diff/35007/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/14273018/diff/35007/media/audio/audio_manager_base.cc#newcode89 media/audio/audio_manager_base.cc:89: #elif defined(OS_MACOSX) On 2013/06/04 19:16:52, ...
7 years, 6 months ago (2013-06-04 20:03:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/14273018/49016
7 years, 6 months ago (2013-06-04 20:03:38 UTC) #18
commit-bot: I haz the power
7 years, 6 months ago (2013-06-05 02:36:55 UTC) #19
Message was sent while issue was closed.
Change committed as 204130

Powered by Google App Engine
This is Rietveld 408576698