| Index: content/renderer/media/audio_device_factory.h
|
| diff --git a/content/renderer/media/audio_device_factory.h b/content/renderer/media/audio_device_factory.h
|
| index 749888ce0499d244cb405770fd6e1b80ee7780b0..79d64b4ab498c4376a6fe52a43aad54726bb80b6 100644
|
| --- a/content/renderer/media/audio_device_factory.h
|
| +++ b/content/renderer/media/audio_device_factory.h
|
| @@ -15,7 +15,6 @@
|
|
|
| namespace media {
|
| class AudioInputDevice;
|
| -class AudioOutputDevice;
|
| }
|
|
|
| namespace url {
|
| @@ -39,7 +38,7 @@ class CONTENT_EXPORT AudioDeviceFactory {
|
| kSourceLast = kSourceWebAudio // Only used for validation of format.
|
| };
|
|
|
| - // Creates an AudioOutputDevice.
|
| + // Creates a sink for AudioRendererMixer.
|
| // |render_frame_id| refers to the RenderFrame containing the entity
|
| // producing the audio. If |session_id| is nonzero, it is used by the browser
|
| // to select the correct input device ID and its associated output device, if
|
| @@ -47,7 +46,7 @@ class CONTENT_EXPORT AudioDeviceFactory {
|
| // identify the output device to use.
|
| // If |session_id| is zero and |device_id| and |security_origin| are empty,
|
| // the default output device will be selected.
|
| - static scoped_refptr<media::AudioOutputDevice> NewOutputDevice(
|
| + static scoped_refptr<media::AudioRendererSink> NewAudioRendererMixerSink(
|
| int render_frame_id,
|
| int session_id,
|
| const std::string& device_id,
|
| @@ -65,18 +64,18 @@ class CONTENT_EXPORT AudioDeviceFactory {
|
| const std::string& device_id,
|
| const url::Origin& security_origin);
|
|
|
| - // Creates a RestartableAudioRendererSink bound to an AudioOutputDevice
|
| + // Creates a SwitchableAudioRendererSink bound to an AudioOutputDevice
|
| // Basing on |source_type| and build configuration, audio played out through
|
| // the sink goes to AOD directly or can be mixed with other audio before that.
|
| - static scoped_refptr<media::RestartableAudioRendererSink>
|
| - NewRestartableAudioRendererSink(SourceType source_type,
|
| - int render_frame_id,
|
| - int session_id,
|
| - const std::string& device_id,
|
| - const url::Origin& security_origin);
|
| -
|
| - // A helper to get HW device status in the absence of AudioOutputDevice.
|
| - static media::OutputDeviceStatus GetOutputDeviceStatus(
|
| + static scoped_refptr<media::SwitchableAudioRendererSink>
|
| + NewSwitchableAudioRendererSink(SourceType source_type,
|
| + int render_frame_id,
|
| + int session_id,
|
| + const std::string& device_id,
|
| + const url::Origin& security_origin);
|
| +
|
| + // A helper to get device info in the absence of AudioOutputDevice.
|
| + static media::OutputDeviceInfo GetOutputDeviceInfo(
|
| int render_frame_id,
|
| int session_id,
|
| const std::string& device_id,
|
| @@ -96,27 +95,28 @@ class CONTENT_EXPORT AudioDeviceFactory {
|
| // functions to provide alternate audio device implementations.
|
| // If the return value of either of these function is NULL, we fall back
|
| // on the default implementation.
|
| - virtual media::AudioOutputDevice* CreateOutputDevice(
|
| + virtual scoped_refptr<media::AudioRendererSink> CreateAudioRendererMixerSink(
|
| int render_frame_id,
|
| int sesssion_id,
|
| const std::string& device_id,
|
| const url::Origin& security_origin) = 0;
|
|
|
| - virtual media::AudioRendererSink* CreateAudioRendererSink(
|
| + virtual scoped_refptr<media::AudioRendererSink> CreateAudioRendererSink(
|
| SourceType source_type,
|
| int render_frame_id,
|
| int sesssion_id,
|
| const std::string& device_id,
|
| const url::Origin& security_origin) = 0;
|
|
|
| - virtual media::RestartableAudioRendererSink*
|
| - CreateRestartableAudioRendererSink(SourceType source_type,
|
| - int render_frame_id,
|
| - int sesssion_id,
|
| - const std::string& device_id,
|
| - const url::Origin& security_origin) = 0;
|
| + virtual scoped_refptr<media::SwitchableAudioRendererSink>
|
| + CreateSwitchableAudioRendererSink(SourceType source_type,
|
| + int render_frame_id,
|
| + int sesssion_id,
|
| + const std::string& device_id,
|
| + const url::Origin& security_origin) = 0;
|
|
|
| - virtual media::AudioInputDevice* CreateInputDevice(int render_frame_id) = 0;
|
| + virtual scoped_refptr<media::AudioInputDevice> CreateInputDevice(
|
| + int render_frame_id) = 0;
|
|
|
| private:
|
| // The current globally registered factory. This is NULL when we should
|
|
|