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

Issue 2697663003: Add mojo interface+impl creation of audio streams. (Closed)

Created:
3 years, 10 months ago by Max Morin
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, asvitkine+watch_chromium.org, audio-mojo-cl_google.com, chromium-reviews, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, Guido Urdaneta, jam, miu+watch_chromium.org, ossu-chromium, posciak+watch_chromium.org, qsr+mojo_chromium.org, Solis, viettrungluu+watch_chromium.org, xjz+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add mojo interface+impl creation of audio streams. Summary: * RendererAudioOutputStreamFactory is an interface for creating AudioOutputProviders. * Since a lot of data is common for all factories of a single renderer process, it is held in a context object. (AudioOutputStreamFactoryContext is per-process and RendererAudioOutputStreamFactory is per-frame). * Replaces AudioRendererHost (eventually, after field trials). * Follow-up on https://codereview.chromium.org/2697793002/. * Design doc at https://docs.google.com/document/d/1awQoajq_DLmz2AIU9iweC0zEYlVuHCvEIRQepeYyxh8/edit * audio_output_stream_factory_context_impl_unittest.cc is actually an integration test, but it seems common to suffix test files with "_unittest" anyways, so I did that. BUG=425368 Review-Url: https://codereview.chromium.org/2697663003 Cr-Commit-Position: refs/heads/master@{#461103} Committed: https://chromium.googlesource.com/chromium/src/+/8757b429c30f14d20697f7c6fe4dfdd510cf0b7f

Patch Set 1 #

Total comments: 22

Patch Set 2 #

Total comments: 34

Patch Set 3 #

Total comments: 3

Patch Set 4 #

Total comments: 30

Patch Set 5 : ++tests, other comments #

Total comments: 24

Patch Set 6 : Dale's comments #

Total comments: 6

Patch Set 7 : Get origin from frame host. #

Patch Set 8 : Take AM pointer in RAOSFCI constructor. #

Total comments: 2

