]> git.sesse.net Git - casparcg/blob - modules/flash/producer/cg_proxy.h
set svn:eol-style native on .h and .cpp files
[casparcg] / modules / flash / producer / cg_proxy.h
1 /*
2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
3 *
4 * This file is part of CasparCG (www.casparcg.com).
5 *
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.
10 *
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.
15 *
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/>.
18 *
19 * Author: Robert Nagy, ronag89@gmail.com
20 */
21
22 #pragma once
23
24 #include <core/producer/frame_producer.h>
25 #include <core/producer/stage.h>
26 #include <core/video_format.h>
27 #include <core/video_channel.h>
28
29 #include <boost/thread/future.hpp>
30
31 #include <string>
32
33 namespace caspar { namespace flash {
34                 
35 class cg_proxy
36 {
37 public:
38         static const unsigned int DEFAULT_LAYER = 9999;
39
40         explicit cg_proxy(const spl::shared_ptr<core::frame_producer>& producer);
41         cg_proxy(cg_proxy&& other);
42         
43         //cg_proxy
44
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"");
46         void remove(int layer);
47         void play(int layer);
48         void stop(int layer, unsigned int mix_out_duration);
49         void next(int layer);
50         void update(int layer, const std::wstring& data);
51         std::wstring invoke(int layer, const std::wstring& label);
52         std::wstring description(int layer);
53         std::wstring template_host_info();
54
55 private:
56         struct impl;
57         std::shared_ptr<impl> impl_;
58 };
59 cg_proxy create_cg_proxy(const spl::shared_ptr<core::video_channel>& video_channel, int layer_index = cg_proxy::DEFAULT_LAYER);
60
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);
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);
63
64 }}