| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ |
| 6 #define MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ | 6 #define MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "media/audio/audio_manager.h" |
| 11 #include "media/mojo/services/mojo_media_client.h" | 13 #include "media/mojo/services/mojo_media_client.h" |
| 12 | 14 |
| 15 namespace base { |
| 16 class SingleThreadTaskRunner; |
| 17 } |
| 18 |
| 13 namespace media { | 19 namespace media { |
| 14 | 20 |
| 21 class AudioRendererSink; |
| 22 class MediaLog; |
| 23 class RendererFactory; |
| 24 class VideoRendererSink; |
| 25 |
| 15 // Default MojoMediaClient for MojoMediaApplication. | 26 // Default MojoMediaClient for MojoMediaApplication. |
| 16 class DefaultMojoMediaClient : public MojoMediaClient { | 27 class DefaultMojoMediaClient : public MojoMediaClient { |
| 17 public: | 28 public: |
| 18 DefaultMojoMediaClient(); | 29 DefaultMojoMediaClient(); |
| 19 ~DefaultMojoMediaClient() final; | 30 ~DefaultMojoMediaClient() final; |
| 20 | 31 |
| 21 // MojoMediaClient implementation. | 32 // MojoMediaClient implementation. |
| 22 void Initialize() final; | 33 void Initialize() final; |
| 34 scoped_refptr<AudioRendererSink> CreateAudioRendererSink( |
| 35 const std::string& audio_device_id) final; |
| 36 std::unique_ptr<VideoRendererSink> CreateVideoRendererSink( |
| 37 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) final; |
| 38 std::unique_ptr<RendererFactory> CreateRendererFactory( |
| 39 const scoped_refptr<MediaLog>& media_log) final; |
| 23 std::unique_ptr<CdmFactory> CreateCdmFactory( | 40 std::unique_ptr<CdmFactory> CreateCdmFactory( |
| 24 shell::mojom::InterfaceProvider* /* interface_provider */) final; | 41 shell::mojom::InterfaceProvider* /* interface_provider */) final; |
| 25 | 42 |
| 26 private: | 43 private: |
| 44 ScopedAudioManagerPtr audio_manager_; |
| 45 |
| 27 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient); | 46 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient); |
| 28 }; | 47 }; |
| 29 | 48 |
| 30 } // namespace media | 49 } // namespace media |
| 31 | 50 |
| 32 #endif // MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ | 51 #endif // MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_ |
| OLD | NEW |