| 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_MOJO_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class AudioDecoder; | 26 class AudioDecoder; |
| 27 class AudioRendererSink; | 27 class AudioRendererSink; |
| 28 class CdmFactory; | 28 class CdmFactory; |
| 29 class MediaLog; | 29 class MediaLog; |
| 30 class RendererFactory; | 30 class RendererFactory; |
| 31 class VideoDecoder; | 31 class VideoDecoder; |
| 32 class VideoRendererSink; | 32 class VideoRendererSink; |
| 33 | 33 |
| 34 class MEDIA_MOJO_EXPORT MojoMediaClient { | 34 class MEDIA_MOJO_EXPORT MojoMediaClient { |
| 35 public: | 35 public: |
| 36 // Called before the host application is scheduled to quit. |
| 37 // The application message loop is still valid at this point, so all clean |
| 38 // up tasks requiring the message loop must be completed before returning. |
| 36 virtual ~MojoMediaClient(); | 39 virtual ~MojoMediaClient(); |
| 37 | 40 |
| 38 // Called exactly once before any other method. | 41 // Called exactly once before any other method. |
| 39 virtual void Initialize(); | 42 virtual void Initialize(); |
| 40 | 43 |
| 41 // Called before the host application is scheduled to quit. | |
| 42 // The application message loop is still valid at this point, so all clean | |
| 43 // up tasks requiring the message loop must be completed before returning. | |
| 44 virtual void WillQuit(); | |
| 45 | |
| 46 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( | 44 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( |
| 47 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 45 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 48 | 46 |
| 49 virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( | 47 virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( |
| 50 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 48 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 51 | 49 |
| 52 // Returns the output sink used for rendering audio on |audio_device_id|. | 50 // Returns the output sink used for rendering audio on |audio_device_id|. |
| 53 // May be null if the RendererFactory doesn't need an audio sink. | 51 // May be null if the RendererFactory doesn't need an audio sink. |
| 54 virtual scoped_refptr<AudioRendererSink> CreateAudioRendererSink( | 52 virtual scoped_refptr<AudioRendererSink> CreateAudioRendererSink( |
| 55 const std::string& audio_device_id); | 53 const std::string& audio_device_id); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 67 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( | 65 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( |
| 68 shell::mojom::InterfaceProvider* interface_provider); | 66 shell::mojom::InterfaceProvider* interface_provider); |
| 69 | 67 |
| 70 protected: | 68 protected: |
| 71 MojoMediaClient(); | 69 MojoMediaClient(); |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 } // namespace media | 72 } // namespace media |
| 75 | 73 |
| 76 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 74 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
| OLD | NEW |