New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595727 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO Dec 22 - Jan 8
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 587457



Sign in to add a comment

Move SwitchOutputDevice() out of OutputDevice interface

Project Member Reported by olka@chromium.org, Mar 17 2016

Issue description

The initial purpose of the combination of AudioRendererSink::GetOutputDevice() method and OutputDevice interface was to provide access to output-device/hardware-related info at each level of the chain of sinks without the need for each of those sinks to implement OutputDevice methods: instead, each sink redirects to a lower layer, and AudioOutputDevice is the bottom one which actually implements OutputDevice. Since then, AudioOutputDevice stopped to support SwitchOutputDevice, and now some sinks return |this| as OutputDevice and implement OutputDevice interface, and SwitchOutputDevice specifically.

Refactor interfaces to return to the original idea that AudioOutputDevice is the only sink which implements OutputDevice interface, and all the other sinks refer to lower layers through  AudioRendererSink::GetOutputDevice().

 

Comment 1 by sshru...@google.com, Mar 21 2016

Components: -Blink>Audio Blink>Media>Audio
Renaming Blink>Audio to Blink>Media>Audio for better characterization
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68b69396916a10dbace194d871c854302bd98347

commit 68b69396916a10dbace194d871c854302bd98347
Author: olka <olka@chromium.org>
Date: Fri Apr 01 11:42:12 2016

Getting rid of OutputDevice interface, moving SwitchOutputDevice() to AudioRendererSink and MediaStreamAudioRenderer interfaces.

1) OutputDevice interface eliminated;
2) OutputDeviceInfo data structure introduced; besides output parameters and device status, it provides device ID information now (at this stage it's useful for unit tests only, but it will also be used for session ID -> device ID mapping in the upcoming CL).
3) AudioRendererSink::GetOutputDevice() is replaced with AudioRendererSink::GetOutputDeviceInfo(), which returns a snapshot of output device information.
3) SwitchOutputDevice() method added to  MediaStreamAudioRenderer;
4) SwitchOutputDevice() method added to AudioRendererSink;
5) Mocks and unit tests cleaned up; sink_for_testing_ is removed from AudioRendererMixerManager, mock AudioDeviceFactory is used instead to instantiate sinks for its testing;
6) AudioRendererMixer is dependent on AudioOutputDevice no more; from now on AudioOutputDevice is visible to upper layers as AudioRendererSink only;
7) AudioOutputDevice is the only sink which implements GetOutputDeviceInfo(), all the other sinks redirect the call to their bottom layer.

See bug description for mode details and a link to doc with pictures (a bit outdated since Patchset 5 which eliminated OutputDevice interface).

BUG= 595727 ,  506507 

Review URL: https://codereview.chromium.org/1809093003

Cr-Commit-Position: refs/heads/master@{#384550}

[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/browser/renderer_host/media/audio_renderer_host.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/public/renderer/media_stream_audio_renderer.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/audio_device_factory.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/audio_device_factory.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/audio_renderer_mixer_manager.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/audio_renderer_mixer_manager.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/track_audio_renderer.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/track_audio_renderer.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/webrtc_audio_capturer.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/webrtc_audio_renderer.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/webrtc_audio_renderer.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/media/webrtc_audio_renderer_unittest.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_output_device.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_output_device.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_output_ipc.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_output_stream_sink.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_output_stream_sink.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_parameters.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/audio_parameters.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/clockless_audio_sink.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/clockless_audio_sink.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/null_audio_sink.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/audio/null_audio_sink.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/BUILD.gn
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer_input.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer_input.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer_input_unittest.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_mixer_unittest.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/audio_renderer_sink.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/fake_audio_renderer_sink.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/fake_audio_renderer_sink.h
[delete] https://crrev.com/2df951b02d7d03cd35d64e7bfc725eb24e1fd4b3/media/base/fake_output_device.cc
[delete] https://crrev.com/2df951b02d7d03cd35d64e7bfc725eb24e1fd4b3/media/base/fake_output_device.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/mock_audio_renderer_sink.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/mock_audio_renderer_sink.h
[delete] https://crrev.com/2df951b02d7d03cd35d64e7bfc725eb24e1fd4b3/media/base/output_device.h
[add] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/output_device_info.cc
[add] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/base/output_device_info.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webaudiosourceprovider_impl.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webaudiosourceprovider_impl.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_impl_unittest.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_params.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_params.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_util.cc
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/blink/webmediaplayer_util.h
[modify] https://crrev.com/68b69396916a10dbace194d871c854302bd98347/media/media.gyp

Comment 3 by olka@chromium.org, Apr 12 2016

Status: Fixed (was: Started)

Sign in to add a comment