if(prev.volume < 0.001 && next.volume < 0.001)\r
continue;\r
\r
+ if(item.audio_data.size() != format_desc.audio_samples_per_frame)\r
+ continue;\r
+\r
const float prev_volume = static_cast<float>(prev.volume);\r
const float next_volume = static_cast<float>(next.volume);\r
\r
struct video_channel::implementation : boost::noncopyable\r
{\r
const int index_;\r
- const video_format_desc format_desc_;\r
+ video_format_desc format_desc_;\r
const safe_ptr<ogl_device> ogl_;\r
safe_ptr<diagnostics::graph> graph_;\r
\r
\r
void set_video_format_desc(const video_format_desc& format_desc)\r
{\r
- mixer_->set_video_format_desc(format_desc);\r
- output_->set_video_format_desc(format_desc);\r
- ogl_->gc();\r
+ try\r
+ {\r
+ output_->set_video_format_desc(format_desc);\r
+ mixer_->set_video_format_desc(format_desc);\r
+ ogl_->gc();\r
+ }\r
+ catch(...)\r
+ {\r
+ output_->set_video_format_desc(format_desc_);\r
+ mixer_->set_video_format_desc(format_desc_);\r
+ throw;\r
+ }\r
+ format_desc_ = format_desc;\r
}\r
\r
std::wstring print() const\r
}\r
else if(str.find(TEXT("OnCommand")) != std::wstring::npos) {\r
//this is how templatehost 1.8 reports that a command has been received\r
- CASPAR_LOG(info) << print_() << L" Command: \n-------------------------------------------\n" << str << L"\n-------------------------------------------";\r
+ CASPAR_LOG(debug) << print_() << L" Command: \n-------------------------------------------\n" << str << L"\n-------------------------------------------";\r
bCallSuccessful_ = true;\r
}\r
else if(str.find(TEXT("Activity")) != std::wstring::npos)\r
{\r
- CASPAR_LOG(info) << print_() << L" Activity: \n-------------------------------------------\n" << str << L"\n-------------------------------------------";\r
+ CASPAR_LOG(debug) << print_() << L" Activity: \n-------------------------------------------\n" << str << L"\n-------------------------------------------";\r
\r
//this is how templatehost 1.7 reports that a command has been received\r
if(str.find(TEXT("Command recieved")) != std::wstring::npos)\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
+ CASPAR_LOG(info) << flash_producer_->print() << " Invoking add-command: " << str;\r
flash_producer_->param(str);\r
}\r
\r
void remove(int layer)\r
{\r
auto str = (boost::wformat(L"<invoke name=\"Delete\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array></arguments></invoke>") % layer).str();\r
- CASPAR_LOG(info) << flash_producer_->print() << " Invoking remove-command:" << str;\r
+ CASPAR_LOG(info) << flash_producer_->print() << " Invoking remove-command: " << str;\r
flash_producer_->param(str);\r
}\r
\r
void stop(int layer, unsigned int)\r
{\r
auto str = (boost::wformat(L"<invoke name=\"Stop\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array><number>0</number></arguments></invoke>") % layer).str();\r
- CASPAR_LOG(info) << flash_producer_->print() << " Invoking stop-command:" << str;\r
+ CASPAR_LOG(info) << flash_producer_->print() << " Invoking stop-command: " << str;\r
flash_producer_->param(str);\r
}\r
\r
void next(int layer)\r
{\r
auto str = (boost::wformat(L"<invoke name=\"Next\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array></arguments></invoke>") % layer).str();\r
- CASPAR_LOG(info) << flash_producer_->print() << " Invoking next-command:" << str;\r
+ CASPAR_LOG(info) << flash_producer_->print() << " Invoking next-command: " << str;\r
flash_producer_->param(str);\r
}\r
\r
void update(int layer, const std::wstring& data)\r
{\r
auto str = (boost::wformat(L"<invoke name=\"SetData\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array><string><![CDATA[%2%]]></string></arguments></invoke>") % layer % data).str();\r
- CASPAR_LOG(info) << flash_producer_->print() <<" Invoking update-command:" << str;\r
+ CASPAR_LOG(info) << flash_producer_->print() <<" Invoking update-command: " << str;\r
flash_producer_->param(str);\r
}\r
\r