]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2:
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 28 Apr 2011 11:58:22 +0000 (11:58 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 28 Apr 2011 11:58:22 +0000 (11:58 +0000)
  - frame_consumer_device: Remove consumer when initialization fails.
  - frame_factory: Renamed tag to video_stream_tag to clearify.
  - transition_producer: Doesn't need video_format_desc, only vide_mode.
  - image_scroll_producer: Deleted, for now.
  - misc: Added comments.

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

17 files changed:
core/consumer/frame_consumer_device.cpp
core/producer/frame/frame_factory.h
core/producer/transition/transition_producer.cpp
core/producer/transition/transition_producer.h
modules/flash/producer/cg_producer.h
modules/flash/producer/flash_producer.cpp
modules/image/image.cpp
modules/image/image.vcxproj
modules/image/image.vcxproj.filters
modules/image/producer/image_producer.cpp
modules/image/producer/image_scroll_producer.cpp [deleted file]
modules/image/producer/image_scroll_producer.h [deleted file]
modules/image/util/image_loader.cpp
modules/oal/consumer/oal_consumer.cpp
modules/oal/consumer/oal_consumer.h
protocol/amcp/AMCPCommandsImpl.cpp
protocol/cii/CIIProtocolStrategy.cpp

index 6f1ac8537b53bbf880f4003f5c6104813244d5fc..c69ba3fa4b3e11bda1b6e4ad1830cacb272a9e5e 100644 (file)
@@ -117,8 +117,22 @@ public:
                {\r
                        format_desc_ = format_desc;\r
                        buffer_.clear();\r
-                       BOOST_FOREACH(auto& consumer, consumers_)\r
-                               consumer.second->initialize(format_desc_);\r
+                       \r
+                       auto it = consumers_.begin();\r
+                       while(it != consumers_.end())\r
+                       {\r
+                               try\r
+                               {\r
+                                       it->second->initialize(format_desc_);\r
+                                       ++it;\r
+                               }\r
+                               catch(...)\r
+                               {\r
+                                       CASPAR_LOG_CURRENT_EXCEPTION();\r
+                                       consumers_.erase(it++);\r
+                                       CASPAR_LOG(error) << print() << L" " << it->second->print() << L" Removed.";\r
+                               }\r
+                       }\r
                });\r
        }\r
 };\r
index 1c335301ed4dd5b630626ba86ef81849028c5568..9755c650c1e4465b8b469d907b1ffe1f0a37eb22 100644 (file)
@@ -33,9 +33,9 @@ struct video_format_desc;
                \r
 struct frame_factory : boost::noncopyable\r
 {\r
-       virtual safe_ptr<write_frame> create_frame(void* tag, const pixel_format_desc& desc) = 0;\r
-       virtual safe_ptr<write_frame> create_frame(void* tag, size_t width, size_t height, pixel_format::type pix_fmt = pixel_format::bgra) = 0;                \r
-       virtual safe_ptr<write_frame> create_frame(void* tag, pixel_format::type pix_fmt = pixel_format::bgra) = 0;\r
+       virtual safe_ptr<write_frame> create_frame(void* video_stream_tag, const pixel_format_desc& desc) = 0;\r
+       virtual safe_ptr<write_frame> create_frame(void* video_stream_tag, size_t width, size_t height, pixel_format::type pix_fmt = pixel_format::bgra) = 0;           \r
+       virtual safe_ptr<write_frame> create_frame(void* video_stream_tag, pixel_format::type pix_fmt = pixel_format::bgra) = 0;\r
        \r
        virtual const video_format_desc& get_video_format_desc() const = 0; // nothrow\r
 };\r
