]> git.sesse.net Git - casparcg/blob - modules/flash/producer/cg_producer.h
ยค412
[casparcg] / modules / flash / producer / cg_producer.h
1 #pragma once\r
2 \r
3 #include <core/producer/frame_producer.h>\r
4 #include <core/producer/frame_producer_device.h>\r
5 #include <core/video_format.h>\r
6 #include <core/channel.h>\r
7 \r
8 #include <string>\r
9 \r
10 namespace caspar {\r
11                 \r
12 class cg_producer : public core::frame_producer\r
13 {\r
14 public:\r
15         static const unsigned int DEFAULT_LAYER = 9999;\r
16 \r
17         explicit cg_producer();\r
18         cg_producer(cg_producer&& other);\r
19         \r
20         void clear();\r
21         void add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = TEXT(""), const std::wstring& data = TEXT(""));\r
22         void remove(int layer);\r
23         void play(int layer);\r
24         void stop(int layer, unsigned int mix_out_duration);\r
25         void next(int layer);\r
26         void update(int layer, const std::wstring& data);\r
27         void invoke(int layer, const std::wstring& label);\r
28         \r
29         // frame_producer\r
30         virtual safe_ptr<core::basic_frame> receive();\r
31         virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory);\r
32         virtual std::wstring print() const;\r
33 \r
34 private:\r
35         struct implementation;\r
36         std::shared_ptr<implementation> impl_;\r
37 };\r
38 safe_ptr<cg_producer> get_default_cg_producer(const safe_ptr<core::channel>& channel, int layer_index = cg_producer::DEFAULT_LAYER);\r
39 \r
40 safe_ptr<core::frame_producer> create_ct_producer(const std::vector<std::wstring>& params);\r
41 \r
42 }