Chromium Code Reviews| 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..b256bb6ceadbd799104585c491a5755598afeb51 |
| --- /dev/null |
| +++ b/media/remoting/remoting_renderer_factory.h |
| @@ -0,0 +1,47 @@ |
| +// 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 base { |
| +class SingleThreadTaskRunner; |
| +class TaskRunner; |
| +} |
|
xhwang
2016/10/01 07:12:15
You don't need this since they are from RendererFa
xjz
2016/10/03 22:31:09
Done.
|
| + |
| +namespace media { |
| + |
| +class AudioRendererSink; |
| +class VideoRendererSink; |
|
xhwang
2016/10/01 07:12:15
ditto
xjz
2016/10/03 22:31:09
Done.
|
| + |
| +// Create renderer for local playback or remoting according to info from |
| +// |remoting_controller|. |
| +// TODO(xjz): Merge this with Eric's implementation. |
| +class MEDIA_EXPORT RemotingRendererFactory : public RendererFactory { |
|
xhwang
2016/10/01 07:12:15
ditto about EXPORT
xjz
2016/10/03 22:31:09
Done.
|
| + 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: |
| + std::unique_ptr<RendererFactory> const default_renderer_factory_; |
| + std::unique_ptr<RemotingController> const remoting_controller_; |
|
xhwang
2016/10/01 07:12:15
style nit: "putting the const first"
https://goo
xjz
2016/10/03 22:31:09
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(RemotingRendererFactory); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_REMOTING_REMOTING_RENDERER_FACTORY_H_ |