]> git.sesse.net Git - casparcg/blob - modules/html/producer/html_cg_proxy.cpp
* Merged html producer and updated to latest CEF version (does not have satisfactory...
[casparcg] / modules / html / producer / html_cg_proxy.cpp
1 /*
2 * Copyright 2013 Sveriges Television AB http://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: Helge Norberg, helge.norberg@svt.se
20 */
21
22 #include "html_cg_proxy.h"
23
24 #include <future>
25
26 namespace caspar { namespace html {
27
28 struct html_cg_proxy::impl
29 {
30         spl::shared_ptr<core::frame_producer> producer;
31 };
32
33 html_cg_proxy::html_cg_proxy(spl::shared_ptr<core::frame_producer> producer)
34         : impl_(new impl { producer })
35 {
36 }
37
38 html_cg_proxy::~html_cg_proxy()
39 {
40 }
41
42 void html_cg_proxy::add(
43                 int layer,
44                 const std::wstring& template_name,
45                 bool play_on_load,
46                 const std::wstring& start_from_label,
47                 const std::wstring& data)
48 {
49         update(layer, data);
50
51         if (play_on_load)
52                 play(layer);
53 }
54
55 void html_cg_proxy::remove(int layer)
56 {
57         impl_->producer->call({ L"remove()" });
58 }
59
60 void html_cg_proxy::play(int layer)
61 {
62         impl_->producer->call({ L"play()" });
63 }
64
65 void html_cg_proxy::stop(int layer, unsigned int mix_out_duration)
66 {
67         impl_->producer->call({ L"stop()" });
68 }
69
70 void html_cg_proxy::next(int layer)
71 {
72         impl_->producer->call({ L"next()" });
73 }
74
75 void html_cg_proxy::update(int layer, const std::wstring& data)
76 {
77
78 }
79
80 std::wstring html_cg_proxy::invoke(int layer, const std::wstring& label)
81 {
82         return L"";
83 }
84
85 std::wstring html_cg_proxy::description(int layer)
86 {
87         return L"";
88 }
89
90 std::wstring html_cg_proxy::template_host_info()
91 {
92         return L"";
93 }
94
95 }}