2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG.
\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
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
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
22 #include "../frame_producer.h"
\r
30 class FlashAxContainer;
\r
32 ///=================================================================================================
\r
33 /// <summary> Flash Producer. </summary>
\r
34 ///=================================================================================================
\r
35 class flash_producer : public frame_producer
\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
45 flash_producer(const std::wstring& filename, const frame_format_desc& format_desc, Monitor* monitor = nullptr);
\r
46 frame_ptr get_frame();
\r
47 const frame_format_desc& get_frame_format_desc() const;
\r
49 void param(const std::wstring& param);
\r
51 static std::wstring find_template(const std::wstring& templateName);
\r
54 friend class flash::FlashAxContainer;
\r
56 Monitor* get_monitor();
\r
58 struct implementation;
\r
59 std::shared_ptr<implementation> impl_;
\r
63 typedef std::tr1::shared_ptr<flash_producer> flash_producer_ptr;
\r
65 flash_producer_ptr create_flash_producer(const std::vector<std::wstring>& params, const frame_format_desc& format_desc);
\r