Skip to content
  • olka's avatar
    Getting rid of OutputDevice interface, moving SwitchOutputDevice() to... · 68b69396
    olka authored
    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}
    68b69396