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

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed)

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

Description

Looking up device id by session id for AudioRendererMixerInput This is required for being able to correctly mix in WebRtc audio in case of unified streams, when session id is used to specify output device matching an open input device. 1) Modifications to AudioRendererHost and AudioOutputDevice to retrieve the matched device id in OnRequestDeviceAuthorization()/OnDeviceAuthorized() -- This is only manually tested so far. I tried to come up with a neat unit test but AudioRendererHost is lacking mocks (uses "for test" settings of its dependencies instead) so I got lost there. As much as I want to have the unit test in place, I would prefer to not spend any more time on this now. The change is pretty straight forward. Please let me know if you think the unit test is a must-have. 2) AudioRendereMixer key (in AudioRendererMixerManager) is modified to take into account default device specifics. BUG=587457 Committed: https://crrev.com/121c63d12d10be3dab0ebb032595f2bea95c42c8 Cr-Commit-Position: refs/heads/master@{#386652}

Patch Set 1 #

Total comments: 46

Patch Set 2 : Rebased with respect to OutputDevice->OutputDeviceInfo change, fixed AOD race, addressed review com… #

Total comments: 4

Patch Set 3 : addressing guidou@'s comments #

Total comments: 1

Patch Set 4 : removing string copying #

Patch Set 5 : Switch to use AudioDeviceFactory::GetOutputDevice() in AudioRendererMixerManager; AudioDeviceFactor… #

Total comments: 6

Patch Set 6 : tommi's comments addressed #

Total comments: 1

