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

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

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 10 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') | media/remoting/remoting_sink_observer.h » ('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 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 #include "base/memory/ptr_util.h"
9 #include "media/remoting/remote_renderer_impl.h"
10
11 namespace media {
12
13 RemotingRendererFactory::RemotingRendererFactory(
14 std::unique_ptr<RendererFactory> default_renderer_factory,
15 std::unique_ptr<RemotingRendererController> remoting_renderer_controller)
16 : default_renderer_factory_(std::move(default_renderer_factory)),
17 remoting_renderer_controller_(std::move(remoting_renderer_controller)) {}
18
19 RemotingRendererFactory::~RemotingRendererFactory() {}
20
21 std::unique_ptr<Renderer> RemotingRendererFactory::CreateRenderer(
22 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
23 const scoped_refptr<base::TaskRunner>& worker_task_runner,
24 AudioRendererSink* audio_renderer_sink,
25 VideoRendererSink* video_renderer_sink,
26 const RequestSurfaceCB& request_surface_cb) {
27 if (remoting_renderer_controller_ &&
28 remoting_renderer_controller_->remote_rendering_started()) {
29 VLOG(1) << "Create Remoting renderer.";
30 return base::WrapUnique(new RemoteRendererImpl(
31 media_task_runner, remoting_renderer_controller_->GetWeakPtr(),
32 video_renderer_sink));
33 } else {
34 VLOG(1) << "Create Local playback renderer.";
35 return default_renderer_factory_->CreateRenderer(
36 media_task_runner, worker_task_runner, audio_renderer_sink,
37 video_renderer_sink, request_surface_cb);
38 }
39 }
40
41 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remoting_renderer_factory.h ('k') | media/remoting/remoting_sink_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698