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

Issue 1666363005: Switching audio clients to using RestartableAudioRendererSink interface as a sink. (Closed)

Created:
4 years, 10 months ago by o1ka
Modified:
4 years, 8 months ago
CC:
vanellope-cl_google.com, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, posciak+watch_chromium.org, miu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switching audio clients to using RestartableAudioRendererSink instead of AudioOutputDevice. This is the first step towards switching to mixing WebTRC/WebAudio audio output together with media elements audio on the renderer side. Interface is instantiated through AudioOutputFactory, which as of now produces mixer AudioRendererMixerInput for media elements and AudioOutputDevice for the rest of the clients. The plan is in a follow-up CL to have it to produce AudioRendererMixerInput instances for the rest of the clients basing on Finch experiment parameters and OS (we won't mix on ChromOS and Android in the near future). ******Used to be (changed during the review) - this is if anybody wants to understand the first patches. Switching audio clients to using RestartableAudioOutputDevice interface as a sink. This is the first step towards switching to mixing WebTRC/WebAudio audio output together with media elements audio on the renderer side. 1) A common interface RestartableAudioOutputDevice (which is RestartableAudioRendererSink and AudioOutputDevice) is introduced. 2) AudioRendererMixerInput now inherits from it. 3) RestartableAudioOutputDeviceImpl implements it on top of AudioOutputDevice (aggregated). 4) WebRTCAudioRenderer, WebRTCLocalAudioRenderer and RendererWebAudioDeviceImpl are switched to use this interface instead of AudioOutputDevice. 5) Interface is instantiated through RestartableAudioOutputDeviceFactory, which as of now produces mixer AudioRendererMixerInput for media elements and RestartableAudioOutputDeviceImpl for the rest of the clients. The plan is in a follow-up CL to have it to produce AudioRendererMixerInput instances for the rest of the clients basing on Finch experiment parameters and OS (we won't mix on ChromOS and Android in the near future). Having RestartableAudioOutputDeviceImpl mimicing AudioRendererMixerInput behavior allows to seamlessly switch between both implementations in run-time. At this step the goal was to have as less client code modifications as possible, in order to not overlay upcoming (hopefully few) mixing bugs with integration bugs. BUG=560378 Committed: https://crrev.com/b819869839848e8d4f5488fb9f3ff5bed254fb26 Cr-Commit-Position: refs/heads/master@{#376125}

Patch Set 1 #

Total comments: 1

Patch Set 2 : fixing file name in GN build #

Patch Set 3 : another fix for gn build #

Patch Set 4 : Removing RestartableAudioOutputDevice interface #

Total comments: 10

Patch Set 5 : Getting rid of restartable audio output device #

Patch Set 6 : export fix #

Total comments: 34

Patch Set 7 : addressing review comments #

Patch Set 8 : Rebase #

Total comments: 8

