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

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed)

Created:
5 years, 7 months ago by Guido Urdaneta
Modified:
5 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, miu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri (slow - plz ping), nasko+codewatch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, wjia+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for switching the audio output device for HTMLMediaElements. This is a first implementation of Chromium support for the Audio Output Devices API (see http://w3c.github.io/mediacapture-output). This implementation supports: * Output device switching for media elements. * Permission check based on MediaStream devices permissions. * Sending a reply from the browser process to the renderer process such that it can be used by Blink to reject or accept a JavaScript Promise returned by the setSinkId() method. BUG=438023 TEST=manually tested

Patch Set 1 #

Patch Set 2 : Fix mojo-related method name #

Patch Set 3 : Fix pointer deallocation #

Patch Set 4 : Support for permissions check, output device, and fix binding of some callback parameters. Don't send error when invalid device id is given. #

Patch Set 5 : Use updated WebMediaPlayer interface, fix bug in AudioRendererHost #

Patch Set 6 : Add SwitchOutputDevice() to WebrtcAudioRenderer #

Patch Set 7 : Minor update in order to conform with the new blink implementation. Stills accepts the promise ever… #

Patch Set 8 : WebMediaPlayerImpl now works according to spec. WebMediaPlayerMS still pending. #

Patch Set 9 : Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+874 lines, -47 lines) Patch
M content/browser/media/media_internals.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 2 3 4 5 6 7 6 chunks +40 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 4 5 6 7 5 chunks +164 lines, -2 lines 3 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 3 chunks +16 lines, -3 lines 1 comment Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/media/audio_messages.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -0 lines 0 comments Download
M content/renderer/media/audio_message_filter.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/media/audio_message_filter.cc View 1 2 3 4 5 6 7 5 chunks +39 lines, -0 lines 0 comments Download
M content/renderer/media/audio_message_filter_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_audio_renderer.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -3 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 7 8 16 chunks +87 lines, -35 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer.cc View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer_unittest.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_local_audio_renderer.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_local_audio_renderer.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M media/audio/audio_logging.h View 1 chunk +5 lines, -0 lines 0 comments Download
M media/audio/audio_output_device.h View 1 2 3 4 5 6 7 5 chunks +17 lines, -0 lines 1 comment Download
M media/audio/audio_output_device.cc View 1 2 3 4 5 6 7 5 chunks +51 lines, -1 line 0 comments Download
M media/audio/audio_output_device_unittest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 1 comment Download
M media/audio/audio_output_ipc.h View 1 2 3 4 5 6 7 4 chunks +24 lines, -0 lines 0 comments Download
M media/audio/audio_output_stream_sink.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M media/audio/audio_output_stream_sink.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -1 line 1 comment Download
M media/audio/clockless_audio_sink.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M media/audio/clockless_audio_sink.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 1 comment Download
M media/audio/fake_audio_log_factory.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M media/audio/null_audio_sink.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M media/audio/null_audio_sink.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 1 comment Download
M media/base/audio_renderer.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 1 comment Download
M media/base/audio_renderer_mixer.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M media/base/audio_renderer_mixer.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M media/base/audio_renderer_mixer_input.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M media/base/audio_renderer_mixer_input.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M media/base/audio_renderer_sink.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 1 comment Download
M media/base/fake_audio_renderer_sink.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M media/base/fake_audio_renderer_sink.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 1 comment Download
M media/base/mock_audio_renderer_sink.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M media/base/pipeline.h View 1 2 3 4 5 6 7 4 chunks +14 lines, -0 lines 0 comments Download
M media/base/pipeline.cc View 1 2 3 4 5 6 7 2 chunks +30 lines, -0 lines 1 comment Download
M media/base/renderer.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M media/blink/webaudiosourceprovider_impl.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M media/blink/webaudiosourceprovider_impl.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +43 lines, -0 lines 1 comment Download
M media/mojo/interfaces/media_renderer.mojom View 1 1 chunk +3 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_service.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_service.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M media/renderers/renderer_impl.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
M media/renderers/renderer_impl.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Guido Urdaneta
Hi, Please review.
5 years, 7 months ago (2015-05-12 14:56:08 UTC) #2
Guido Urdaneta
Hi, This is the first version that behaves according to spec. Please take a look. ...
5 years, 6 months ago (2015-06-03 18:34:07 UTC) #3
miu
https://codereview.chromium.org/1122393004/diff/160001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/1122393004/diff/160001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode451 content/browser/renderer_host/media/audio_renderer_host.cc:451: // We want to check that MediaStream device permissions ...
5 years, 6 months ago (2015-06-03 21:01:02 UTC) #5
Guido Urdaneta
5 years, 6 months ago (2015-06-09 07:58:37 UTC) #6
I will replace this CL with a set of smaller CLs.
All unaddressed comments will be addressed there.

Powered by Google App Engine
This is Rietveld 408576698