: flash_producer_(frame_producer)\r
{}\r
\r
- boost::unique_future<std::wstring> add(int layer, std::wstring filename, bool play_on_load, const std::wstring& label, const std::wstring& data)\r
+ boost::unique_future<std::wstring> add(int layer, std::wstring filename, bool play_on_load, const std::wstring& label, std::wstring data)\r
{\r
if(filename.size() > 0 && filename[0] == L'/')\r
filename = filename.substr(1, filename.size()-1);\r
\r
+ if(boost::filesystem::wpath(filename).extension() == L"")\r
+ filename += L".ft";\r
+ \r
auto str = (boost::wformat(L"<invoke name=\"Add\" returntype=\"xml\"><arguments><number>%1%</number><string>%2%</string>%3%<string>%4%</string><string><![CDATA[%5%]]></string></arguments></invoke>") % layer % filename % (play_on_load?TEXT("<true/>"):TEXT("<false/>")) % label % data).str();\r
\r
CASPAR_LOG(info) << flash_producer_->print() << " Invoking add-command: " << str;\r
{ \r
auto flash_producer = video_channel->stage()->foreground(render_layer).get();\r
\r
- if(flash_producer->print().find(L"flash[") == std::string::npos) // UGLY hack\r
+ try\r
+ {\r
+ if(flash_producer->print().find(L"flash[") == std::string::npos) // UGLY hack\r
+ {\r
+ flash_producer = make_safe<cg_producer>(flash::create_producer(video_channel->mixer(), boost::assign::list_of<std::wstring>())); \r
+ video_channel->stage()->load(render_layer, flash_producer); \r
+ video_channel->stage()->play(render_layer);\r
+ }\r
+ }\r
+ catch(...)\r
{\r
- flash_producer = make_safe<cg_producer>(flash::create_producer(video_channel->mixer(), boost::assign::list_of<std::wstring>())); \r
- video_channel->stage()->load(render_layer, flash_producer); \r
- video_channel->stage()->play(render_layer);\r
+ CASPAR_LOG_CURRENT_EXCEPTION();\r
+ throw;\r
}\r
\r
return static_pointer_cast<cg_producer>(flash_producer);\r
std::wstring value = parameters[3];\r
std::transform(value.begin(), value.end(), value.begin(), toupper);\r
\r
- //this->pCIIStrategy_->GetChannel()->SetVideoFormat(value); TODO\r
+ this->pCIIStrategy_->GetChannel()->set_video_format_desc(core::video_format_desc::get(value));\r
}\r
}\r
\r
\r
void CIIProtocolStrategy::ProcessMessage(const std::wstring& message)\r
{\r
- CASPAR_LOG(debug) << message.c_str();\r
+ CASPAR_LOG(debug) << L"Received: " << message.c_str();\r
\r
std::vector<std::wstring> tokens;\r
int tokenCount = TokenizeMessage(message, &tokens);\r