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

Unified Diff: media/mojo/services/mojo_renderer_service.cc

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
Index: media/mojo/services/mojo_renderer_service.cc
diff --git a/media/mojo/services/mojo_renderer_service.cc b/media/mojo/services/mojo_renderer_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f0e1e118282a91477171afa5f339def59ad33bfe
--- /dev/null
+++ b/media/mojo/services/mojo_renderer_service.cc
@@ -0,0 +1,61 @@
+// 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.
+
+#include "media/mojo/services/mojo_renderer_service.h"
+
+#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/application_connection.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_runner_chromium.h"
+#include "mojo/public/cpp/application/interface_factory_impl.h"
+
+namespace media {
+
+class MojoRendererApplication : public mojo::ApplicationDelegate {
+ public:
+ virtual bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) MOJO_OVERRIDE {
+ connection->AddService(&renderer_instance_factory_);
+ return true;
+ }
+ private:
+ mojo::InterfaceFactoryImpl<MojoRendererService> renderer_instance_factory_;
+};
+
+MojoRendererService::MojoRendererService() {}
+MojoRendererService::~MojoRendererService() {}
+
+void MojoRendererService::Initialize(
+ const mojo::Callback<void(bool)>& callback) {
+
+}
+
+void MojoRendererService::DecodeAndRender(
+ mojo::MediaDecoderBufferPtr buffer,
+ const mojo::Callback<void()>& callback) {
+
+}
+
+void MojoRendererService::Flush(const mojo::Callback<void()>& callback) {
+
+}
+
+void MojoRendererService::StartPlayingFrom(int64_t time_delta_usec) {
+
+}
+
+void MojoRendererService::SetPlaybackRate(float playback_rate) {
+
+}
+
+void MojoRendererService::SetVolume(float volume) {
+
+}
+
+} // namespace media
+
+MojoResult MojoMain(MojoHandle shell_handle) {
+ mojo::ApplicationRunnerChromium runner(new media::MojoRendererApplication);
+ return runner.Run(shell_handle);
+}

Powered by Google App Engine
This is Rietveld 408576698