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

Unified Diff: media/remoting/remoting_renderer_factory.h

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Add building flag. Created 4 years, 2 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/remoting/remoting_renderer_factory.h
diff --git a/media/remoting/remoting_renderer_factory.h b/media/remoting/remoting_renderer_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d542b22279be96f58b627a3d52e88bb1b168063
--- /dev/null
+++ b/media/remoting/remoting_renderer_factory.h
@@ -0,0 +1,39 @@
+// Copyright 2016 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_REMOTING_REMOTING_RENDERER_FACTORY_H_
+#define MEDIA_REMOTING_REMOTING_RENDERER_FACTORY_H_
+
+#include "media/base/renderer_factory.h"
+#include "media/remoting/remoting_controller.h"
+
+namespace media {
+
+// Create renderer for local playback or remoting according to info from
+// |remoting_controller|.
+// TODO(xjz): Merge this with Eric's implementation.
+class RemotingRendererFactory : public RendererFactory {
+ public:
+ RemotingRendererFactory(
+ std::unique_ptr<RendererFactory> default_renderer_factory,
+ std::unique_ptr<RemotingController> remoting_controller);
+ ~RemotingRendererFactory() override;
+
+ std::unique_ptr<Renderer> CreateRenderer(
+ const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
+ const scoped_refptr<base::TaskRunner>& worker_task_runner,
+ AudioRendererSink* audio_renderer_sink,
+ VideoRendererSink* video_renderer_sink,
+ const RequestSurfaceCB& request_surface_cb) override;
+
+ private:
+ const std::unique_ptr<RendererFactory> default_renderer_factory_;
+ const std::unique_ptr<RemotingController> remoting_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(RemotingRendererFactory);
+};
+
+} // namespace media
+
+#endif // MEDIA_REMOTING_REMOTING_RENDERER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698