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

Side by Side Diff: media/remoting/remoting_renderer_factory.cc

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. 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 unified diff | Download patch
« no previous file with comments | « media/remoting/remoting_renderer_factory.h ('k') | no next file » | 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 2016 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 #include "media/remoting/remoting_renderer_factory.h"
6
7 #include "base/logging.h"
8
9 namespace media {
10
11 RemotingRendererFactory::RemotingRendererFactory(
12 std::unique_ptr<RendererFactory> default_renderer_factory,
13 std::unique_ptr<RemotingController> remoting_controller)
14 : default_renderer_factory_(std::move(default_renderer_factory)),
15 remoting_controller_(std::move(remoting_controller)) {}
16
17 RemotingRendererFactory::~RemotingRendererFactory() {}
18
19 std::unique_ptr<Renderer> RemotingRendererFactory::CreateRenderer(
20 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
21 const scoped_refptr<base::TaskRunner>& worker_task_runner,
22 AudioRendererSink* audio_renderer_sink,
23 VideoRendererSink* video_renderer_sink,
24 const RequestSurfaceCB& request_surface_cb) {
25 if (remoting_controller_ && remoting_controller_->is_remoting()) {
26 VLOG(1) << "Create Remoting renderer.";
27 // TODO(xjz): Merge this with Eric's implementation.
28 NOTIMPLEMENTED();
29 return std::unique_ptr<Renderer>();
30 } else {
31 VLOG(1) << "Create Local playback renderer.";
32 return default_renderer_factory_->CreateRenderer(
33 media_task_runner, worker_task_runner, audio_renderer_sink,
34 video_renderer_sink, request_surface_cb);
35 }
36 }
37
38 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remoting_renderer_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698