]> git.sesse.net Git - casparcg/commitdiff
2.0.2: - channel: Allow SET MODE to revert to old mode in case of failure.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 20 Nov 2011 23:04:02 +0000 (23:04 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 20 Nov 2011 23:04:02 +0000 (23:04 +0000)
       - FlashAxContainer: Print activity to debug instead of info.

git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.2@1605 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/mixer/audio/audio_mixer.cpp
core/video_channel.cpp
modules/flash/producer/FlashAxContainer.cpp
modules/flash/producer/cg_producer.cpp

index 90b0ceeb8b157392fcc26175450819bf9d602bea..3b4effcaf2e30f4d80f8f62137ea22b3689cf548 100644 (file)
@@ -105,6 +105,9 @@ public:
                        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
index 4820f0e2e1cac6113948ebc27a296ec27704c3d5..2cfe4048d5d0427afb1f90744b669dd1369b4449 100644 (file)
@@ -38,7 +38,7 @@ namespace caspar { namespace core {
 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
@@ -63,9 +63,19 @@ public:
        \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
index 7add4e771cf414501a8c7f0eb60c1ba6feb1764f..034844559b7d17b376ad391a7341ce3911ca7d21 100644 (file)
@@ -607,12 +607,12 @@ void STDMETHODCALLTYPE FlashAxContainer::OnFlashCall(BSTR request)
        }\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
index f201a372306f98c43dc515cc168f91fa5ec35fd9..55ec88a8359bb8a3fe0fe394194681ebef5c7940 100644 (file)
@@ -48,14 +48,14 @@ public:
 \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
@@ -69,21 +69,21 @@ public:
        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