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 2697793002: Add mojo interface+impl for audio stream control. (Closed)

Created:
3 years, 10 months ago by Max Morin
Modified:
3 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, audio-mojo-cl_google.com, chromium-reviews, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, 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/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add mojo interface+impl for audio stream control. Summary: * AudioOutputStream is an interface for control messages for a single stream, and AudioOutputStreamProvider is a single-use factory for AudioOutputStreams. * The changes in media/mojo/interfaces/, media/base/ipc, and content/common/media/audio_messages.h mojofy OutputDeviceStatus. * media/mojo/interfaces/audio_output.mojom defines the IPC interface. * AudioOutputDelegate is moved to media. This also causes some small changes to related files * It is not possible to keep the AudioOutputStreamProviders in a StrongBindingSet since they need to be destroyed on error, but they cannot propagate an error to the StrongBindingSet from the inside. * Not hooked up anywhere yet. This CL is split off from https://codereview.chromium.org/2319493002/. Design doc at https://docs.google.com/document/d/1awQoajq_DLmz2AIU9iweC0zEYlVuHCvEIRQepeYyxh8/edit The "Callback to be deleted on error" is used in many places. Here are some cases where it is used by storing a pointer to owner: https://cs.chromium.org/chromium/src/device/geolocation/geolocation_service_impl.cc?l=152, https://cs.chromium.org/chromium/src/content/browser/permissions/permission_service_impl.cc?l=100, https://cs.chromium.org/chromium/src/content/browser/payments/payment_app_manager.cc?l=61, https://cs.chromium.org/chromium/src/content/browser/background_sync/background_sync_service_impl.cc?l=91, https://cs.chromium.org/chromium/src/content/browser/notifications/blink_notification_service_impl.cc?l=66. BUG=425368 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/2697793002 Cr-Commit-Position: refs/heads/master@{#456795} Committed: https://chromium.googlesource.com/chromium/src/+/aa3e611c9d8b00201fab5d36af2758b618e94b05

Patch Set 1 #

Patch Set 2 : Move to media #

Total comments: 22

Patch Set 3 : Dale's comments and add MEDIA_MOJO_EXPORT #

Total comments: 6

Patch Set 4 : Introduce provider #

Total comments: 25

Patch Set 5 : review. #

Total comments: 5

Patch Set 6 : . #

Total comments: 2

Patch Set 7 : format mojom #

Patch Set 8 : Fix linking #

Patch Set 9 : Fix linking once and for all. #

Patch Set 10 : update build files #

Patch Set 11 : Don't inline AudioOutputDelegate(EventHandler) dtor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+611 lines, -131 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
D content/browser/renderer_host/media/audio_output_delegate.h View 1 1 chunk +0 lines, -64 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate_impl.h View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_output_delegate_impl_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 5 chunks +6 lines, -6 lines 0 comments Download
M content/common/media/audio_messages.h View 2 chunks +1 line, -3 lines 0 comments Download
M media/audio/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A + media/audio/audio_output_delegate.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +15 lines, -15 lines 0 comments Download
A media/audio/audio_output_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M media/base/ipc/media_param_traits_macros.h View 2 chunks +4 lines, -0 lines 0 comments Download
M media/mojo/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/interfaces/BUILD.gn View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/mojo/interfaces/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
D media/mojo/interfaces/audio_output.mojom View 2 3 4 1 chunk +0 lines, -33 lines 0 comments Download
A media/mojo/interfaces/audio_output_stream.mojom View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 0 comments Download
M media/mojo/interfaces/media_types.mojom View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M media/mojo/interfaces/media_types.typemap View 2 chunks +2 lines, -0 lines 0 comments Download
M media/mojo/services/BUILD.gn View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_audio_output_stream.h View 1 2 3 4 5 6 7 8 1 chunk +69 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_audio_output_stream.cc View 1 2 3 4 5 1 chunk +94 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_audio_output_stream_provider.h View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_audio_output_stream_provider.cc View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
A media/mojo/services/mojo_audio_output_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +249 lines, -0 lines 0 comments Download

Messages

