| 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_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 10 #include "media/base/renderer.h" | 12 #include "media/base/renderer.h" |
| 11 #include "media/mojo/interfaces/media_renderer.mojom.h" | 13 #include "media/mojo/interfaces/media_renderer.mojom.h" |
| 14 #include "url/gurl.h" |
| 12 | 15 |
| 13 namespace base { | 16 namespace base { |
| 14 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
| 15 } | 18 } |
| 16 | 19 |
| 17 namespace media { | 20 namespace media { |
| 18 | 21 |
| 19 class DemuxerStreamProvider; | 22 class DemuxerStreamProvider; |
| 20 | 23 |
| 21 // A media::Renderer that proxies to a mojo::MediaRenderer. That | 24 // A media::Renderer that proxies to a mojo::MediaRenderer. That |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 const BufferingStateCB& buffering_state_cb, | 42 const BufferingStateCB& buffering_state_cb, |
| 40 const base::Closure& ended_cb, | 43 const base::Closure& ended_cb, |
| 41 const PipelineStatusCB& error_cb, | 44 const PipelineStatusCB& error_cb, |
| 42 const base::Closure& waiting_for_decryption_key_cb) override; | 45 const base::Closure& waiting_for_decryption_key_cb) override; |
| 43 void SetCdm(CdmContext* cdm_context, | 46 void SetCdm(CdmContext* cdm_context, |
| 44 const CdmAttachedCB& cdm_attached_cb) override; | 47 const CdmAttachedCB& cdm_attached_cb) override; |
| 45 void Flush(const base::Closure& flush_cb) override; | 48 void Flush(const base::Closure& flush_cb) override; |
| 46 void StartPlayingFrom(base::TimeDelta time) override; | 49 void StartPlayingFrom(base::TimeDelta time) override; |
| 47 void SetPlaybackRate(double playback_rate) override; | 50 void SetPlaybackRate(double playback_rate) override; |
| 48 void SetVolume(float volume) override; | 51 void SetVolume(float volume) override; |
| 52 void SwitchAudioOutputDevice(const std::string& device_id, |
| 53 const GURL& security_origin) override; |
| 49 base::TimeDelta GetMediaTime() override; | 54 base::TimeDelta GetMediaTime() override; |
| 50 bool HasAudio() override; | 55 bool HasAudio() override; |
| 51 bool HasVideo() override; | 56 bool HasVideo() override; |
| 52 | 57 |
| 53 // mojo::MediaRendererClient implementation. | 58 // mojo::MediaRendererClient implementation. |
| 54 void OnTimeUpdate(int64_t time_usec, int64_t max_time_usec) override; | 59 void OnTimeUpdate(int64_t time_usec, int64_t max_time_usec) override; |
| 55 void OnBufferingStateChange(mojo::BufferingState state) override; | 60 void OnBufferingStateChange(mojo::BufferingState state) override; |
| 56 void OnEnded() override; | 61 void OnEnded() override; |
| 57 void OnError() override; | 62 void OnError() override; |
| 58 | 63 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 82 base::TimeDelta max_time_; | 87 base::TimeDelta max_time_; |
| 83 | 88 |
| 84 base::WeakPtrFactory<MojoRendererImpl> weak_factory_; | 89 base::WeakPtrFactory<MojoRendererImpl> weak_factory_; |
| 85 | 90 |
| 86 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl); | 91 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl); |
| 87 }; | 92 }; |
| 88 | 93 |
| 89 } // namespace media | 94 } // namespace media |
| 90 | 95 |
| 91 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ | 96 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ |
| OLD | NEW |