index 8313b046314bf3a0dc6016c61abe36c23d6f421d..9236fe5257cf132946291b5006d8902ba1af3f34 100644 (file)
@@ -31,7 +31,7 @@ namespace caspar { namespace core {
 \r
 struct transition_producer : public frame_producer\r
 {      \r
-       const video_format_desc         format_desc_;\r
+       const video_mode::type          mode_;\r
        uint32_t                                        current_frame_;\r
        \r
        const transition_info           info_;\r
@@ -39,8 +39,8 @@ struct transition_producer : public frame_producer
        safe_ptr<frame_producer>        dest_producer_;\r
        safe_ptr<frame_producer>        source_producer_;\r
                \r
-       explicit transition_producer(const video_format_desc& format_desc, const safe_ptr<frame_producer>& dest, const transition_info& info) \r
-               : format_desc_(format_desc)\r
+       explicit transition_producer(const video_mode::type& mode, const safe_ptr<frame_producer>& dest, const transition_info& info) \r
+               : mode_(mode)\r
                , current_frame_(0)\r
                , info_(info)\r
                , dest_producer_(dest)\r
@@ -133,16 +133,16 @@ struct transition_producer : public frame_producer
                        d_frame2->get_image_transform().set_key_scale(delta2, 1.0);                     \r
                }\r
                \r
-               auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, format_desc_.mode);\r
-               auto d_frame = basic_frame::interlace(d_frame1, d_frame2, format_desc_.mode);\r
+               auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, mode_);\r
+               auto d_frame = basic_frame::interlace(d_frame1, d_frame2, mode_);\r
 \r
                return basic_frame(s_frame, d_frame);\r
        }\r
 };\r
 \r
-safe_ptr<frame_producer> create_transition_producer(const video_format_desc& format_desc, const safe_ptr<frame_producer>& destination, const transition_info& info)\r
+safe_ptr<frame_producer> create_transition_producer(const video_mode::type& mode, const safe_ptr<frame_producer>& destination, const transition_info& info)\r
 {\r
-       return make_safe<transition_producer>(format_desc, destination, info);\r
+       return make_safe<transition_producer>(mode, destination, info);\r
 }\r
 \r
 }}\r
index d8d7f50e0ff994b37cf9091b614934c0c5f89435..a70e21151700fd0d35c483c64906c7d707efd817 100644 (file)
@@ -64,6 +64,6 @@ struct transition_info
        tweener_t                                       tweener;\r
 };\r
 \r
-safe_ptr<frame_producer> create_transition_producer(const video_format_desc& format_desc, const safe_ptr<frame_producer>& destination, const transition_info& info);\r
+safe_ptr<frame_producer> create_transition_producer(const video_mode::type& mode, const safe_ptr<frame_producer>& destination, const transition_info& info);\r
 \r
 }}
\ No newline at end of file
index 20985c7de9498e9d3ce3d9fe382f020aeaaeb63d..32e0af47f6dbdddbc5f4d9b0aad9a96e2001ec6a 100644 (file)
@@ -36,6 +36,11 @@ public:
        explicit cg_producer(const safe_ptr<core::frame_factory>& frame_factory);\r
        cg_producer(cg_producer&& other);\r
        \r
+       // frame_producer\r
+       virtual safe_ptr<core::basic_frame> receive();\r
+       virtual std::wstring print() const;\r
+\r
+       //cg_producer\r
        void add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = TEXT(""), const std::wstring& data = TEXT(""));\r
        void remove(int layer);\r
        void play(int layer);\r
@@ -43,10 +48,6 @@ public:
        void next(int layer);\r
        void update(int layer, const std::wstring& data);\r
        void invoke(int layer, const std::wstring& label);\r
-       \r
-       // frame_producer\r
-       virtual safe_ptr<core::basic_frame> receive();\r
-       virtual std::wstring print() const;\r
 \r
 private:\r
        struct implementation;\r
index 8e3cb3e40f0a6f965bc915ea1128f2cd0d10b551..1f623828bbb758d9c9f27a9d8a788c3bbd10a5fc 100644 (file)
 \r
 #include <core/video_format.h>\r
 \r
-#include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/basic_frame.h>\r
+#include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/write_frame.h>\r
 \r
 #include <common/env.h>\r
 #include <common/concurrency/executor.h>\r
+#include <common/diagnostics/graph.h>\r
 #include <common/memory/memcpy.h>\r
 #include <common/memory/memclr.h>\r
 #include <common/utility/timer.h>\r
