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

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)

Created:
3 years, 6 months ago by ossu-chromium
Modified:
3 years, 6 months ago
CC:
avayvod+watch_chromium.org, blink-reviews, chfremer+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, Henrik Grunell, haraken, hubbe, imcheng+watch_chromium.org, isheriff+watch_chromium.org, jam, jasonroberts+watch_google.com, mfoltz+watch_chromium.org, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, tommyw+watchlist_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Detect AudioInputStream muting and propagate to MediaStreamAudioSource. Also adds a check in WebKit's MediaStreamTrack for if the source's state is not initially Live. BUG=chromium:729002 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2919793002 Cr-Commit-Position: refs/heads/master@{#481184} Committed: https://chromium.googlesource.com/chromium/src/+/5b2232658c703564b42eb768cb97c36e385cb7d1

Patch Set 1 #

Total comments: 23

Patch Set 2 : Added logging to AIRH. Put timer in Optional. #

Total comments: 8

Patch Set 3 : Removed blink part, added checks, made comment clearer. #

Total comments: 6

Patch Set 4 : Rebase #

Patch Set 5 : Implemented tests, addressed comments. #

Total comments: 8

Patch Set 6 : Made timer a member, reworked tests, rebased. #

Patch Set 7 : Reworked test again, to make tsan2 happy. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -1 line) Patch
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/media/audio_messages.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M content/renderer/media/external_media_stream_audio_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/external_media_stream_audio_source.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/local_media_stream_audio_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/local_media_stream_audio_source.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_audio_source.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_audio_source.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_source.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/audio_input_controller.h View 1 2 3 4 5 4 chunks +12 lines, -0 lines 0 comments Download
M media/audio/audio_input_controller.cc View 1 2 3 4 5 5 chunks +24 lines, -0 lines 0 comments Download
M media/audio/audio_input_controller_unittest.cc View 1 2 3 4 5 6 4 chunks +86 lines, -0 lines 0 comments Download
M media/audio/audio_input_device.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/audio_input_device.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M media/audio/audio_input_device_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/audio_input_ipc.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/audio/fake_audio_input_stream.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M media/audio/fake_audio_input_stream.cc View 1 2 3 4 4 chunks +11 lines, -1 line 0 comments Download
M media/base/audio_capturer_source.h View 1 chunk +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 71 (38 generated)
ossu-chromium
Hi Max, Olga, Hoping you can spare some time to have a look at this. ...
3 years, 6 months ago (2017-06-01 15:57:00 UTC) #3
Max Morin
Some random comments. Overall approach looks good. Re A: event from the stream would be ...
3 years, 6 months ago (2017-06-02 09:56:05 UTC) #5
ossu-chromium
https://codereview.chromium.org/2919793002/diff/1/content/renderer/media/media_stream_audio_source.cc File content/renderer/media/media_stream_audio_source.cc (right): https://codereview.chromium.org/2919793002/diff/1/content/renderer/media/media_stream_audio_source.cc#newcode153 content/renderer/media/media_stream_audio_source.cc:153: FROM_HERE, base::Bind(&MediaStreamSource::SetSourceMuted, GetWeakPtr(), On 2017/06/02 09:56:04, Max Morin wrote: ...
3 years, 6 months ago (2017-06-02 10:48:00 UTC) #6
ossu-chromium
On 2017/06/02 09:56:05, Max Morin wrote: > Some random comments. Overall approach looks good. Cool! ...
3 years, 6 months ago (2017-06-02 10:48:23 UTC) #7
Guido Urdaneta
PS2 came up while I was revieweing PS1. Take a look at these comments and ...
3 years, 6 months ago (2017-06-02 13:33:46 UTC) #15
Guido Urdaneta
https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp File third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp#newcode78 third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp:78: SourceChangedState(); Perhaps you should postpone the blink work to ...
3 years, 6 months ago (2017-06-02 13:45:34 UTC) #16
ossu-chromium
https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp File third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp#newcode78 third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp:78: SourceChangedState(); On 2017/06/02 13:45:34, Guido Urdaneta wrote: > Perhaps ...
3 years, 6 months ago (2017-06-02 13:53:20 UTC) #17
ossu-chromium
https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp File third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp#newcode78 third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp:78: SourceChangedState(); On 2017/06/02 13:53:19, ossu-chromium wrote: > On 2017/06/02 ...
3 years, 6 months ago (2017-06-02 14:07:21 UTC) #18
Guido Urdaneta
Can you also add a test to verify that the event propagates to the relevant ...
3 years, 6 months ago (2017-06-02 14:13:21 UTC) #19
Guido Urdaneta
https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp File third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp (right): https://codereview.chromium.org/2919793002/diff/20001/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp#newcode78 third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp:78: SourceChangedState(); On 2017/06/02 14:07:21, ossu-chromium wrote: > On 2017/06/02 ...
3 years, 6 months ago (2017-06-02 14:16:40 UTC) #20
ossu-chromium
On 2017/06/02 14:16:40, Guido Urdaneta wrote: > MediaStreamSource was probably designed for an older version ...
3 years, 6 months ago (2017-06-02 15:00:06 UTC) #22
ossu-chromium
https://codereview.chromium.org/2919793002/diff/20001/media/audio/audio_input_controller.cc File media/audio/audio_input_controller.cc (right): https://codereview.chromium.org/2919793002/diff/20001/media/audio/audio_input_controller.cc#newcode201 media/audio/audio_input_controller.cc:201: DCHECK(!audio_callback_); On 2017/06/02 14:13:21, Guido Urdaneta wrote: > DCHECK ...
3 years, 6 months ago (2017-06-02 15:32:45 UTC) #23
o1ka
Neat! lgtm %comments below https://codereview.chromium.org/2919793002/diff/40001/media/audio/audio_input_controller.cc File media/audio/audio_input_controller.cc (right): https://codereview.chromium.org/2919793002/diff/40001/media/audio/audio_input_controller.cc#newcode365 media/audio/audio_input_controller.cc:365: this, &AudioInputController::CheckMutedState); Add AudioInputController unit ...
3 years, 6 months ago (2017-06-02 16:27:27 UTC) #24
Max Morin
LGTM. https://codereview.chromium.org/2919793002/diff/1/content/renderer/media/media_stream_source.cc File content/renderer/media/media_stream_source.cc (right): https://codereview.chromium.org/2919793002/diff/1/content/renderer/media/media_stream_source.cc#newcode31 content/renderer/media/media_stream_source.cc:31: // TODO(ossu): Check that we only go between ...
3 years, 6 months ago (2017-06-05 07:01:38 UTC) #25
Guido Urdaneta
the code looks good to me, will wait for the tests
3 years, 6 months ago (2017-06-05 13:34:14 UTC) #26
ossu-chromium
https://codereview.chromium.org/2919793002/diff/40001/media/audio/audio_input_controller.cc File media/audio/audio_input_controller.cc (right): https://codereview.chromium.org/2919793002/diff/40001/media/audio/audio_input_controller.cc#newcode365 media/audio/audio_input_controller.cc:365: this, &AudioInputController::CheckMutedState); On 2017/06/02 16:27:26, o1ka wrote: > Add ...
3 years, 6 months ago (2017-06-07 17:27:06 UTC) #27
ossu-chromium
Moved FakeAudioStream::SetGlobalState from a couple of CLs down-the-line to this one, so that I could ...
3 years, 6 months ago (2017-06-14 16:40:04 UTC) #37
ossu-chromium
Adding hubbe for owner review. PTAL. I'm adding a callback to AudioInputController to (eventually) let ...
3 years, 6 months ago (2017-06-14 17:19:44 UTC) #39
hubbe
On 2017/06/14 17:19:44, ossu-chromium wrote: > Adding hubbe for owner review. > > PTAL. I'm ...
3 years, 6 months ago (2017-06-14 18:30:22 UTC) #40
ossu-chromium
On 2017/06/14 18:30:22, hubbe wrote: > On 2017/06/14 17:19:44, ossu-chromium wrote: > > Adding hubbe ...
3 years, 6 months ago (2017-06-15 16:38:13 UTC) #43
ossu-chromium
Adding bbudge for pepper changes (just simple updates to callback interfaces). Adding dcheng for common/media/audio_messages.h
3 years, 6 months ago (2017-06-15 16:41:30 UTC) #45
ossu-chromium
Adding dalecurtis for media/ reviews after a tip from a coworker. :)
3 years, 6 months ago (2017-06-15 16:44:07 UTC) #47
DaleCurtis
https://codereview.chromium.org/2919793002/diff/100001/media/audio/audio_input_controller.cc File media/audio/audio_input_controller.cc (right): https://codereview.chromium.org/2919793002/diff/100001/media/audio/audio_input_controller.cc#newcode361 media/audio/audio_input_controller.cc:361: CheckMutedState(); Instead of using a repeating timer like this ...
3 years, 6 months ago (2017-06-15 18:44:01 UTC) #48
dcheng
ipc lgtm https://codereview.chromium.org/2919793002/diff/100001/media/audio/fake_audio_input_stream.cc File media/audio/fake_audio_input_stream.cc (right): https://codereview.chromium.org/2919793002/diff/100001/media/audio/fake_audio_input_stream.cc#newcode89 media/audio/fake_audio_input_stream.cc:89: return base::subtle::NoBarrier_Load(&g_fake_input_streams_are_muted) != 0; Is it necessary ...
3 years, 6 months ago (2017-06-17 08:50:02 UTC) #49
Guido Urdaneta
c/r/m and c/b/rh/m lgtm
3 years, 6 months ago (2017-06-19 09:46:30 UTC) #50
bbudge
content/renderer/pepper lgtm
3 years, 6 months ago (2017-06-19 13:42:52 UTC) #51
ossu-chromium
Rewrote tests to work on Mac and made the timer a regular member again. https://codereview.chromium.org/2919793002/diff/100001/media/audio/audio_input_controller.cc ...
3 years, 6 months ago (2017-06-20 12:25:15 UTC) #56
ossu-chromium
Adding tommi@ for (essentially) rubber-stamping content/browser/speech/speech_recognizer_impl.h - it's only a no-op event handler implementation added.
3 years, 6 months ago (2017-06-20 12:26:29 UTC) #58
DaleCurtis
FWIW, I think it'd be fine to just poll this during OnData and PostTask just ...
3 years, 6 months ago (2017-06-20 17:08:10 UTC) #61
tommi (sloooow) - chröme
Rs lgtm
3 years, 6 months ago (2017-06-21 11:57:15 UTC) #64
ossu-chromium
On 2017/06/20 17:08:10, DaleCurtis wrote: > FWIW, I think it'd be fine to just poll ...
3 years, 6 months ago (2017-06-21 12:51:47 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2919793002/140001
3 years, 6 months ago (2017-06-21 12:52:04 UTC) #68
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 12:57:57 UTC) #71
Message was sent while issue was closed.
Committed patchset #7 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/5b2232658c703564b42eb768cb97...

Powered by Google App Engine
This is Rietveld 408576698