Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ | |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "media/base/renderer.h" | |
| 10 #include "media/mojo/interfaces/media_renderer.mojom.h" | |
| 11 #include "mojo/public/interfaces/application/service_provider.mojom.h" | |
| 12 | |
| 13 namespace media { | |
| 14 | |
| 15 // A media::Renderer that proxies to a mojo::MediaRenderer. | |
| 16 class MojoRendererClientImpl : public Renderer, | |
|
xhwang
2014/09/02 17:05:52
From media pipeline's perspective, this is a mojo
tim (not reviewing)
2014/09/02 18:20:05
Yeah, I had it named that way before... I think th
| |
| 17 public mojo::MediaRendererClient { | |
| 18 public: | |
| 19 // |media_renderer_provider| is the ServiceProvider for an Application | |
| 20 // that is hosting a mojo::MediaRenderer. | |
| 21 explicit MojoRendererClientImpl( | |
| 22 mojo::ServiceProvider* media_renderer_provider); | |
|
xhwang
2014/09/02 17:05:53
This can also take a DemuxerStreamProvider* demuxe
tim (not reviewing)
2014/09/02 18:20:05
cool!
| |
| 23 virtual ~MojoRendererClientImpl(); | |
| 24 | |
| 25 // Renderer implementation. | |
| 26 virtual void Initialize(const PipelineStatusCB& init_cb, | |
| 27 const StatisticsCB& statistics_cb, | |
| 28 const base::Closure& ended_cb, | |
| 29 const PipelineStatusCB& error_cb, | |
| 30 const BufferingStateCB& buffering_state_cb, | |
| 31 const TimeDeltaCB& get_duration_cb) OVERRIDE; | |
| 32 virtual void Flush(const base::Closure& flush_cb) OVERRIDE; | |
| 33 virtual void StartPlayingFrom(base::TimeDelta time) OVERRIDE; | |
| 34 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; | |
| 35 virtual void SetVolume(float volume) OVERRIDE; | |
| 36 virtual base::TimeDelta GetMediaTime() OVERRIDE; | |
| 37 virtual bool HasAudio() OVERRIDE; | |
| 38 virtual bool HasVideo() OVERRIDE; | |
| 39 virtual void SetCdm(MediaKeys* cdm) OVERRIDE; | |
| 40 | |
| 41 // mojo::MediaRendererClient implementation. | |
| 42 virtual void OnTimeUpdate(int64_t time_delta_usec) MOJO_OVERRIDE; | |
| 43 virtual void OnBufferingStateChange( | |
| 44 mojo::BufferingState state) MOJO_OVERRIDE; | |
| 45 virtual void OnEnded() MOJO_OVERRIDE; | |
| 46 virtual void OnError() MOJO_OVERRIDE; | |
| 47 | |
| 48 private: | |
| 49 mojo::MediaRendererPtr remote_renderer_; | |
| 50 DISALLOW_COPY_AND_ASSIGN(MojoRendererClientImpl); | |
| 51 }; | |
| 52 | |
| 53 } // namespace media | |
| 54 | |
| 55 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ | |
| OLD | NEW |