1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_REMOTING_COURIER_RENDERER_FACTORY_H_
6 #define MEDIA_REMOTING_COURIER_RENDERER_FACTORY_H_
8 #include "base/task/sequenced_task_runner.h"
9 #include "media/base/renderer_factory.h"
10 #include "media/remoting/renderer_controller.h"
15 // Creates Renderers for remote playback.
16 class CourierRendererFactory : public RendererFactory {
18 explicit CourierRendererFactory(
19 std::unique_ptr<RendererController> controller);
21 CourierRendererFactory(const CourierRendererFactory&) = delete;
22 CourierRendererFactory& operator=(const CourierRendererFactory&) = delete;
24 ~CourierRendererFactory() override;
26 std::unique_ptr<Renderer> CreateRenderer(
27 const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
28 const scoped_refptr<base::TaskRunner>& worker_task_runner,
29 AudioRendererSink* audio_renderer_sink,
30 VideoRendererSink* video_renderer_sink,
31 RequestOverlayInfoCB request_overlay_info_cb,
32 const gfx::ColorSpace& target_color_space) override;
34 // Returns whether remote rendering has started, based off of |controller_|.
35 // Called by RendererFactorySelector to determine when to create a
37 bool IsRemotingActive();
40 const std::unique_ptr<RendererController> controller_;
43 } // namespace remoting
46 #endif // MEDIA_REMOTING_COURIER_RENDERER_FACTORY_H_