Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: media/mojo/services/mojo_renderer_client_impl.h

Issue 518163003: media: scaffolding and plumbing for MojoRenderer{Impl, Service} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@medr
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/media.gyp ('k') | media/mojo/services/mojo_renderer_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/mojo/services/mojo_renderer_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698