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

Issue 1097553003: Switch to STA mode for audio thread and WASAPI I/O streams. (Closed)

Created:
5 years, 8 months ago by DaleCurtis
Modified:
5 years, 8 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
http://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch to STA mode for audio thread and WASAPI I/O streams. Using COM marshalling to share necessary worker thread pointers with the render and capture threads. BUG=422522 TEST=all unit tests pass, audio input and output work. Committed: https://crrev.com/43f3b0d25752d924390a4d6fc868d6e9469edc4f Cr-Commit-Position: refs/heads/master@{#326360}

Patch Set 1 #

Patch Set 2 : Fix comments. #

Patch Set 3 : Revert VideoCapture thread change. #

Patch Set 4 : Test fixes. #

Patch Set 5 : Fix test. #

Total comments: 7

Patch Set 6 : Comments. #

Total comments: 14

Patch Set 7 : Simplify. #

Total comments: 21

Patch Set 8 : Comments. #

Total comments: 5

Patch Set 9 : Fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -171 lines) Patch
M media/audio/audio_input_volume_unittest.cc View 1 2 3 4 5 6 2 chunks +8 lines, -14 lines 0 comments Download
M media/audio/audio_manager.cc View 1 2 3 4 2 chunks +14 lines, -1 line 0 comments Download
M media/audio/audio_manager_base.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M media/audio/audio_manager_unittest.cc View 1 2 3 2 chunks +3 lines, -15 lines 0 comments Download
M media/audio/win/audio_device_listener_win_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win.h View 1 2 3 4 5 6 7 8 3 chunks +22 lines, -5 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win.cc View 1 2 3 4 5 6 7 8 9 chunks +43 lines, -9 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win_unittest.cc View 1 2 3 10 chunks +42 lines, -46 lines 0 comments Download
M media/audio/win/audio_low_latency_output_win.h View 1 2 3 4 5 6 7 8 5 chunks +28 lines, -3 lines 0 comments Download
M media/audio/win/audio_low_latency_output_win.cc View 1 2 3 4 5 6 7 8 12 chunks +96 lines, -11 lines 0 comments Download
M media/audio/win/audio_low_latency_output_win_unittest.cc View 1 2 3 13 chunks +49 lines, -50 lines 0 comments Download
M media/audio/win/audio_manager_win.h View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M media/audio/win/audio_output_win_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/win/core_audio_util_win.cc View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M media/audio/win/core_audio_util_win_unittest.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M media/audio/win/device_enumeration_win.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 36 (6 generated)
DaleCurtis
Per discussion via chat with Tommi, lets see if this doesn't blow up the world ...
5 years, 8 months ago (2015-04-16 21:33:05 UTC) #2
DaleCurtis
+mcasas since I needed to revert the MediaStreamManager changes to avoid race conditions in the ...
5 years, 8 months ago (2015-04-17 01:23:51 UTC) #6
DaleCurtis
Actually, I think that failure may be the test having too high of expectations. The ...
5 years, 8 months ago (2015-04-17 02:20:29 UTC) #7
henrika (OOO until Aug 14)
Wow, impressive work. I will run tests locally on my machine and report back. LGTM ...
5 years, 8 months ago (2015-04-17 09:16:46 UTC) #8
henrika (OOO until Aug 14)
https://codereview.chromium.org/1097553003/diff/120001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/1097553003/diff/120001/media/audio/audio_manager_base.cc#newcode86 media/audio/audio_manager_base.cc:86: // Do not use MTA mode initalization as it ...
5 years, 8 months ago (2015-04-17 09:17:03 UTC) #9
henrika (OOO until Aug 14)
Regarding the AudioInputVolume test. I could make it timeout without your patch. It failed to ...
5 years, 8 months ago (2015-04-17 10:33:33 UTC) #10
mcasas
https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (left): https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#oldcode1670 content/browser/renderer_host/media/media_stream_manager.cc:1670: // buggy third party Direct Show modules, http://crbug.com/428958. I ...
5 years, 8 months ago (2015-04-17 17:15:56 UTC) #11
DaleCurtis
https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (left): https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#oldcode1670 content/browser/renderer_host/media/media_stream_manager.cc:1670: // buggy third party Direct Show modules, http://crbug.com/428958. On ...
5 years, 8 months ago (2015-04-17 17:58:32 UTC) #12
DaleCurtis
https://codereview.chromium.org/1097553003/diff/120001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://codereview.chromium.org/1097553003/diff/120001/media/audio/audio_manager_base.cc#newcode86 media/audio/audio_manager_base.cc:86: // Do not use MTA mode initalization as it ...
5 years, 8 months ago (2015-04-17 17:58:55 UTC) #13
DaleCurtis
While writing this CL I wondered if ScopedComPtr should use a TheadChecker when receiving objects ...
5 years, 8 months ago (2015-04-17 19:01:55 UTC) #14
mcasas
https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (left): https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#oldcode1670 content/browser/renderer_host/media/media_stream_manager.cc:1670: // buggy third party Direct Show modules, http://crbug.com/428958. On ...
5 years, 8 months ago (2015-04-17 20:23:31 UTC) #15
DaleCurtis
https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (left): https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#oldcode1670 content/browser/renderer_host/media/media_stream_manager.cc:1670: // buggy third party Direct Show modules, http://crbug.com/428958. On ...
5 years, 8 months ago (2015-04-18 01:40:19 UTC) #16
DaleCurtis
https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (left): https://codereview.chromium.org/1097553003/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#oldcode1670 content/browser/renderer_host/media/media_stream_manager.cc:1670: // buggy third party Direct Show modules, http://crbug.com/428958. On ...
5 years, 8 months ago (2015-04-18 02:36:48 UTC) #17
DaleCurtis
tommi: Ping? Let me know if you're too busy digging out of your mailbox and ...
5 years, 8 months ago (2015-04-20 16:32:30 UTC) #18
tommi (sloooow) - chröme
Hey Dale - sorry for the delay. Here's my first set of comments. https://codereview.chromium.org/1097553003/diff/140001/media/audio/win/audio_low_latency_input_win.h File ...
5 years, 8 months ago (2015-04-20 18:23:38 UTC) #19
DaleCurtis
https://codereview.chromium.org/1097553003/diff/140001/media/audio/win/audio_low_latency_input_win.h File media/audio/win/audio_low_latency_input_win.h (right): https://codereview.chromium.org/1097553003/diff/140001/media/audio/win/audio_low_latency_input_win.h#newcode135 media/audio/win/audio_low_latency_input_win.h:135: bool MarshalComPointers(); On 2015/04/20 18:23:37, tommi wrote: > Just ...
5 years, 8 months ago (2015-04-20 18:54:07 UTC) #20
DaleCurtis
Leaving the CoreAudio initializer where it is seems the only sane approach right now. I ...
5 years, 8 months ago (2015-04-20 23:06:10 UTC) #21
DaleCurtis
tommi: Can you take a look today? Thanks!
5 years, 8 months ago (2015-04-22 03:31:13 UTC) #22
tommi (sloooow) - chröme
hey dale - can you ping me if you get through these set of comments ...
5 years, 8 months ago (2015-04-22 10:31:52 UTC) #23
DaleCurtis
https://codereview.chromium.org/1097553003/diff/140001/media/audio/win/audio_low_latency_output_win.cc File media/audio/win/audio_low_latency_output_win.cc (right): https://codereview.chromium.org/1097553003/diff/140001/media/audio/win/audio_low_latency_output_win.cc#newcode287 media/audio/win/audio_low_latency_output_win.cc:287: // TODO(dalecurtis): Do we need a lock on this ...
5 years, 8 months ago (2015-04-22 16:08:24 UTC) #24
DaleCurtis
I'm heading into the office now, but will try to resolve all of these comments ...
5 years, 8 months ago (2015-04-22 16:09:28 UTC) #25
DaleCurtis
Okay, should be good to go. Thanks tommi! https://codereview.chromium.org/1097553003/diff/160001/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/1097553003/diff/160001/media/audio/win/audio_low_latency_input_win.cc#newcode54 media/audio/win/audio_low_latency_input_win.cc:54: com_stream_(NULL), ...
5 years, 8 months ago (2015-04-22 17:48:54 UTC) #26
tommi (sloooow) - chröme
looking pretty good, just some minor comments https://codereview.chromium.org/1097553003/diff/180001/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/1097553003/diff/180001/media/audio/win/audio_low_latency_input_win.cc#newcode380 media/audio/win/audio_low_latency_input_win.cc:380: ScopedComPtr<IAudioCaptureClient> thread_audio_capture_client; ...
5 years, 8 months ago (2015-04-22 18:10:08 UTC) #27
tommi (sloooow) - chröme
lgtm as discussed offline. I'll leave the dchecks up to you.
5 years, 8 months ago (2015-04-22 18:12:19 UTC) #28
DaleCurtis
Switched to a VOID method with CHECKs(). Thanks for review! https://codereview.chromium.org/1097553003/diff/180001/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/1097553003/diff/180001/media/audio/win/audio_low_latency_input_win.cc#newcode380 ...
5 years, 8 months ago (2015-04-22 18:31:47 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1097553003/200001
5 years, 8 months ago (2015-04-22 18:33:31 UTC) #32
commit-bot: I haz the power
Committed patchset #9 (id:200001)
5 years, 8 months ago (2015-04-22 19:42:56 UTC) #33
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/43f3b0d25752d924390a4d6fc868d6e9469edc4f Cr-Commit-Position: refs/heads/master@{#326360}
5 years, 8 months ago (2015-04-22 19:43:52 UTC) #34
DaleCurtis
A revert of this CL (patchset #9 id:200001) has been created in https://codereview.chromium.org/1111503003/ by dalecurtis@chromium.org. ...
5 years, 8 months ago (2015-04-27 20:20:33 UTC) #35
henrika (OOO until Aug 14)
5 years, 8 months ago (2015-04-28 07:16:01 UTC) #36
Message was sent while issue was closed.
;-( LGTM

Powered by Google App Engine
This is Rietveld 408576698