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

Unified 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, 4 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_renderer_client_impl.h
diff --git a/media/mojo/services/mojo_renderer_client_impl.h b/media/mojo/services/mojo_renderer_client_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..56261a53473c8ec2abc0d1fae78bfa20753e5866
--- /dev/null
+++ b/media/mojo/services/mojo_renderer_client_impl.h
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
+#define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
+
+#include "base/macros.h"
+#include "media/base/renderer.h"
+#include "media/mojo/interfaces/media_renderer.mojom.h"
+#include "mojo/public/interfaces/application/service_provider.mojom.h"
+
+namespace media {
+
+// A media::Renderer that proxies to a mojo::MediaRenderer.
+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
+ public mojo::MediaRendererClient {
+ public:
+ // |media_renderer_provider| is the ServiceProvider for an Application
+ // that is hosting a mojo::MediaRenderer.
+ explicit MojoRendererClientImpl(
+ 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!
+ virtual ~MojoRendererClientImpl();
+
+ // Renderer implementation.
+ virtual void Initialize(const PipelineStatusCB& init_cb,
+ const StatisticsCB& statistics_cb,
+ const base::Closure& ended_cb,
+ const PipelineStatusCB& error_cb,
+ const BufferingStateCB& buffering_state_cb,
+ const TimeDeltaCB& get_duration_cb) OVERRIDE;
+ virtual void Flush(const base::Closure& flush_cb) OVERRIDE;
+ virtual void StartPlayingFrom(base::TimeDelta time) OVERRIDE;
+ virtual void SetPlaybackRate(float playback_rate) OVERRIDE;
+ virtual void SetVolume(float volume) OVERRIDE;
+ virtual base::TimeDelta GetMediaTime() OVERRIDE;
+ virtual bool HasAudio() OVERRIDE;
+ virtual bool HasVideo() OVERRIDE;
+ virtual void SetCdm(MediaKeys* cdm) OVERRIDE;
+
+ // mojo::MediaRendererClient implementation.
+ virtual void OnTimeUpdate(int64_t time_delta_usec) MOJO_OVERRIDE;
+ virtual void OnBufferingStateChange(
+ mojo::BufferingState state) MOJO_OVERRIDE;
+ virtual void OnEnded() MOJO_OVERRIDE;
+ virtual void OnError() MOJO_OVERRIDE;
+
+ private:
+ mojo::MediaRendererPtr remote_renderer_;
+ DISALLOW_COPY_AND_ASSIGN(MojoRendererClientImpl);
+};
+
+} // namespace media
+
+#endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
« 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