]> git.sesse.net Git - casparcg/blob - core/producer/flash/flash_producer.h
2.0.0.2:
[casparcg] / core / producer / flash / flash_producer.h
1 /*\r
2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
3 *\r
4 *  This file is part of CasparCG.\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 */\r
20 #pragma once\r
21 \r
22 #include "../frame_producer.h"\r
23 \r
24 namespace caspar { namespace core {\r
25 \r
26 class Monitor;\r
27 \r
28 namespace flash {\r
29 \r
30 class FlashAxContainer;\r
31 \r
32 ///=================================================================================================\r
33 /// <summary>   Flash Producer. </summary>\r
34 ///=================================================================================================\r
35 class flash_producer : public frame_producer\r
36 {\r
37 public:\r
38         /// <summary> Default frame buffer size. </summary>\r
39         static const int DEFAULT_BUFFER_SIZE = 2;\r
40         /// <summary> The maximum number of retries when trying to invoce a flash method. </summary>\r
41         static const int MAX_PARAM_RETRIES = 5;\r
42         /// <summary> Timeout for blocking while trying to stop the producer. </summary>\r
43         static const int STOP_TIMEOUT = 2000;\r
44 \r
45         flash_producer(const std::wstring& filename, const frame_format_desc& format_desc);\r
46         gpu_frame_ptr get_frame();\r
47         const frame_format_desc& get_frame_format_desc() const;\r
48         void initialize(const frame_factory_ptr& factory);\r
49 \r
50         void param(const std::wstring& param);\r
51         \r
52         static std::wstring find_template(const std::wstring& templateName);\r
53 \r
54 private:        \r
55         friend class flash::FlashAxContainer;\r
56 \r
57         struct implementation;\r
58         std::shared_ptr<implementation> impl_;\r
59 \r
60 };\r
61 \r
62 typedef std::tr1::shared_ptr<flash_producer> flash_producer_ptr;\r
63 \r
64 flash_producer_ptr create_flash_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);\r
65 \r
66 }}}