Chromium Code Reviews| Index: content/browser/renderer_host/media/audio_output_delegate.h |
| diff --git a/content/browser/renderer_host/media/audio_output_delegate.h b/content/browser/renderer_host/media/audio_output_delegate.h |
| index 2744295acb9a810d9bd9cc060947e211fa3d5a0e..b68b9ffca0fd95014be7a87dfb474c4099225d34 100644 |
| --- a/content/browser/renderer_host/media/audio_output_delegate.h |
| +++ b/content/browser/renderer_host/media/audio_output_delegate.h |
| @@ -10,6 +10,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "content/browser/renderer_host/media/audio_stream_registry.h" |
| #include "content/common/content_export.h" |
| #include "media/audio/audio_output_controller.h" |
| @@ -34,7 +35,8 @@ namespace content { |
| // This class, except for the AudioOutputDelegate::EventHandler implementation, |
| // is operated on the IO thread. |
| class CONTENT_EXPORT AudioOutputDelegate |
| - : public media::AudioOutputController::EventHandler { |
| + : public media::AudioOutputController::EventHandler, |
| + public AudioStreamRegistry::Stream { |
| public: |
| class CONTENT_EXPORT EventHandler { |
| public: |
| @@ -42,9 +44,6 @@ class CONTENT_EXPORT AudioOutputDelegate |
| // All these methods are called on the IO thread. |
| - // Called when the state changes between playing and not playing. |
| - virtual void OnStreamStateChanged(bool playing) = 0; |
| - |
| // Called when construction is finished and the stream is ready for |
| // playout. |
| virtual void OnStreamCreated(int stream_id, |
| @@ -71,6 +70,7 @@ class CONTENT_EXPORT AudioOutputDelegate |
| // The AudioOutputDelegate might issue callbacks until the UniquePtr |
| // destructor finishes, so calling |handler| must be valid until then. |
| static UniquePtr Create(EventHandler* handler, |
| + AudioStreamRegistry* stream_registry, |
| media::AudioManager* audio_manager, |
| std::unique_ptr<media::AudioLog> audio_log, |
| AudioMirroringManager* mirroring_manager, |
| @@ -80,6 +80,7 @@ class CONTENT_EXPORT AudioOutputDelegate |
| int render_process_id, |
| const media::AudioParameters& params, |
| const std::string& output_device_id); |
| + |
| ~AudioOutputDelegate() override; |
| // TODO(maxmorin): Remove this when crbug.com/647185 is closed. |
| @@ -95,6 +96,11 @@ class CONTENT_EXPORT AudioOutputDelegate |
| int stream_id() const { return stream_id_; } |
| +#if BUILDFLAG(ENABLE_WEBRTC) |
| + void EnableDebugRecording(const base::FilePath& base_file_name) override; |
|
o1ka
2016/12/22 10:46:51
Oh, I just realized. AusioStreamRegistry will live
Max Morin
2017/01/09 15:34:23
I think AudioStreamRegistry will live in the brows
o1ka
2017/01/10 11:47:40
Ah ok, sounds good. Stream interfaces need to be f
|
| + void DisableDebugRecording() override; |
| +#endif // BUILDFLAG(ENABLE_WEBRTC) |
| + |
| // Stream control: |
| void OnPlayStream(); |
| void OnPauseStream(); |
| @@ -109,6 +115,7 @@ class CONTENT_EXPORT AudioOutputDelegate |
| private: |
| AudioOutputDelegate(EventHandler* handler, |
| + AudioStreamRegistry* stream_registry, |
| media::AudioManager* audio_manager, |
| std::unique_ptr<media::AudioLog> audio_log, |
| int stream_id, |
| @@ -124,6 +131,7 @@ class CONTENT_EXPORT AudioOutputDelegate |
| // |handler_| is null if we are in the process of destruction. In this case, |
| // we will ignore events from |controller_|. |
| EventHandler* handler_; |
| + AudioStreamRegistry* const stream_registry_; |
| std::unique_ptr<media::AudioLog> const audio_log_; |
| std::unique_ptr<AudioSyncReader> reader_; |
| scoped_refptr<media::AudioOutputController> controller_; |