return cg_proxy(std::move(flash_producer));\r
}\r
\r
-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
+spl::shared_ptr<core::frame_producer> create_cg_producer_and_autoplay_file(\r
+ const spl::shared_ptr<core::frame_factory> frame_factory, \r
+ const core::video_format_desc& format_desc, \r
+ const std::vector<std::wstring>& params,\r
+ const std::wstring& filename) \r
{\r
- std::wstring filename = env::media_folder() + L"\\" + params[0] + L".ct";\r
if(!boost::filesystem::exists(filename))\r
return core::frame_producer::empty();\r
\r
boost::filesystem::path path(filename);\r
path = boost::filesystem3::complete(path);\r
- filename = path.wstring();\r
+ auto filename2 = path.wstring();\r
\r
auto flash_producer = flash::create_producer(frame_factory, format_desc, boost::assign::list_of<std::wstring>()); \r
auto producer = flash_producer;\r
- cg_proxy(producer).add(0, filename, 1);\r
+ cg_proxy(producer).add(0, filename2, 1);\r
\r
return producer;\r
}\r
\r
+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
+{\r
+ return create_cg_producer_and_autoplay_file(\r
+ frame_factory, format_desc, params, env::media_folder() + L"\\" + params[0] + L".ct");\r
+}\r
+\r
+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
+{\r
+ return create_cg_producer_and_autoplay_file(\r
+ frame_factory, format_desc, params, env::media_folder() + L"\\" + params[0] + L".swf");\r
+}\r
+\r
cg_proxy::cg_proxy(const spl::shared_ptr<core::frame_producer>& frame_producer) : impl_(new impl(frame_producer)){}\r
cg_proxy::cg_proxy(cg_proxy&& other) : impl_(std::move(other.impl_)){}\r
void cg_proxy::add(int layer, const std::wstring& template_name, bool play_on_load, const std::wstring& startFromLabel, const std::wstring& data){impl_->add(layer, template_name, play_on_load, startFromLabel, data);}\r
cg_proxy create_cg_proxy(const spl::shared_ptr<core::video_channel>& video_channel, int layer_index = cg_proxy::DEFAULT_LAYER);\r
\r
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
+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
\r
-}}
\ No newline at end of file
+}}\r