Patch Set 9 : nit fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -132 lines) Patch
M content/renderer/media/audio_device_factory.h View 1 2 3 4 5 6 7 8 4 chunks +55 lines, -0 lines 0 comments Download
M content/renderer/media/audio_device_factory.cc View 1 2 3 4 5 6 7 8 4 chunks +100 lines, -0 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.h View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 3 4 5 6 7 8 2 chunks +29 lines, -1 line 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.h View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.cc View 1 2 3 4 5 6 6 chunks +13 lines, -12 lines 0 comments Download
M content/renderer/media/track_audio_renderer.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -3 lines 0 comments Download
M content/renderer/media/track_audio_renderer.cc View 1 2 3 4 5 6 7 8 chunks +20 lines, -15 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer.h View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer.cc View 1 2 3 4 5 6 7 8 8 chunks +21 lines, -14 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +40 lines, -57 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -9 lines 0 comments Download
M media/base/audio_renderer_mixer_input.h View 1 2 3 4 5 6 4 chunks +11 lines, -1 line 0 comments Download
M media/base/audio_renderer_mixer_input.cc View 1 2 3 4 5 6 6 chunks +22 lines, -13 lines 0 comments Download
M media/base/audio_renderer_mixer_input_unittest.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M media/base/audio_renderer_mixer_unittest.cc View 3 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (16 generated)
o1ka
On 2016/02/05 14:57:31, o1ka wrote: > Patchset #2 (id:20001) has been deleted Lower similarity does ...
4 years, 10 months ago (2016-02-05 15:00:49 UTC) #2
o1ka
Could you take a look? Thanks! https://codereview.chromium.org/1666363005/diff/1/content/renderer/media/restartable_audio_output_device_factory.h File content/renderer/media/restartable_audio_output_device_factory.h (right): https://codereview.chromium.org/1666363005/diff/1/content/renderer/media/restartable_audio_output_device_factory.h#newcode54 content/renderer/media/restartable_audio_output_device_factory.h:54: // TODO(olka): find ...
4 years, 10 months ago (2016-02-05 16:04:23 UTC) #4
o1ka
Will address build issues on Monday
4 years, 10 months ago (2016-02-05 17:19:00 UTC) #5
DaleCurtis
Do we really want a new interface and implementation for this? Dan created the restartable ...
4 years, 10 months ago (2016-02-05 18:47:16 UTC) #7
o1ka
On 2016/02/05 18:47:16, DaleCurtis wrote: > Do we really want a new interface and implementation ...
4 years, 10 months ago (2016-02-08 09:48:03 UTC) #8
o1ka
Actually, I just realized that we can access OutputDevice interface through (Restartable)AudioRendererSink<->GetOutputDevice() interface so we ...
4 years, 10 months ago (2016-02-08 13:03:42 UTC) #9
o1ka
Please take a look- RestartableAudioOutputDevice is removed. I haven't renamed RestartableAudioOutputDeviceImpl so far (because not ...
4 years, 10 months ago (2016-02-08 18:01:25 UTC) #11
DaleCurtis
Generally when I think of temporary solutions, I'm not thinking of 1100+ lines of code ...
4 years, 10 months ago (2016-02-08 19:10:25 UTC) #12
o1ka
Thanks for the feedback, will address the comments tomorrow. A couple of clarification questions: On ...
4 years, 10 months ago (2016-02-08 20:43:10 UTC) #13
DaleCurtis
On 2016/02/08 20:43:10, o1ka wrote: > Thanks for the feedback, will address the comments tomorrow. ...
4 years, 10 months ago (2016-02-08 22:05:27 UTC) #14
Henrik Grunell
On 2016/02/08 22:05:27, DaleCurtis wrote: > On 2016/02/08 20:43:10, o1ka wrote: > > Thanks for ...
4 years, 10 months ago (2016-02-09 07:41:05 UTC) #15
o1ka
On 2016/02/09 07:41:05, Henrik Grunell wrote: > On 2016/02/08 22:05:27, DaleCurtis wrote: > > On ...
4 years, 10 months ago (2016-02-09 13:54:22 UTC) #16
o1ka
Please take a look - A poor little restartable AOD is removed. As for Dale's ...
4 years, 10 months ago (2016-02-09 14:15:39 UTC) #17
DaleCurtis
https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode145 content/renderer/media/audio_device_factory.cc:145: scoped_refptr<media::AudioOutputDevice> device = Hmm, why do we need to ...
4 years, 10 months ago (2016-02-10 23:25:33 UTC) #18
Henrik Grunell
First round. https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode24 content/renderer/media/audio_device_factory.cc:24: // This is where we decide which ...
4 years, 10 months ago (2016-02-11 12:01:26 UTC) #19
o1ka
Addressed review comments, however I need to rebase after WebRtcLocalAudioRenderer was renamed by mui@ - ...
4 years, 10 months ago (2016-02-11 17:18:24 UTC) #20
DaleCurtis
https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode145 content/renderer/media/audio_device_factory.cc:145: scoped_refptr<media::AudioOutputDevice> device = On 2016/02/11 17:18:23, o1ka wrote: > ...
4 years, 10 months ago (2016-02-11 17:37:04 UTC) #22
o1ka
On 2016/02/11 17:37:04, DaleCurtis wrote: > https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc > File content/renderer/media/audio_device_factory.cc (right): > > https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode145 > ...
4 years, 10 months ago (2016-02-11 18:08:41 UTC) #23
o1ka
Rebased, PTAL. Adding avi@ for render_frame_impl.cc
4 years, 10 months ago (2016-02-11 18:13:39 UTC) #25
DaleCurtis
On 2016/02/11 18:08:41, o1ka wrote: > > I see. Can we make a mixer to ...
4 years, 10 months ago (2016-02-11 18:16:30 UTC) #26
Henrik Grunell
Looking good, just minor comment. Also, update the description to only include the current information. ...
4 years, 10 months ago (2016-02-15 12:21:17 UTC) #27
Henrik Grunell
lgtm with comments fixed.
4 years, 10 months ago (2016-02-15 15:14:43 UTC) #28
Avi (use Gerrit)
content/renderer/render_frame_impl.cc LGTM
4 years, 10 months ago (2016-02-15 16:08:39 UTC) #29
DaleCurtis
lgtm % one extra comment. https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode145 content/renderer/media/audio_device_factory.cc:145: scoped_refptr<media::AudioOutputDevice> device = On ...
4 years, 10 months ago (2016-02-16 21:39:12 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1666363005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1666363005/200001
4 years, 10 months ago (2016-02-17 17:39:37 UTC) #35
o1ka
Review comments addressed https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/1666363005/diff/140001/content/renderer/media/audio_device_factory.cc#newcode145 content/renderer/media/audio_device_factory.cc:145: scoped_refptr<media::AudioOutputDevice> device = On 2016/02/16 21:39:12, ...
4 years, 10 months ago (2016-02-17 17:40:44 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-17 18:48:47 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1666363005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1666363005/200001
4 years, 10 months ago (2016-02-18 08:57:09 UTC) #41
commit-bot: I haz the power
Committed patchset #9 (id:200001)
4 years, 10 months ago (2016-02-18 09:04:10 UTC) #43
commit-bot: I haz the power
4 years, 10 months ago (2016-02-18 09:05:12 UTC) #45
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/b819869839848e8d4f5488fb9f3ff5bed254fb26
Cr-Commit-Position: refs/heads/master@{#376125}

Powered by Google App Engine
This is Rietveld 408576698