2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
4 * This file is part of CasparCG (www.casparcg.com).
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
19 * Author: Helge Norberg, helge.norberg@svt.se
24 #include "../frame_producer.h"
26 #include "../binding.h"
28 namespace caspar { namespace core { namespace scene {
38 binding<double> opacity;
43 binding<std::wstring> name;
45 adjustments adjustments;
46 binding<spl::shared_ptr<frame_producer>> producer;
49 layer(const spl::shared_ptr<frame_producer>& producer);
52 class scene_producer : public frame_producer_base
55 scene_producer(int width, int height);
58 class draw_frame receive_impl() override;
59 constraints& pixel_constraints() override;
60 void on_interaction(const interaction_event::ptr& event) override;
61 bool collides(double x, double y) const override;
62 std::wstring print() const override;
63 std::wstring name() const override;
64 boost::property_tree::wptree info() const override;
65 void subscribe(const monitor::observable::observer_ptr& o) override;
66 void unsubscribe(const monitor::observable::observer_ptr& o) override;
68 const spl::shared_ptr<frame_producer>& producer, int x, int y);
71 std::unique_ptr<impl> impl_;
74 spl::shared_ptr<frame_producer> create_dummy_scene_producer(const spl::shared_ptr<class frame_factory>& frame_factory, const video_format_desc& format_desc, const std::vector<std::wstring>& params);