OLD | NEW |
(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 |
OLD | NEW |