-#include <common/diagnostics/graph.h>\r
 \r
 #include <boost/filesystem.hpp>\r
+#include <boost/thread.hpp>\r
 \r
 #include <functional>\r
-#include <boost/thread.hpp>\r
 \r
 namespace caspar {\r
                \r
@@ -248,6 +248,8 @@ public:
                        renderer_ = nullptr;\r
                });             \r
        }\r
+\r
+       // frame_producer\r
                \r
        virtual safe_ptr<core::basic_frame> receive()\r
        {               \r
@@ -307,6 +309,8 @@ public:
                                        (interlaced(fps_, format_desc_) ? L"i" : L"p") + L"]";          \r
        }       \r
 \r
+       // flash_producer\r
+\r
        void init_renderer()\r
        {\r
                renderer_.reset(new flash_renderer(safe_ptr<diagnostics::graph>(graph_), frame_factory_, filename_));\r
index 92d3938c8c93ccd091c6bbfb8fdbb131bb864741..36c998c3a9ee32a5ee48df8f83205d1cd919fc97 100644 (file)
@@ -27,8 +27,7 @@
 \r
 #include <FreeImage.h>\r
 \r
-namespace caspar\r
-{\r
+namespace caspar {\r
 \r
 void init_image()\r
 {\r
index d486f4848910495f378f95f3431de215a59fece6..0061564aaf9ce6130072c45801b9f7091d900530 100644 (file)
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">NotUsing</PrecompiledHeader>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>\r
     </ClCompile>\r
-    <ClCompile Include="producer\image_scroll_producer.cpp">\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">NotUsing</PrecompiledHeader>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>\r
-    </ClCompile>\r
     <ClCompile Include="util\image_loader.cpp" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="image.h" />\r
     <ClInclude Include="producer\image_producer.h" />\r
-    <ClInclude Include="producer\image_scroll_producer.h" />\r
     <ClInclude Include="util\image_loader.h" />\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
index 7c277d2c515f08fd58d7e6cbfdafef405cac4daf..be1bbc734e978d799ef0f83aaccc49b69fde6069 100644 (file)
@@ -12,9 +12,6 @@
     <ClCompile Include="producer\image_producer.cpp">\r
       <Filter>producer</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="producer\image_scroll_producer.cpp">\r
-      <Filter>producer</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="image.cpp" />\r
     <ClCompile Include="util\image_loader.cpp">\r
       <Filter>util</Filter>\r
@@ -24,9 +21,6 @@
     <ClInclude Include="producer\image_producer.h">\r
       <Filter>producer</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="producer\image_scroll_producer.h">\r
-      <Filter>producer</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="image.h" />\r
     <ClInclude Include="util\image_loader.h">\r
       <Filter>util</Filter>\r
index 5553b7638af5f3abb4910e6729d6d1545a1f00e6..456c399d86ce9f9c2c4a2b5d7980a4952e24227f 100644 (file)
@@ -39,7 +39,7 @@ namespace caspar {
 \r
 struct image_producer : public core::frame_producer\r
 {      \r
-       std::wstring filename_;\r
+       const std::wstring filename_;\r
        safe_ptr<core::basic_frame> frame_;\r
        \r
        explicit image_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& filename) \r
@@ -53,9 +53,10 @@ struct image_producer : public core::frame_producer
                frame_ = std::move(frame);\r
        }\r
        \r
-       virtual safe_ptr<core::basic_frame> receive(){return frame_;}\r
+       // frame_producer\r
 \r
-       \r
+       virtual safe_ptr<core::basic_frame> receive(){return frame_;}\r
+               \r
        virtual std::wstring print() const\r
        {\r
                return L"image_producer[" + filename_ + L"]";\r
diff --git a/modules/image/producer/image_scroll_producer.cpp b/modules/image/producer/image_scroll_producer.cpp
deleted file mode 100644 (file)
index 43fccb9..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
-*\r
-*  This file is part of CasparCG.\r
-*\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
-*\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-*/\r
-//#include "image_scroll_producer.h"\r
-//\r
-//#include "image_loader.h"\r
-//\r
-//#include "../../mixer/basic_frame.h"\r
-//#include "../../mixer/basic_frame.h"\r
-//#include "../../video_format.h"\r
-//#include "../../mixer/frame_mixer_device.h"\r
-//#include "../../configuration.h"\r
-//\r
-//#include <tbb/parallel_for.h>\r
-//#include <tbb/parallel_invoke.h>\r
-//#include <tbb/scalable_allocator.h>\r
-//\r
-//#include <boost/assign.hpp>\r
-//#include <boost/algorithm/string/case_conv.hpp>\r
-//\r
-//using namespace boost::assign;\r
-//\r
-//namespace caspar { namespace core { namespace image{\r
-//\r
-//enum direction\r
-//{\r
-//     Up, Down, Left, Right\r
-//};\r
-//\r
-//struct image_scroll_producer : public frame_producer\r
-//{\r
-//     static const int DEFAULT_SCROLL_SPEED = 50;\r
-//\r
-//     image_scroll_producer(const std::wstring& filename, const std::vector<std::wstring>& params) \r
-//             : speed_(image_scroll_producer::DEFAULT_SCROLL_SPEED), direction_(direction::Up), offset_(0), filename_(filename)\r
-//     {\r
-//             auto pos = filename.find_last_of(L'_');\r
-//             if(pos != std::wstring::npos && pos + 1 < filename.size())\r
-//             {\r
-//                     std::wstring speedStr = filename.substr(pos + 1);\r
-//                     pos = speedStr.find_first_of(L'.');\r
-//                     if(pos != std::wstring::npos)\r
-//                     {\r
-//                             speedStr = speedStr.substr(0, pos);             \r
-//                             speed_ = lexical_cast_or_default<int>(speedStr, image_scroll_producer::DEFAULT_SCROLL_SPEED);\r
-//                     }\r
-//             }\r
-//\r
-//             loop_ = std::find(params.begin(), params.end(), L"LOOP") != params.end();\r
-//     }\r
-//\r
-//     void load_and_pad_image(const std::wstring& filename)\r
-//     {\r
-//             auto pBitmap = load_image(filename);\r
-//\r
-//             size_t width = FreeImage_GetWidth(pBitmap.get());\r
-//             size_t height = FreeImage_GetHeight(pBitmap.get());\r
-//\r
-//             image_width_ = std::max(width, format_desc_.width);\r
-//             image_height_ = std::max(height, format_desc_.height);\r
-//\r
-//             image_ = std::shared_ptr<unsigned char>(static_cast<unsigned char*>(scalable_aligned_malloc(image_width_*image_height_*4, 16)));\r
-//             std::fill_n(image_.get(), image_width_*image_height_*4, 0);\r
-//\r
-//             unsigned char* pBits = FreeImage_GetBits(pBitmap.get());\r
-//             \r
-//             for (size_t i = 0; i < height; ++i)\r
-//                     std::copy_n(&pBits[i* width * 4], width * 4, &image_.get()[i * image_width_ * 4]);\r
-//     }\r
-//\r
-//     basic_frame do_receive()\r
-//     {\r
-//             auto frame = frame_factory_->create_frame(format_desc_.width, format_desc_.height);\r
-//             std::fill(frame.image_data().begin(), frame.image_data().end(), 0);\r
-//\r
-//             const int delta_x = direction_ == direction::Left ? speed_ : -speed_;\r
-//             const int delta_y = direction_ == direction::Up ? speed_ : -speed_;\r
-//\r
-//             unsigned char* frame_data = frame.image_data().begin();\r
-//             unsigned char* image_data = image_.get();\r
-//     \r
-//             if (direction_ == direction::Up || direction_ == direction::Down)\r
-//             {\r
-//                     tbb::parallel_for(static_cast<size_t>(0), format_desc_.height, static_cast<size_t>(1), [&](size_t i)\r
-//                     {\r
-//                             int srcRow = i + offset_;\r
-//                             int dstInxex = i * format_desc_.width * 4;\r
-//                             int srcIndex = srcRow * format_desc_.width * 4;\r
-//                             int size = format_desc_.width * 4;\r
-//\r
-//                             std::copy_n(&image_data[srcIndex], size, &frame_data[dstInxex]);\r
-//                     });                             \r
-//                     \r
-//                     offset_ += delta_y;\r
-//             }\r
-//             else\r
-//             {\r
-//                     tbb::parallel_for(static_cast<size_t>(0), format_desc_.height, static_cast<size_t>(1), [&](size_t i)\r
-//                     {\r
-//                             int correctOffset = offset_;\r
-//                             int dstIndex = i * format_desc_.width * 4;\r
-//                             int srcIndex = (i * image_width_ + correctOffset) * 4;\r
-//                     \r
-//                             int stopOffset = std::min<int>(correctOffset + format_desc_ .width, image_width_);\r
-//                             int size = (stopOffset - correctOffset) * 4;\r
-//\r
-//                             std::copy_n(&image_data[srcIndex], size, &frame_data[dstIndex]);\r
-//                     });\r
-//\r
-//                     offset_ += delta_x;\r
-//             }\r
-//\r
-//             return std::move(frame);\r
-//     }\r
-//             \r
-//     safe_ptr<basic_frame> receive()\r
-//     {               \r
-//             if(format_desc_.mode != video_mode::progressive)                                \r
-//             {\r
-//                     basic_frame frame1;\r
-//                     basic_frame frame2;\r
-//                     tbb::parallel_invoke([&]{ frame1 = std::move(do_receive()); }, [&]{ frame2 = std::move(do_receive()); });\r
-//                     return basic_frame::interlace(std::move(frame1), std::move(frame2), format_desc_.mode);\r
-//             }                       \r
-//\r
-//             return receive();       \r
-//     }\r
-//     \r
-//     void initialize(const safe_ptr<frame_factory>& frame_factory)\r
-//     {\r
-//             frame_factory_ = frame_factory;\r
-//             format_desc_ = frame_factory_->get_video_format_desc();\r
-//                             \r
-//             if(image_width_ - format_desc_.width > image_height_ - format_desc_.height)\r
-//                     direction_ = speed_ < 0 ? direction::Right : direction::Left;\r
-//             else\r
-//                     direction_ = speed_ < 0 ? direction::Down : direction::Up;\r
-//\r
-//             if (direction_ == direction::Down)\r
-//                     offset_ = image_height_ - format_desc_.height;\r
-//             else if (direction_ == direction::Right)\r
-//                     offset_ = image_width_ - format_desc_.width;\r
-//\r
-//             speed_ = static_cast<int>(abs(static_cast<double>(speed_) / format_desc_.fps));\r
-//             \r
-//             load_and_pad_image(filename_);\r
-//     }\r
-//     \r
-//\r
-//     std::wstring print() const\r
-//     {\r
-//             return L"image_scroll_producer. filename: " + filename_;\r
-//     }\r
-//\r
-//     const video_format_desc& get_video_format_desc() const { return format_desc_; } \r
-//     \r
-//     int image_width_;\r
-//     int image_height_;\r
-//     int speed_;\r
-//     int offset_;\r
-//     direction direction_;\r
-//\r
-//     tbb::atomic<bool> loop_;\r
-//     std::shared_ptr<unsigned char> image_;\r
-//     video_format_desc format_desc_;\r
-//\r
-//     std::wstring filename_;\r
-//\r
-//     safe_ptr<frame_mixer_device> frame_factory_;\r
-//};\r
-//\r
-//safe_ptr<frame_producer> create_image_scroll_producer(const std::vector<std::wstring>& params)\r
-//{\r
-//     static const std::vector<std::wstring> extensions = list_of(L"spng")(L"stga")(L"sbmp")(L"sjpg")(L"sjpeg");\r
-//     std::wstring filename = configuration::media_folder() + L"\\" + params[0];\r
-//     \r
-//     auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool\r
-//             {                                       \r
-//                     return boost::filesystem::is_regular_file(boost::filesystem::wpath(filename).replace_extension(ex));\r
-//             });\r
-//\r
-//     if(ext == extensions.end())\r
-//             return nullptr;\r
-//\r
-//     return std::make_shared<image_scroll_producer>(filename + L"." + *ext, params);\r
-//}\r
-//\r
-//}}}
\ No newline at end of file
diff --git a/modules/image/producer/image_scroll_producer.h b/modules/image/producer/image_scroll_producer.h
deleted file mode 100644 (file)
index 18d7873..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
-*\r
-*  This file is part of CasparCG.\r
-*\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
-*\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-*/\r
-#pragma once\r
-\r
-#include "../frame_producer.h"\r
-\r
-#include <string>\r
-#include <vector>\r
-\r
-namespace caspar {\r
-       \r
-safe_ptr<frame_producer> create_image_scroll_producer(const std::vector<std::wstring>& params);\r
-\r
-}
\ No newline at end of file
index 3f35a725b6dec7a8d5bd1743f1ff434028b40b5d..e1b29ca9894dd3cf46611313a69c2fa575eb8442 100644 (file)
@@ -26,8 +26,8 @@
 #pragma warning (disable : 4714) // marked as __forceinline not inlined\r
 #endif\r
 \r
-#include <boost/filesystem.hpp>\r
 #include <boost/exception/errinfo_file_name.hpp>\r
+#include <boost/filesystem.hpp>\r
 #include <boost/thread/once.hpp>\r
 \r
 namespace caspar { \r
index 259e88cc330756308d01aa08df2ecd8c4a2e09ab..5d22b0600ca261e362d1e49e85a53040e5666717 100644 (file)
@@ -56,6 +56,8 @@ public:
                graph_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f));\r
                is_running_ = true;\r
                input_.set_capacity(4);\r
+\r
+               // Fill input buffer with silence.\r
                for(size_t n = 0; n < buffer_depth(); ++n)\r
                        input_.push(std::vector<short>(static_cast<size_t>(48000.0f/format_desc_.fps)*2, 0)); \r
 \r
index 2068f7b5c83ad6eadffce9148f8426425b327a89..ff18003fc7588f19052e77e3d7898e7140a06d93 100644 (file)
@@ -32,8 +32,8 @@ public:
        explicit oal_consumer();\r
        oal_consumer(oal_consumer&& other);\r
 \r
+       // frame_consumer\r
        virtual void initialize(const core::video_format_desc& format_desc);    \r
-\r
        virtual void send(const safe_ptr<const core::read_frame>&);\r
        virtual size_t buffer_depth() const;\r
        virtual std::wstring print() const;\r
index 5cbf298ff750574c959fcecb22d909bb89ae9b15..e1392cc342d46535c0daa9bc138e87567fe5fd15 100644 (file)
@@ -563,7 +563,7 @@ bool LoadbgCommand::DoExecute()
                if(pFP == frame_producer::empty())\r
                        BOOST_THROW_EXCEPTION(file_not_found() << msg_info(_parameters.size() > 0 ? narrow(_parameters[0]) : ""));\r
 \r
-               auto pFP2 = create_transition_producer(GetChannel()->get_video_format_desc(), pFP, transitionInfo);\r
+               auto pFP2 = create_transition_producer(GetChannel()->get_video_format_desc().mode, pFP, transitionInfo);\r
                GetChannel()->producer()->load(GetLayerIndex(), pFP2); // TODO: LOOP\r
        \r
                CASPAR_LOG(info) << "Loaded " << _parameters[0] << TEXT(" successfully to background");\r
index 8cc57d6d6a9a3b0fb72e4d64b9ab5213d693c53c..d37a457f1ce83abc0fbe707e40e4000a8a5a90e4 100644 (file)
@@ -215,7 +215,7 @@ void CIIProtocolStrategy::DisplayMediaFile(const std::wstring& filename)
        transition.duration = 12;\r
 \r
        auto pFP = create_producer(GetChannel()->mixer(), boost::assign::list_of(filename));\r
-       auto pTransition = create_transition_producer(GetChannel()->get_video_format_desc(), pFP, transition);\r
+       auto pTransition = create_transition_producer(GetChannel()->get_video_format_desc().mode, pFP, transition);\r
 \r
        try\r
        {\r