Patch Set 9 : Use mojo::ReportBadMessage and add a thread check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1269 lines, -4 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -4 lines 0 comments Download
A content/browser/renderer_host/media/render_frame_audio_output_stream_factory.h View 1 2 3 4 5 6 1 chunk +77 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +144 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +371 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/renderer_audio_output_stream_factory_context.h View 1 2 1 chunk +57 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.h View 1 2 3 4 5 6 7 1 chunk +102 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc View 1 2 3 4 5 6 7 1 chunk +101 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +383 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A content/common/media/renderer_audio_output_stream_factory.mojom View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 92 (58 generated)
Max Morin
Olga: PTAL. Ossu, Solis: If you like, you can also have a look, especially regarding ...
3 years, 9 months ago (2017-03-21 11:36:51 UTC) #34
o1ka
Some high-level comments/nits so far. https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context.h File content/browser/renderer_host/media/audio_output_stream_factory_context.h (right): https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context.h#newcode27 content/browser/renderer_host/media/audio_output_stream_factory_context.h:27: class CONTENT_EXPORT AudioOutputStreamFactoryContext { ...
3 years, 9 months ago (2017-03-21 16:20:17 UTC) #35
o1ka
Some high-level comments/nits so far.
3 years, 9 months ago (2017-03-21 16:20:25 UTC) #36
o1ka
CC: guidou@ for device authorization logic (see audio_output_stream_factory_context_impl.*)
3 years, 9 months ago (2017-03-21 16:24:33 UTC) #37
Max Morin
https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context.h File content/browser/renderer_host/media/audio_output_stream_factory_context.h (right): https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context.h#newcode27 content/browser/renderer_host/media/audio_output_stream_factory_context.h:27: class CONTENT_EXPORT AudioOutputStreamFactoryContext { On 2017/03/21 16:20:17, o1ka wrote: ...
3 years, 9 months ago (2017-03-22 13:18:29 UTC) #39
o1ka
Great job! Testing a epic. https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context_impl.h File content/browser/renderer_host/media/audio_output_stream_factory_context_impl.h (right): https://codereview.chromium.org/2697663003/diff/140001/content/browser/renderer_host/media/audio_output_stream_factory_context_impl.h#newcode24 content/browser/renderer_host/media/audio_output_stream_factory_context_impl.h:24: // handles requests for ...
3 years, 9 months ago (2017-03-23 09:39:45 UTC) #40
Max Morin
Thank you Olga. Since you didn't have major comments, I'm adding some more reviewers. https://codereview.chromium.org/2697663003/diff/160001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc ...
3 years, 9 months ago (2017-03-23 16:26:14 UTC) #44
Max Morin
Dale: PTAL. Ken: PTAL at mojo stuff in content/common/media/renderer_audio_output_stream_factory.mojom and content/browser/renderer_host/media/render_frame_audio_output_stream_factory.{cc,h}. Thanks!
3 years, 9 months ago (2017-03-23 16:30:11 UTC) #46
Ken Rockot(use gerrit already)
Said files LGTM https://codereview.chromium.org/2697663003/diff/220001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc File content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc (right): https://codereview.chromium.org/2697663003/diff/220001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc#newcode67 content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc:67: base::Passed(std::move(stream_provider_request)), callback)); nit: base::Passed(&stream_provider_request) is much ...
3 years, 9 months ago (2017-03-23 18:28:35 UTC) #47
DaleCurtis
https://codereview.chromium.org/2697663003/diff/240001/content/browser/bad_message.h File content/browser/bad_message.h (right): https://codereview.chromium.org/2697663003/diff/240001/content/browser/bad_message.h#newcode188 content/browser/bad_message.h:188: RFAOSF_OUT_OF_RANGE_INTEGER = 164, Quite the acronym stew here :) ...
3 years, 9 months ago (2017-03-24 17:47:13 UTC) #50
Max Morin
Thanks Ken and Dale. Dale: I don't love the naming, so if you have specific ...
3 years, 9 months ago (2017-03-27 14:40:51 UTC) #54
DaleCurtis
On naming, I wonde rif we actually need render_frame and renderer_ as prefixes for these ...
3 years, 9 months ago (2017-03-27 19:07:50 UTC) #55
Max Morin
We are concerned that dropping renderer/render_frame will make the names ambiguous when we have stream ...
3 years, 8 months ago (2017-03-28 15:49:32 UTC) #56
DaleCurtis
I thought mojo had some patterns for naming browser vs renderer components? I'm not sure ...
3 years, 8 months ago (2017-03-28 17:07:16 UTC) #57
Ken Rockot(use gerrit already)
On Tue, Mar 28, 2017 at 10:07 AM, <dalecurtis@chromium.org> wrote: > I thought mojo had ...
3 years, 8 months ago (2017-03-28 17:12:45 UTC) #58
DaleCurtis
Thanks for clarifying rockot@. Current names seem reasonable then unfortunately. We can always rename later, ...
3 years, 8 months ago (2017-03-28 17:22:26 UTC) #59
Max Morin
Cool, thank you. Avi: PTAL at content/ excluding media subdirectories. Mike: PTAL at mojo interface ...
3 years, 8 months ago (2017-03-29 07:54:18 UTC) #61
o1ka
Thanks Max! LGTM https://codereview.chromium.org/2697663003/diff/300001/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc File content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc (right): https://codereview.chromium.org/2697663003/diff/300001/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc#newcode94 content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc:94: handler, audio_system_->GetAudioManager(), std::move(audio_log), Could we switch ...
3 years, 8 months ago (2017-03-29 08:13:48 UTC) #64
Mike West
https://codereview.chromium.org/2697663003/diff/300001/content/common/media/renderer_audio_output_stream_factory.mojom File content/common/media/renderer_audio_output_stream_factory.mojom (right): https://codereview.chromium.org/2697663003/diff/300001/content/common/media/renderer_audio_output_stream_factory.mojom#newcode23 content/common/media/renderer_audio_output_stream_factory.mojom:23: url.mojom.Origin origin) => Why are you passing in an ...
3 years, 8 months ago (2017-03-29 08:22:07 UTC) #65
Max Morin
On 2017/03/29 08:22:07, Mike West wrote: > https://codereview.chromium.org/2697663003/diff/300001/content/common/media/renderer_audio_output_stream_factory.mojom > File content/common/media/renderer_audio_output_stream_factory.mojom (right): > > https://codereview.chromium.org/2697663003/diff/300001/content/common/media/renderer_audio_output_stream_factory.mojom#newcode23 ...
3 years, 8 months ago (2017-03-29 08:35:22 UTC) #66
Mike West
On 2017/03/29 at 08:35:22, maxmorin wrote: > On 2017/03/29 08:22:07, Mike West wrote: > > ...
3 years, 8 months ago (2017-03-29 11:15:15 UTC) #69
Avi (use Gerrit)
lgtm content stamp
3 years, 8 months ago (2017-03-29 14:55:46 UTC) #70
Alexei Svitkine (slow)
histograms lgtm
3 years, 8 months ago (2017-03-29 17:27:07 UTC) #71
Max Morin
Dale: I introduced weak pointers to manage callbacks now. Does CL still look good to ...
3 years, 8 months ago (2017-03-30 12:48:51 UTC) #72
Mike West
mojo lgtm, thanks!
3 years, 8 months ago (2017-03-30 14:42:26 UTC) #75
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2697663003/diff/340001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc File content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc (right): https://codereview.chromium.org/2697663003/diff/340001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc#newcode63 content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc:63: bad_message::ReceivedBadMessage(context_->GetRenderProcessId(), It would be nice to avoid introducing new ...
3 years, 8 months ago (2017-03-30 14:54:00 UTC) #76
Ken Rockot(use gerrit already)
On 2017/03/30 at 14:54:00, Ken Rockot wrote: > https://codereview.chromium.org/2697663003/diff/340001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc > File content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc (right): > > ...
3 years, 8 months ago (2017-03-30 14:54:54 UTC) #77
DaleCurtis
WeakPtr usage lgtm assuming the threading is as labeled. https://codereview.chromium.org/2697663003/diff/340001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc File content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc (right): https://codereview.chromium.org/2697663003/diff/340001/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc#newcode90 content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc:90: ...
3 years, 8 months ago (2017-03-30 18:56:43 UTC) #80
Max Morin
On 2017/03/30 14:54:54, Ken Rockot wrote: > On 2017/03/30 at 14:54:00, Ken Rockot wrote: > ...
3 years, 8 months ago (2017-03-31 09:17:10 UTC) #81
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/2697663003/360001
3 years, 8 months ago (2017-03-31 11:07:28 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/412629)
3 years, 8 months ago (2017-03-31 12:09:08 UTC) #86
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/2697663003/360001
3 years, 8 months ago (2017-03-31 12:17:32 UTC) #88
commit-bot: I haz the power
Committed patchset #9 (id:360001) as https://chromium.googlesource.com/chromium/src/+/8757b429c30f14d20697f7c6fe4dfdd510cf0b7f
3 years, 8 months ago (2017-03-31 13:03:46 UTC) #91
caseq
3 years, 8 months ago (2017-03-31 17:15:29 UTC) #92
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:360001) has been created in
https://codereview.chromium.org/2788173002/ by caseq@chromium.org.

The reason for reverting is: Broke sizes test on linux x64:
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/36560.

Powered by Google App Engine
This is Rietveld 408576698