Total messages: 94 (51 generated)
Max Morin
Olga: PTAL.
3 years, 10 months ago (2017-02-14 10:54:41 UTC) #7
Max Morin
Olga: as discussed offline, I added some references to classes which currently use the "callback ...
3 years, 10 months ago (2017-02-17 12:02:47 UTC) #11
Max Morin
On 2017/02/17 12:02:47, Max Morin wrote: > Olga: as discussed offline, I added some references ...
3 years, 10 months ago (2017-02-21 11:05:35 UTC) #30
o1ka
On 2017/02/21 11:05:35, Max Morin wrote: > On 2017/02/17 12:02:47, Max Morin wrote: > > ...
3 years, 10 months ago (2017-02-21 12:30:28 UTC) #31
Max Morin
Dale: PTAL. Especially, advise on directory structure.
3 years, 10 months ago (2017-02-21 15:32:13 UTC) #33
DaleCurtis
This is looking great! Nice work; just a couple Qs which reveal my ignorance I ...
3 years, 10 months ago (2017-02-21 18:18:32 UTC) #35
Max Morin
Thanks Dale. https://codereview.chromium.org/2697793002/diff/80001/media/mojo/interfaces/audio_output.mojom File media/mojo/interfaces/audio_output.mojom (right): https://codereview.chromium.org/2697793002/diff/80001/media/mojo/interfaces/audio_output.mojom#newcode13 media/mojo/interfaces/audio_output.mojom:13: interface AudioOutput { On 2017/02/21 18:18:32, DaleCurtis ...
3 years, 10 months ago (2017-02-22 10:08:43 UTC) #36
o1ka
Awesome! Just one question and some nits (commented both PSs, since started it yesterday) https://codereview.chromium.org/2697793002/diff/80001/media/base/audio_output_delegate.h ...
3 years, 10 months ago (2017-02-22 13:26:31 UTC) #38
Max Morin
Dale: quick question: can something in media/mojo/services depend on something in media/audio? Looks like DEPS ...
3 years, 10 months ago (2017-02-22 16:07:44 UTC) #39
DaleCurtis
I think we just haven't had a need for it yet, you should be fine ...
3 years, 10 months ago (2017-02-22 18:13:37 UTC) #40
Max Morin
Added a Provider interface, PTAL. https://codereview.chromium.org/2697793002/diff/80001/media/base/audio_output_delegate.h File media/base/audio_output_delegate.h (right): https://codereview.chromium.org/2697793002/diff/80001/media/base/audio_output_delegate.h#newcode5 media/base/audio_output_delegate.h:5: #ifndef MEDIA_BASE_AUDIO_OUTPUT_DELEGATE_H_ On 2017/02/22 ...
3 years, 9 months ago (2017-03-02 23:11:32 UTC) #44
Max Morin
Dale, Olga: Ping
3 years, 9 months ago (2017-03-06 14:47:14 UTC) #45
DaleCurtis
Demonstrating some of the gaps in my mojo knowledge here :) https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom File media/mojo/interfaces/audio_output.mojom (right): ...
3 years, 9 months ago (2017-03-06 17:56:12 UTC) #46
o1ka
https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc File media/mojo/services/mojo_audio_output_provider.cc (right): https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc#newcode28 media/mojo/services/mojo_audio_output_provider.cc:28: LOG(ERROR) << "Output acquired twice."; Shouldn't |acquire_callback| run here? ...
3 years, 9 months ago (2017-03-07 00:49:24 UTC) #47
Max Morin
https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom File media/mojo/interfaces/audio_output.mojom (right): https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom#newcode13 media/mojo/interfaces/audio_output.mojom:13: interface AudioOutput { On 2017/03/06 17:56:12, DaleCurtis wrote: > ...
3 years, 9 months ago (2017-03-07 11:23:17 UTC) #49
Max Morin
+CC Guido: Hello. I'm currently replacing AudioRendererHost. The replacement will return an AudioOutputStreamProvider after the ...
3 years, 9 months ago (2017-03-07 11:39:38 UTC) #50
o1ka
https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom File media/mojo/interfaces/audio_output.mojom (right): https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom#newcode13 media/mojo/interfaces/audio_output.mojom:13: interface AudioOutput { On 2017/03/07 11:23:16, Max Morin wrote: ...
3 years, 9 months ago (2017-03-07 13:04:53 UTC) #52
Max Morin
On 2017/03/07 13:04:53, o1ka wrote: > https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom > File media/mojo/interfaces/audio_output.mojom (right): > > https://codereview.chromium.org/2697793002/diff/200001/media/mojo/interfaces/audio_output.mojom#newcode13 > ...
3 years, 9 months ago (2017-03-07 13:09:05 UTC) #53
chromium-reviews
Ok, makes sense. On Mar 7, 2017 2:09 PM, <maxmorin@chromium.org> wrote: > On 2017/03/07 13:04:53, ...
3 years, 9 months ago (2017-03-07 17:31:44 UTC) #54
DaleCurtis
lgtm - you'll still need a security reviewer and it might be good to add ...
3 years, 9 months ago (2017-03-07 17:39:37 UTC) #55
o1ka
Awesome! lgtm https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc File media/mojo/services/mojo_audio_output_provider.cc (right): https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc#newcode28 media/mojo/services/mojo_audio_output_provider.cc:28: LOG(ERROR) << "Output acquired twice."; On 2017/03/07 ...
3 years, 9 months ago (2017-03-07 23:31:07 UTC) #56
Max Morin
Thank you! https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc File media/mojo/services/mojo_audio_output_provider.cc (right): https://codereview.chromium.org/2697793002/diff/200001/media/mojo/services/mojo_audio_output_provider.cc#newcode28 media/mojo/services/mojo_audio_output_provider.cc:28: LOG(ERROR) << "Output acquired twice."; On 2017/03/07 ...
3 years, 9 months ago (2017-03-08 07:38:30 UTC) #57
Max Morin
mkwst: PTAL at media/mojo/interfaces, media/base/ipc/media_param_traits_macros.h, and content/common/media/audio_messages.h. rockot: As mojo expert, PTAL at media/mojo/interfaces/audio_output_stream.mojom and ...
3 years, 9 months ago (2017-03-08 07:39:36 UTC) #59
o1ka
https://codereview.chromium.org/2697793002/diff/220001/media/mojo/interfaces/audio_output_stream.mojom File media/mojo/interfaces/audio_output_stream.mojom (right): https://codereview.chromium.org/2697793002/diff/220001/media/mojo/interfaces/audio_output_stream.mojom#newcode26 media/mojo/interfaces/audio_output_stream.mojom:26: // Creates a new AudioOutputStream using |params|. |shared_buffer| and ...
3 years, 9 months ago (2017-03-08 08:11:49 UTC) #60
Max Morin
On 2017/03/08 08:11:49, o1ka wrote: > https://codereview.chromium.org/2697793002/diff/220001/media/mojo/interfaces/audio_output_stream.mojom > File media/mojo/interfaces/audio_output_stream.mojom (right): > > https://codereview.chromium.org/2697793002/diff/220001/media/mojo/interfaces/audio_output_stream.mojom#newcode26 > ...
3 years, 9 months ago (2017-03-08 08:14:11 UTC) #61
Max Morin
Clamy: PTAL at content/browser/BUILD.gn.
3 years, 9 months ago (2017-03-08 08:17:34 UTC) #63
o1ka
On 2017/03/08 08:14:11, Max Morin wrote: > On 2017/03/08 08:11:49, o1ka wrote: > > > ...
3 years, 9 months ago (2017-03-08 08:28:15 UTC) #64
Max Morin
On 2017/03/08 08:28:15, o1ka wrote: > On 2017/03/08 08:14:11, Max Morin wrote: > > On ...
3 years, 9 months ago (2017-03-08 10:28:26 UTC) #65
Ken Rockot(use gerrit already)
mojo bits lgtm https://codereview.chromium.org/2697793002/diff/240001/media/mojo/interfaces/audio_output_stream.mojom File media/mojo/interfaces/audio_output_stream.mojom (right): https://codereview.chromium.org/2697793002/diff/240001/media/mojo/interfaces/audio_output_stream.mojom#newcode26 media/mojo/interfaces/audio_output_stream.mojom:26: // Creates a new AudioOutputStream using ...
3 years, 9 months ago (2017-03-08 17:43:37 UTC) #66
Max Morin
Thank you Ken. https://codereview.chromium.org/2697793002/diff/240001/media/mojo/interfaces/audio_output_stream.mojom File media/mojo/interfaces/audio_output_stream.mojom (right): https://codereview.chromium.org/2697793002/diff/240001/media/mojo/interfaces/audio_output_stream.mojom#newcode26 media/mojo/interfaces/audio_output_stream.mojom:26: // Creates a new AudioOutputStream using ...
3 years, 9 months ago (2017-03-09 09:34:29 UTC) #67
clamy
Thanks! content/ lgtm.
3 years, 9 months ago (2017-03-09 13:49:19 UTC) #68
Max Morin
Mike West: Ping.
3 years, 9 months ago (2017-03-13 12:41:46 UTC) #69
Mike West
LGTM.
3 years, 9 months ago (2017-03-13 19:59:54 UTC) #70
Guido Urdaneta
On 2017/03/07 11:39:38, Max Morin wrote: > +CC Guido: Hello. I'm currently replacing AudioRendererHost. The ...
3 years, 9 months ago (2017-03-13 22:59:57 UTC) #71
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/2697793002/260001
3 years, 9 months ago (2017-03-14 08:49:28 UTC) #74
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/186535)
3 years, 9 months ago (2017-03-14 09:20:04 UTC) #76
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/2697793002/280001
3 years, 9 months ago (2017-03-14 13:02:05 UTC) #79
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/366478)
3 years, 9 months ago (2017-03-14 13:22:53 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/2697793002/300001
3 years, 9 months ago (2017-03-14 13:33:33 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/186644)
3 years, 9 months ago (2017-03-14 14:10:12 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/2697793002/360001
3 years, 9 months ago (2017-03-14 17:39:17 UTC) #90
commit-bot: I haz the power
Committed patchset #11 (id:360001) as https://chromium.googlesource.com/chromium/src/+/aa3e611c9d8b00201fab5d36af2758b618e94b05
3 years, 9 months ago (2017-03-14 19:51:55 UTC) #93
Max Morin
3 years, 9 months ago (2017-03-15 07:46:16 UTC) #94
Message was sent while issue was closed.
Thanks everyone for the review, and also thank you Guido for confirming.

Powered by Google App Engine
This is Rietveld 408576698