Patch Set 7 : comment and bug ref to remove AudioManagerBase dependency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -84 lines) Patch
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 4 5 6 8 chunks +15 lines, -19 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 1 2 3 4 5 6 3 chunks +8 lines, -5 lines 0 comments Download
M content/common/media/audio_messages.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/audio_device_factory.h View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M content/renderer/media/audio_device_factory.cc View 1 2 3 4 5 6 chunks +36 lines, -27 lines 0 comments Download
M content/renderer/media/audio_message_filter.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/audio_message_filter.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/audio_message_filter_unittest.cc View 1 2 3 4 5 6 4 chunks +8 lines, -4 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.h View 1 3 chunks +14 lines, -2 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 3 4 5 6 2 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager_unittest.cc View 1 2 3 4 5 6 7 chunks +141 lines, -8 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M media/audio/audio_manager_base.h View 1 1 chunk +11 lines, -0 lines 0 comments Download
M media/audio/audio_manager_base.cc View 1 1 chunk +9 lines, -1 line 0 comments Download
M media/audio/audio_output_device.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M media/audio/audio_output_device.cc View 1 4 chunks +21 lines, -2 lines 0 comments Download
M media/audio/audio_output_device_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M media/audio/audio_output_ipc.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M media/base/output_device_info.h View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (9 generated)
o1ka
Please take a look. https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode21 content/renderer/media/audio_renderer_mixer_manager.cc:21: AudioRendererMixerManager::AudioRendererMixerManager(){}; nit: I'll add a ...
4 years, 9 months ago (2016-03-07 15:25:49 UTC) #2
DaleCurtis
guidou@ wrote a lot of this code, so including him for the main review.
4 years, 9 months ago (2016-03-07 23:10:07 UTC) #4
o1ka
On 2016/03/07 23:10:07, DaleCurtis wrote: > guidou@ wrote a lot of this code, so including ...
4 years, 9 months ago (2016-03-08 06:06:28 UTC) #5
Guido Urdaneta
https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_device_factory.h File content/renderer/media/audio_device_factory.h (right): https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_device_factory.h#newcode42 content/renderer/media/audio_device_factory.h:42: // Creates a sink for AudioRemdererMixer. typo: s/Remderer/Renderer https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc ...
4 years, 9 months ago (2016-03-08 14:53:10 UTC) #6
Henrik Grunell
Good stuff, adding a few comments to the previous reviewers'. https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/1769933002/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode38 ...
4 years, 9 months ago (2016-03-08 21:09:57 UTC) #7
o1ka
Thank you all for the input, before continuing with the review I'd like to discuss ...
4 years, 9 months ago (2016-03-09 15:25:53 UTC) #8
o1ka
PTAL CL updated taking into account OutputDevice->OutputDeviceInfo replacement, comments addressed; also looks like there was ...
4 years, 8 months ago (2016-04-05 15:13:39 UTC) #11
Guido Urdaneta
https://codereview.chromium.org/1769933002/diff/20001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/1769933002/diff/20001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode33 content/renderer/media/audio_renderer_mixer_manager.cc:33: std::string new_device_id(device_id); We can avoid this string copy. The ...
4 years, 8 months ago (2016-04-07 11:14:28 UTC) #12
o1ka
guidou@ - Thanks for comments! Addressed. https://codereview.chromium.org/1769933002/diff/20001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/1769933002/diff/20001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode33 content/renderer/media/audio_renderer_mixer_manager.cc:33: std::string new_device_id(device_id); On ...
4 years, 8 months ago (2016-04-07 12:40:49 UTC) #13
Guido Urdaneta
lgtm, but consider removing the string copy that remains.
4 years, 8 months ago (2016-04-07 15:27:03 UTC) #14
Guido Urdaneta
https://codereview.chromium.org/1769933002/diff/40001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/1769933002/diff/40001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode42 content/renderer/media/audio_renderer_mixer_manager.cc:42: device_id_from_session = You can also avoid this copy. Save ...
4 years, 8 months ago (2016-04-07 15:27:15 UTC) #15
o1ka
On 2016/04/07 15:27:15, Guido Urdaneta wrote: > https://codereview.chromium.org/1769933002/diff/40001/content/renderer/media/audio_renderer_mixer_manager.cc > File content/renderer/media/audio_renderer_mixer_manager.cc (right): > > https://codereview.chromium.org/1769933002/diff/40001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode42 ...
4 years, 8 months ago (2016-04-07 15:56:01 UTC) #16
o1ka
PleeeeaseTAL Patch Set 5 : Switch to use AudioDeviceFactory::GetOutputDevice() in AudioRendererMixerManager; AudioDeviceFactory cleanup.
4 years, 8 months ago (2016-04-08 12:50:58 UTC) #17
tommi (sloooow) - chröme
https://codereview.chromium.org/1769933002/diff/80001/content/renderer/media/audio_device_factory.h File content/renderer/media/audio_device_factory.h (right): https://codereview.chromium.org/1769933002/diff/80001/content/renderer/media/audio_device_factory.h#newcode82 content/renderer/media/audio_device_factory.h:82: static const media::OutputDeviceInfo GetOutputDeviceInfo( why this change? the caller ...
4 years, 8 months ago (2016-04-08 13:47:48 UTC) #18
o1ka
tommi@: comments addressed - thanks! https://codereview.chromium.org/1769933002/diff/80001/content/renderer/media/audio_device_factory.h File content/renderer/media/audio_device_factory.h (right): https://codereview.chromium.org/1769933002/diff/80001/content/renderer/media/audio_device_factory.h#newcode82 content/renderer/media/audio_device_factory.h:82: static const media::OutputDeviceInfo GetOutputDeviceInfo( ...
4 years, 8 months ago (2016-04-08 19:07:25 UTC) #19
o1ka
nasko@chromium.org: Need your RS on content/common/media/audio_messages.h content/renderer/pepper/pepper_platform_audio_output.h content/renderer/pepper/pepper_platform_audio_output.cc DaleCurtis@: WDYT of AudioRendererMixerManager? tommi@ - please ...
4 years, 8 months ago (2016-04-11 09:58:03 UTC) #21
tommi (sloooow) - chröme
lgtm
4 years, 8 months ago (2016-04-11 10:50:42 UTC) #22
Henrik Grunell
lgtm https://codereview.chromium.org/1769933002/diff/100001/media/base/output_device_info.h File media/base/output_device_info.h (right): https://codereview.chromium.org/1769933002/diff/100001/media/base/output_device_info.h#newcode28 media/base/output_device_info.h:28: // AudioRendererSink::GetOutputDeviceInfo() Thanks!
4 years, 8 months ago (2016-04-11 16:56:57 UTC) #23
DaleCurtis
media/audio is traditionally browser side only; so seeing it used renderer side is a bit ...
4 years, 8 months ago (2016-04-11 17:45:22 UTC) #24
nasko
IPC LGTM
4 years, 8 months ago (2016-04-11 18:54:27 UTC) #25
o1ka
On 2016/04/11 17:45:22, DaleCurtis wrote: > media/audio is traditionally browser side only; so seeing it ...
4 years, 8 months ago (2016-04-12 10:24:16 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1769933002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1769933002/120001
4 years, 8 months ago (2016-04-12 10:26:38 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-12 11:39:32 UTC) #31
commit-bot: I haz the power
4 years, 8 months ago (2016-04-12 11:40:45 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/121c63d12d10be3dab0ebb032595f2bea95c42c8
Cr-Commit-Position: refs/heads/master@{#386652}

Powered by Google App Engine
This is Rietveld 408576698