]> git.sesse.net Git - casparcg/blob - modules/flash/producer/cg_proxy.h
Merged sfw playing through template host instead of via ffmpeg
[casparcg] / modules / flash / producer / cg_proxy.h
1 /*\r
2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
3 *\r
4 * This file is part of CasparCG (www.casparcg.com).\r
5 *\r
6 * CasparCG is free software: you can redistribute it and/or modify\r
7 * it under the terms of the GNU General Public License as published by\r
8 * the Free Software Foundation, either version 3 of the License, or\r
9 * (at your option) any later version.\r
10 *\r
11 * CasparCG is distributed in the hope that it will be useful,\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14 * GNU General Public License for more details.\r
15 *\r
16 * You should have received a copy of the GNU General Public License\r
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
18 *\r
19 * Author: Robert Nagy, ronag89@gmail.com\r
20 */\r
21 \r
22 #pragma once\r
23 \r
24 #include <core/producer/frame_producer.h>\r
25 #include <core/producer/stage.h>\r
26 #include <core/video_format.h>\r
27 #include <core/video_channel.h>\r
28 \r
29 #include <boost/thread/future.hpp>\r
30 \r
31 #include <string>\r
32 \r
33 namespace caspar { namespace flash {\r
34                 \r
35 class cg_proxy\r
36 {\r
37 public:\r
38         static const unsigned int DEFAULT_LAYER = 9999;\r
39 \r
40         explicit cg_proxy(const spl::shared_ptr<core::frame_producer>& producer);\r
41         cg_proxy(cg_proxy&& other);\r
42         \r
43         //cg_proxy\r
44 \r
45         void add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = L"", const std::wstring& data = L"");\r
46         void remove(int layer);\r
47         void play(int layer);\r
48         void stop(int layer, unsigned int mix_out_duration);\r
49         void next(int layer);\r
50         void update(int layer, const std::wstring& data);\r
51         std::wstring invoke(int layer, const std::wstring& label);\r
52         std::wstring description(int layer);\r
53         std::wstring template_host_info();\r
54 \r
55 private:\r
56         struct impl;\r
57         std::shared_ptr<impl> impl_;\r
58 };\r
59 cg_proxy create_cg_proxy(const spl::shared_ptr<core::video_channel>& video_channel, int layer_index = cg_proxy::DEFAULT_LAYER);\r
60 \r
61 spl::shared_ptr<core::frame_producer> create_ct_producer(const spl::shared_ptr<core::frame_factory> frame_factory, const core::video_format_desc& format_desc, const std::vector<std::wstring>& params);\r
62 spl::shared_ptr<core::frame_producer> create_swf_producer(const spl::shared_ptr<core::frame_factory> frame_factory, const core::video_format_desc& format_desc, const std::vector<std::wstring>& params);\r
63 \r
64 }}\r