]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: - Renamed core components, since they no longer are active objects then...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 7 Jun 2011 11:36:16 +0000 (11:36 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 7 Jun 2011 11:36:16 +0000 (11:36 +0000)
         - Added misc error handling.

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

22 files changed:
core/consumer/output.cpp [moved from core/consumer/frame_consumer_device.cpp with 71% similarity]
core/consumer/output.h [moved from core/consumer/frame_consumer_device.h with 87% similarity]
core/core.vcxproj
core/core.vcxproj.filters
core/mixer/audio/audio_mixer.cpp
core/mixer/audio/audio_mixer.h
core/mixer/image/image_mixer.cpp
core/mixer/image/image_mixer.h
core/mixer/mixer.cpp [moved from core/mixer/frame_mixer_device.cpp with 67% similarity]
core/mixer/mixer.h [moved from core/mixer/frame_mixer_device.h with 94% similarity]
core/producer/stage.cpp [moved from core/producer/frame_producer_device.cpp with 72% similarity]
core/producer/stage.h [moved from core/producer/frame_producer_device.h with 83% similarity]
core/video_channel.cpp
core/video_channel.h
modules/flash/producer/cg_producer.cpp
modules/flash/producer/cg_producer.h
protocol/amcp/AMCPCommandsImpl.cpp
protocol/cii/CIICommandsImpl.cpp
protocol/cii/CIIProtocolStrategy.cpp
protocol/cii/CIIProtocolStrategy.h
protocol/clk/CLKProtocolStrategy.cpp
shell/server.cpp

similarity index 71%
rename from core/consumer/frame_consumer_device.cpp
rename to core/consumer/output.cpp
index 18d07618c257bafeea739144c30af713b9aa2926..9ae7f56f6d7d58512726b5f8574ebbf799ef5e91 100644 (file)
@@ -23,7 +23,7 @@
 #pragma warning (disable : 4244)\r
 #endif\r
 \r
-#include "frame_consumer_device.h"\r
+#include "output.h"\r
 \r
 #include "../video_channel_context.h"\r
 \r
@@ -40,7 +40,7 @@
 \r
 namespace caspar { namespace core {\r
        \r
-struct frame_consumer_device::implementation\r
+struct output::implementation\r
 {      \r
        typedef std::pair<safe_ptr<const read_frame>, safe_ptr<const read_frame>> fill_and_key;\r
        \r
@@ -93,26 +93,47 @@ public:
                                                \r
        void execute(const safe_ptr<read_frame>& frame)\r
        {               \r
-               if(!has_synchronization_clock())\r
-                       timer_.tick(1.0/channel_.get_format_desc().fps);\r
+               try\r
+               {               \r
+                       if(!has_synchronization_clock())\r
+                               timer_.tick(1.0/channel_.get_format_desc().fps);\r
                                                \r
-               auto fill = frame;\r
-               auto key = get_key_frame(frame);\r
+                       auto fill = frame;\r
+                       auto key = get_key_frame(frame);\r
 \r
-               for_each_consumer([&](safe_ptr<frame_consumer>& consumer)\r
+                       auto it = consumers_.begin();\r
+                       while(it != consumers_.end())\r
+                       {\r
+                               try\r
+                               {\r
+                                       auto consumer = it->second;\r
+\r
+                                       if(consumer->get_video_format_desc() != channel_.get_format_desc())\r
+                                               consumer->initialize(channel_.get_format_desc());\r
+\r
+                                       auto frame = consumer->key_only() ? key : fill;\r
+\r
+                                       if(static_cast<size_t>(frame->image_data().size()) == consumer->get_video_format_desc().size)\r
+                                               consumer->send(frame);\r
+\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
+               catch(...)\r
                {\r
-                       if(consumer->get_video_format_desc() != channel_.get_format_desc())\r
-                               consumer->initialize(channel_.get_format_desc());\r
-\r
-                       auto frame = consumer->key_only() ? key : fill;\r
-\r
-                       if(static_cast<size_t>(frame->image_data().size()) == consumer->get_video_format_desc().size)\r
-                               consumer->send(frame);\r
-               });\r
+                       CASPAR_LOG_CURRENT_EXCEPTION();\r
+               }\r
        }\r
 \r
 private:\r
-\r
+       \r
        bool has_synchronization_clock()\r
        {\r
                return std::any_of(consumers_.begin(), consumers_.end(), [](const decltype(*consumers_.begin())& p)\r
@@ -139,35 +160,17 @@ private:
                \r
                return make_safe<read_frame>();\r
        }\r
-               \r
-       void for_each_consumer(const std::function<void(safe_ptr<frame_consumer>& consumer)>& func)\r
-       {\r
-               auto it = consumers_.begin();\r
-               while(it != consumers_.end())\r
-               {\r
-                       try\r
-                       {\r
-                               func(it->second);\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
        std::wstring print() const\r
        {\r
-               return L"frame_consumer_device";\r
+               return L"output";\r
        }\r
 };\r
 \r
-frame_consumer_device::frame_consumer_device(video_channel_context& video_channel) \r
+output::output(video_channel_context& video_channel) \r
        : impl_(new implementation(video_channel)){}\r
-void frame_consumer_device::add(int index, safe_ptr<frame_consumer>&& consumer){impl_->add(index, std::move(consumer));}\r
-void frame_consumer_device::remove(int index){impl_->remove(index);}\r
-void frame_consumer_device::execute(const safe_ptr<read_frame>& frame) {impl_->execute(frame); }\r
+void output::add(int index, safe_ptr<frame_consumer>&& consumer){impl_->add(index, std::move(consumer));}\r
+void output::remove(int index){impl_->remove(index);}\r
+void output::execute(const safe_ptr<read_frame>& frame) {impl_->execute(frame); }\r
 }}
\ No newline at end of file
similarity index 87%
rename from core/consumer/frame_consumer_device.h
rename to core/consumer/output.h
index 21a4ea9d0c7dd06a29ebadf41b3c16f00865e7e2..0e1dd645aa90f1f387c989b844d6f3a784d964a9 100644 (file)
@@ -33,10 +33,10 @@ namespace core {
        \r
 class video_channel_context;;\r
 \r
-class frame_consumer_device : boost::noncopyable\r
+class output : boost::noncopyable\r
 {\r
 public:\r
-       explicit frame_consumer_device(video_channel_context& video_channel);\r
+       explicit output(video_channel_context& video_channel);\r
 \r
        void add(int index, safe_ptr<frame_consumer>&& consumer);\r
        void remove(int index);\r
index 55dacbf4538f03ba6df74e2064cd43c17948c2a4..e70447e5af29bb4222b311a144c79ef92d8ffbac 100644 (file)
   <ItemGroup>\r
     <ClInclude Include="video_channel.h" />\r
     <ClInclude Include="video_channel_context.h" />\r
-    <ClInclude Include="consumer\frame_consumer_device.h" />\r
+    <ClInclude Include="consumer\output.h" />\r
     <ClInclude Include="consumer\frame_consumer.h" />\r
     <ClInclude Include="mixer\audio\audio_mixer.h" />\r
-    <ClInclude Include="mixer\frame_mixer_device.h" />\r
+    <ClInclude Include="mixer\mixer.h" />\r
     <ClInclude Include="mixer\gpu\device_buffer.h" />\r
     <ClInclude Include="mixer\gpu\host_buffer.h" />\r
     <ClInclude Include="mixer\gpu\ogl_device.h" />\r
     <ClInclude Include="producer\frame\image_transform.h" />\r
     <ClInclude Include="producer\frame\pixel_format.h" />\r
     <ClInclude Include="producer\frame_producer.h" />\r
-    <ClInclude Include="producer\frame_producer_device.h" />\r
+    <ClInclude Include="producer\stage.h" />\r
     <ClInclude Include="producer\layer.h" />\r
     <ClInclude Include="producer\separated\separated_producer.h" />\r
     <ClInclude Include="producer\transition\transition_producer.h" />\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
-    <ClCompile Include="consumer\frame_consumer_device.cpp">\r
+    <ClCompile Include="consumer\output.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
-    <ClCompile Include="mixer\frame_mixer_device.cpp">\r
+    <ClCompile Include="mixer\mixer.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
-    <ClCompile Include="producer\frame_producer_device.cpp">\r
+    <ClCompile Include="producer\stage.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
index 4b6e63b7509817db19b9e67992947201ecf26271..f70a679e767ce76b9990b25ab8df22410a74c1b0 100644 (file)
     <ClInclude Include="producer\transition\transition_producer.h">\r
       <Filter>producer\transition</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="consumer\frame_consumer_device.h">\r
-      <Filter>consumer</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="consumer\frame_consumer.h">\r
       <Filter>consumer</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="producer\frame_producer_device.h">\r
-      <Filter>producer</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="producer\frame_producer.h">\r
       <Filter>producer</Filter>\r
     </ClInclude>\r
     <ClInclude Include="mixer\write_frame.h">\r
       <Filter>mixer</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="mixer\frame_mixer_device.h">\r
-      <Filter>mixer</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="video_channel.h" />\r
     <ClInclude Include="video_channel_context.h" />\r
     <ClInclude Include="StdAfx.h" />\r
+    <ClInclude Include="mixer\mixer.h">\r
+      <Filter>mixer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="producer\stage.h">\r
+      <Filter>producer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="consumer\output.h">\r
+      <Filter>consumer</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="producer\transition\transition_producer.cpp">\r
     <ClCompile Include="consumer\frame_consumer.cpp">\r
       <Filter>consumer</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="consumer\frame_consumer_device.cpp">\r
-      <Filter>consumer</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="producer\frame_producer.cpp">\r
       <Filter>producer</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="producer\frame_producer_device.cpp">\r
-      <Filter>producer</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="producer\color\color_producer.cpp">\r
       <Filter>producer\color</Filter>\r
     </ClCompile>\r
       <Filter>producer\frame</Filter>\r
     </ClCompile>\r
     <ClCompile Include="video_format.cpp" />\r
-    <ClCompile Include="mixer\frame_mixer_device.cpp">\r
-      <Filter>mixer</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="mixer\image\image_mixer.cpp">\r
       <Filter>mixer\image</Filter>\r
     </ClCompile>\r
     <ClCompile Include="video_channel.cpp" />\r
     <ClCompile Include="StdAfx.cpp" />\r
     <ClCompile Include="video_channel_context.cpp" />\r
+    <ClCompile Include="mixer\mixer.cpp">\r
+      <Filter>mixer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="producer\stage.cpp">\r
+      <Filter>producer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="consumer\output.cpp">\r
+      <Filter>consumer</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index e0b5b424b765c59234f0b93c14813e9a9a36c74d..5a40844f83bb5e83e890e1755cc44c75f1fc3031 100644 (file)
@@ -118,5 +118,10 @@ void audio_mixer::begin(const core::basic_frame& frame){impl_->begin(frame);}
 void audio_mixer::visit(core::write_frame& frame){impl_->visit(frame);}\r
 void audio_mixer::end(){impl_->end();}\r
 std::vector<int16_t> audio_mixer::mix(){return impl_->mix();}\r
+audio_mixer& audio_mixer::operator=(audio_mixer&& other)\r
+{\r
+       impl_ = std::move(other.impl_);\r
+       return *this;\r
+}\r
 \r
 }}
\ No newline at end of file
index d45370bb2f0a957ae8aaa5b9bc3750728d9d2628..a94715bf5f25da4f1b6e1f75f73b7f4e5f8233fb 100644 (file)
@@ -36,7 +36,8 @@ public:
        virtual void end();\r
 \r
        std::vector<int16_t> mix();\r
-\r
+       \r
+       audio_mixer& operator=(audio_mixer&& other);\r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
index 39f69e594359d05f441b181722798ac936cd4175..c0f2a1e2886d4af56d68a610d96c40169ebcdb39 100644 (file)
@@ -234,5 +234,10 @@ safe_ptr<host_buffer> image_mixer::render(){return impl_->render();}
 safe_ptr<write_frame> image_mixer::create_frame(void* tag, const core::pixel_format_desc& desc){return impl_->create_frame(tag, desc);}\r
 void image_mixer::begin_layer(){impl_->begin_layer();}\r
 void image_mixer::end_layer(){impl_->end_layer();}\r
+image_mixer& image_mixer::operator=(image_mixer&& other)\r
+{\r
+       impl_ = std::move(other.impl_);\r
+       return *this;\r
+}\r
 \r
 }}
\ No newline at end of file
index a6c83ef2fe9bded5076cff0aef791f7db6115072..ed9a031af16a7a0f1a0be80fac91ee715cc240f6 100644 (file)
@@ -45,6 +45,8 @@ public:
 \r
        void begin_layer();\r
        void end_layer();\r
+\r
+       image_mixer& operator=(image_mixer&& other);\r
        \r
        safe_ptr<host_buffer> render();\r
 \r
similarity index 67%
rename from core/mixer/frame_mixer_device.cpp
rename to core/mixer/mixer.cpp
index e73b7f87e38287104f0c3bfb0418499b4696a10f..851eca57ea95cb40abc491b0f5f4b88c1cb8e49f 100644 (file)
@@ -19,7 +19,7 @@
 */\r
 #include "../StdAfx.h"\r
 \r
-#include "frame_mixer_device.h"\r
+#include "mixer.h"\r
 \r
 #include "read_frame.h"\r
 #include "write_frame.h"\r
@@ -83,7 +83,7 @@ public:
        }\r
 };\r
 \r
-struct frame_mixer_device::implementation : boost::noncopyable\r
+struct mixer::implementation : boost::noncopyable\r
 {              \r
        video_channel_context& channel_;\r
        \r
@@ -107,11 +107,24 @@ public:
        }\r
                        \r
        safe_ptr<read_frame> execute(const std::map<int, safe_ptr<core::basic_frame>>& frames)\r
-       {                               \r
-               auto image = mix_image(frames);\r
-               auto audio = mix_audio(frames);\r
+       {                       \r
+               try\r
+               {\r
+                       auto image = mix_image(frames);\r
+                       auto audio = mix_audio(frames);\r
                        \r
-               return make_safe<read_frame>(std::move(image), std::move(audio));\r
+                       return make_safe<read_frame>(std::move(image), std::move(audio));\r
+               }\r
+               catch(...)\r
+               {\r
+                       channel_.ogl().gc();\r
+                       image_mixer_ = image_mixer(channel_);\r
+                       audio_mixer_ = audio_mixer();\r
+                       channel_.ogl().gc();\r
+\r
+                       CASPAR_LOG_CURRENT_EXCEPTION();\r
+                       return make_safe<read_frame>();\r
+               }\r
        }\r
                        \r
        safe_ptr<core::write_frame> create_frame(void* tag, const core::pixel_format_desc& desc)\r
@@ -195,7 +208,7 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return L"frame_mixer_device";\r
+               return L"mixer";\r
        }\r
 \r
 private:\r
@@ -253,11 +266,11 @@ private:
        }\r
 };\r
        \r
-frame_mixer_device::frame_mixer_device(video_channel_context& video_channel) : impl_(new implementation(video_channel)){}\r
-safe_ptr<core::read_frame> frame_mixer_device::execute(const std::map<int, safe_ptr<core::basic_frame>>& frames){ return impl_->execute(frames);}\r
-core::video_format_desc frame_mixer_device::get_video_format_desc() const { return impl_->channel_.get_format_desc(); }\r
-safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, const core::pixel_format_desc& desc){ return impl_->create_frame(tag, desc); }         \r
-safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, size_t width, size_t height, core::pixel_format::type pix_fmt)\r
+mixer::mixer(video_channel_context& video_channel) : impl_(new implementation(video_channel)){}\r
+safe_ptr<core::read_frame> mixer::execute(const std::map<int, safe_ptr<core::basic_frame>>& frames){ return impl_->execute(frames);}\r
+core::video_format_desc mixer::get_video_format_desc() const { return impl_->channel_.get_format_desc(); }\r
+safe_ptr<core::write_frame> mixer::create_frame(void* tag, const core::pixel_format_desc& desc){ return impl_->create_frame(tag, desc); }              \r
+safe_ptr<core::write_frame> mixer::create_frame(void* tag, size_t width, size_t height, core::pixel_format::type pix_fmt)\r
 {\r
        // Create bgra frame\r
        core::pixel_format_desc desc;\r
@@ -265,16 +278,16 @@ safe_ptr<core::write_frame> frame_mixer_device::create_frame(void* tag, size_t w
        desc.planes.push_back( core::pixel_format_desc::plane(width, height, 4));\r
        return create_frame(tag, desc);\r
 }\r
-void frame_mixer_device::set_image_transform(const core::image_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::image_transform>(transform, mix_duration, tween);}\r
-void frame_mixer_device::set_image_transform(int index, const core::image_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::image_transform>(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::set_audio_transform(const core::audio_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::audio_transform>(transform, mix_duration, tween);}\r
-void frame_mixer_device::set_audio_transform(int index, const core::audio_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_image_transform(const std::function<core::image_transform(core::image_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::image_transform>(transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::image_transform>(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(transform, mix_duration, tween);}\r
-void frame_mixer_device::apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
-void frame_mixer_device::reset_image_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(mix_duration, tween);}\r
-void frame_mixer_device::reset_image_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(index, mix_duration, tween);}\r
-void frame_mixer_device::reset_audio_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(mix_duration, tween);}\r
-void frame_mixer_device::reset_audio_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(index, mix_duration, tween);}\r
+void mixer::set_image_transform(const core::image_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::image_transform>(transform, mix_duration, tween);}\r
+void mixer::set_image_transform(int index, const core::image_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::image_transform>(index, transform, mix_duration, tween);}\r
+void mixer::set_audio_transform(const core::audio_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::audio_transform>(transform, mix_duration, tween);}\r
+void mixer::set_audio_transform(int index, const core::audio_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
+void mixer::apply_image_transform(const std::function<core::image_transform(core::image_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::image_transform>(transform, mix_duration, tween);}\r
+void mixer::apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::image_transform>(index, transform, mix_duration, tween);}\r
+void mixer::apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(transform, mix_duration, tween);}\r
+void mixer::apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
+void mixer::reset_image_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(mix_duration, tween);}\r
+void mixer::reset_image_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(index, mix_duration, tween);}\r
+void mixer::reset_audio_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(mix_duration, tween);}\r
+void mixer::reset_audio_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(index, mix_duration, tween);}\r
 }}
\ No newline at end of file
similarity index 94%
rename from core/mixer/frame_mixer_device.h
rename to core/mixer/mixer.h
index b30b5c2ec7cbd4380aeef8d4272da3fdc90c86e7..b03fa89356c458526378be6901bc375dbb5a86ea 100644 (file)
@@ -39,10 +39,10 @@ class audio_transform;
 class image_transform;\r
 class video_channel_context;;\r
 \r
-class frame_mixer_device : public core::frame_factory\r
+class mixer : public core::frame_factory\r
 {\r
 public:        \r
-       explicit frame_mixer_device(video_channel_context& video_channel);\r
+       explicit mixer(video_channel_context& video_channel);\r
                \r
        safe_ptr<core::read_frame> execute(const std::map<int, safe_ptr<core::basic_frame>>& frames); // nothrow\r
                \r
similarity index 72%
rename from core/producer/frame_producer_device.cpp
rename to core/producer/stage.cpp
index 8833456974ee5b62118c523f309d78f649f71f40..b82b31bb2234355a21b0e5bba234fb35fbbdadc9 100644 (file)
@@ -20,7 +20,7 @@
 \r
 #include "../StdAfx.h"\r
 \r
-#include "frame_producer_device.h"\r
+#include "stage.h"\r
 \r
 #include "../video_channel_context.h"\r
 \r
@@ -71,7 +71,7 @@ public:
        virtual void                                            set_leading_producer(const safe_ptr<frame_producer>& producer)  {producer_->set_leading_producer(producer);}\r
 };\r
 \r
-struct frame_producer_device::implementation : boost::noncopyable\r
+struct stage::implementation : boost::noncopyable\r
 {              \r
        std::map<int, layer>                                            layers_;                \r
        typedef std::map<int, layer>::value_type        layer_t;\r
@@ -87,15 +87,22 @@ public:
        {                       \r
                std::map<int, safe_ptr<basic_frame>> frames;\r
 \r
-               // Allocate placeholders.\r
-               BOOST_FOREACH(auto layer, layers_)\r
-                       frames[layer.first] = basic_frame::empty();\r
-\r
-               // Render layers\r
-               tbb::parallel_for_each(layers_.begin(), layers_.end(), [&](layer_t& layer)\r
+               try\r
+               {\r
+                       // Allocate placeholders.\r
+                       BOOST_FOREACH(auto layer, layers_)\r
+                               frames[layer.first] = basic_frame::empty();\r
+\r
+                       // Render layers\r
+                       tbb::parallel_for_each(layers_.begin(), layers_.end(), [&](layer_t& layer)\r
+                       {\r
+                               frames[layer.first] = layer.second.receive();\r
+                       });\r
+               }\r
+               catch(...)\r
                {\r
-                       frames[layer.first] = layer.second.receive();\r
-               });\r
+                       CASPAR_LOG_CURRENT_EXCEPTION();\r
+               }\r
                \r
                return frames;\r
        }\r
@@ -135,7 +142,7 @@ public:
                channel_.execution().invoke([&]{layers_[index].swap(layers_[other_index]);});\r
        }\r
 \r
-       void swap_layer(int index, size_t other_index, frame_producer_device& other)\r
+       void swap_layer(int index, size_t other_index, stage& other)\r
        {\r
                if(other.impl_.get() == this)\r
                        swap_layer(index, other_index);\r
@@ -150,7 +157,7 @@ public:
                }\r
        }\r
 \r
-       void swap(frame_producer_device& other)\r
+       void swap(stage& other)\r
        {\r
                if(other.impl_.get() == this)\r
                        return;\r
@@ -186,17 +193,17 @@ public:
        }\r
 };\r
 \r
-frame_producer_device::frame_producer_device(video_channel_context& video_channel) : impl_(new implementation(video_channel)){}\r
-void frame_producer_device::swap(frame_producer_device& other){impl_->swap(other);}\r
-void frame_producer_device::load(int index, const safe_ptr<frame_producer>& producer, bool preview){impl_->load(index, producer, preview);}\r
-void frame_producer_device::pause(int index){impl_->pause(index);}\r
-void frame_producer_device::play(int index){impl_->play(index);}\r
-void frame_producer_device::stop(int index){impl_->stop(index);}\r
-void frame_producer_device::clear(int index){impl_->clear(index);}\r
-void frame_producer_device::clear(){impl_->clear();}\r
-void frame_producer_device::swap_layer(int index, size_t other_index){impl_->swap_layer(index, other_index);}\r
-void frame_producer_device::swap_layer(int index, size_t other_index, frame_producer_device& other){impl_->swap_layer(index, other_index, other);}\r
-boost::unique_future<safe_ptr<frame_producer>> frame_producer_device::foreground(size_t index) {return impl_->foreground(index);}\r
-boost::unique_future<safe_ptr<frame_producer>> frame_producer_device::background(size_t index) {return impl_->background(index);}\r
-std::map<int, safe_ptr<basic_frame>> frame_producer_device::execute(){return impl_->execute();}\r
+stage::stage(video_channel_context& video_channel) : impl_(new implementation(video_channel)){}\r
+void stage::swap(stage& other){impl_->swap(other);}\r
+void stage::load(int index, const safe_ptr<frame_producer>& producer, bool preview){impl_->load(index, producer, preview);}\r
+void stage::pause(int index){impl_->pause(index);}\r
+void stage::play(int index){impl_->play(index);}\r
+void stage::stop(int index){impl_->stop(index);}\r
+void stage::clear(int index){impl_->clear(index);}\r
+void stage::clear(){impl_->clear();}\r
+void stage::swap_layer(int index, size_t other_index){impl_->swap_layer(index, other_index);}\r
+void stage::swap_layer(int index, size_t other_index, stage& other){impl_->swap_layer(index, other_index, other);}\r
+boost::unique_future<safe_ptr<frame_producer>> stage::foreground(size_t index) {return impl_->foreground(index);}\r
+boost::unique_future<safe_ptr<frame_producer>> stage::background(size_t index) {return impl_->background(index);}\r
+std::map<int, safe_ptr<basic_frame>> stage::execute(){return impl_->execute();}\r
 }}
\ No newline at end of file
similarity index 83%
rename from core/producer/frame_producer_device.h
rename to core/producer/stage.h
index 8365064857ed1e071137bede3c606656099a866e..a45860b269f05db3dd1155c79037f627ad12e11a 100644 (file)
@@ -32,12 +32,12 @@ namespace caspar { namespace core {
 struct video_format_desc;\r
 class video_channel_context;;\r
 \r
-class frame_producer_device : boost::noncopyable\r
+class stage : boost::noncopyable\r
 {\r
 public:\r
-       explicit frame_producer_device(video_channel_context& video_channel);\r
+       explicit stage(video_channel_context& video_channel);\r
 \r
-       void swap(frame_producer_device& other);\r
+       void swap(stage& other);\r
 \r
        std::map<int, safe_ptr<basic_frame>> execute();\r
                \r
@@ -48,7 +48,7 @@ public:
        void clear(int index);\r
        void clear();   \r
        void swap_layer(int index, size_t other_index);\r
-       void swap_layer(int index, size_t other_index, frame_producer_device& other);\r
+       void swap_layer(int index, size_t other_index, stage& other);\r
        boost::unique_future<safe_ptr<frame_producer>> foreground(size_t index);\r
        boost::unique_future<safe_ptr<frame_producer>> background(size_t index);\r
 \r
index 96812ad929e334cc1393e581bcf4fef8c98a3893..d9df666ff94d9f598c64d06a02b4f7157f72e544 100644 (file)
 #include "StdAfx.h"\r
 \r
 #include "video_channel.h"\r
-\r
 #include "video_channel_context.h"\r
-\r
 #include "video_format.h"\r
+\r
+#include "consumer/output.h"\r
+#include "mixer/mixer.h"\r
+#include "producer/stage.h"\r
 #include "producer/layer.h"\r
 \r
 #include <common/concurrency/executor.h>\r
@@ -43,9 +45,9 @@ struct video_channel::implementation : boost::noncopyable
 {\r
        video_channel_context                   context_;\r
 \r
-       safe_ptr<frame_consumer_device> consumer_;\r
-       safe_ptr<frame_mixer_device>    mixer_;\r
-       safe_ptr<frame_producer_device> producer_;\r
+       safe_ptr<caspar::core::output>  output_;\r
+       safe_ptr<caspar::core::mixer>   mixer_;\r
+       safe_ptr<caspar::core::stage>   stage_;\r
 \r
        safe_ptr<diagnostics::graph>    diag_;\r
        boost::timer                                    frame_timer_;\r
@@ -55,9 +57,9 @@ public:
        implementation(int index, const video_format_desc& format_desc, ogl_device& ogl)  \r
                : context_(index, ogl, format_desc)\r
                , diag_(diagnostics::create_graph(narrow(print())))\r
-               , consumer_(new frame_consumer_device(context_))\r
-               , mixer_(new frame_mixer_device(context_))\r
-               , producer_(new frame_producer_device(context_))        \r
+               , output_(new caspar::core::output(context_))\r
+               , mixer_(new caspar::core::mixer(context_))\r
+               , stage_(new caspar::core::stage(context_))     \r
        {\r
                diag_->add_guide("produce-time", 0.5f); \r
                diag_->set_color("produce-time", diagnostics::color(1.0f, 0.0f, 0.0f));\r
@@ -84,7 +86,7 @@ public:
 \r
                frame_timer_.restart();\r
 \r
-               auto simple_frames = producer_->execute();\r
+               auto simple_frames = stage_->execute();\r
 \r
                diag_->update_value("produce-time", frame_timer_.elapsed()*context_.get_format_desc().fps*0.5);\r
                \r
@@ -98,7 +100,7 @@ public:
                \r
                // Consume\r
 \r
-               consumer_->execute(finished_frame);\r
+               output_->execute(finished_frame);\r
                \r
                diag_->update_value("tick-time", tick_timer_.elapsed()*context_.get_format_desc().fps*0.5);\r
                tick_timer_.restart();\r
@@ -122,9 +124,9 @@ public:
 \r
 video_channel::video_channel(int index, const video_format_desc& format_desc, ogl_device& ogl) : impl_(new implementation(index, format_desc, ogl)){}\r
 video_channel::video_channel(video_channel&& other) : impl_(std::move(other.impl_)){}\r
-safe_ptr<frame_producer_device> video_channel::producer() { return impl_->producer_;} \r
-safe_ptr<frame_mixer_device> video_channel::mixer() { return impl_->mixer_;} \r
-safe_ptr<frame_consumer_device> video_channel::consumer() { return impl_->consumer_;} \r
+safe_ptr<stage> video_channel::stage() { return impl_->stage_;} \r
+safe_ptr<mixer> video_channel::mixer() { return impl_->mixer_;} \r
+safe_ptr<output> video_channel::output() { return impl_->output_;} \r
 video_format_desc video_channel::get_video_format_desc() const{return impl_->context_.get_format_desc();}\r
 void video_channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
 std::wstring video_channel::print() const { return impl_->print();}\r
index a87ea6309bce15250e3057a4ff1035d9a0e83c54..2ca9c674c77ff927af3aee67ce9a5c4fc3e79ef7 100644 (file)
 \r
 #pragma once\r
 \r
-#include "consumer/frame_consumer_device.h"\r
-#include "mixer/frame_mixer_device.h"\r
-#include "producer/frame_producer_device.h"\r
-\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
 namespace caspar { namespace core {\r
        \r
+class stage;\r
+class mixer;\r
+class output;\r
 class ogl_device;\r
+struct video_format_desc;\r
 \r
 class video_channel : boost::noncopyable\r
 {\r
@@ -38,9 +38,9 @@ public:
        explicit video_channel(int index, const video_format_desc& format_desc, ogl_device& ogl);\r
        video_channel(video_channel&& other);\r
 \r
-       safe_ptr<frame_producer_device> producer();\r
-       safe_ptr<frame_mixer_device>    mixer();\r
-       safe_ptr<frame_consumer_device> consumer();\r
+       safe_ptr<stage> stage();\r
+       safe_ptr<mixer> mixer();\r
+       safe_ptr<output> output();\r
 \r
        video_format_desc get_video_format_desc() const;\r
        void set_video_format_desc(const video_format_desc& format_desc);\r
index 3b2d6f98f852bca72531ca564387c6c0c0f7b18d..e5095551f6e0637db3b27be4da94c93c5f5b1f82 100644 (file)
@@ -25,6 +25,8 @@
 \r
 #include <common/env.h>\r
 \r
+#include <core/mixer/mixer.h>\r
+\r
 #include <boost/filesystem.hpp>\r
 #include <boost/format.hpp>\r
                \r
@@ -93,13 +95,13 @@ public:
        \r
 safe_ptr<cg_producer> get_default_cg_producer(const safe_ptr<core::video_channel>& video_channel, int render_layer)\r
 {      \r
-       auto flash_producer = video_channel->producer()->foreground(render_layer).get();\r
+       auto flash_producer = video_channel->stage()->foreground(render_layer).get();\r
 \r
        if(flash_producer->print().find(L"flash") == std::string::npos)\r
        {\r
                flash_producer = create_flash_producer(video_channel->mixer(), boost::assign::list_of(env::template_host()));   \r
-               video_channel->producer()->load(render_layer, flash_producer, true); \r
-               video_channel->producer()->play(render_layer);\r
+               video_channel->stage()->load(render_layer, flash_producer, true); \r
+               video_channel->stage()->play(render_layer);\r
        }\r
 \r
        return make_safe<cg_producer>(flash_producer);\r
index 883f66d4e3399174fe8aa069886b9d01e68d618d..6180562b0f3d17730f7cee867d5d67ec2810856e 100644 (file)
@@ -20,7 +20,7 @@
 #pragma once\r
 \r
 #include <core/producer/frame_producer.h>\r
-#include <core/producer/frame_producer_device.h>\r
+#include <core/producer/stage.h>\r
 #include <core/video_format.h>\r
 #include <core/video_channel.h>\r
 \r
index f172c70bdacec9e10e24d18a3030fc6b8e4eda36..b4cb64cc8bc5ad07db754f03840629f53005918c 100644 (file)
@@ -34,6 +34,8 @@
 \r
 #include <core/producer/frame/image_transform.h>\r
 #include <core/producer/frame/audio_transform.h>\r
+#include <core/mixer/mixer.h>\r
+#include <core/consumer/output.h>\r
 \r
 #include <algorithm>\r
 #include <locale>\r
@@ -164,7 +166,7 @@ void AMCPCommand::SendReply()
 \r
 void AMCPCommand::Clear() \r
 {\r
-       pChannel_->producer()->clear();\r
+       pChannel_->stage()->clear();\r
        pClientInfo_.reset();\r
        channelIndex_ = 0;\r
        _parameters.clear();\r
@@ -177,9 +179,9 @@ bool ParamCommand::DoExecute()
        {\r
                auto what = _parameters.at(2);\r
                if(what == L"B")\r
-                       GetChannel()->producer()->background(GetLayerIndex()).get()->param(_parameters.at(3));\r
+                       GetChannel()->stage()->background(GetLayerIndex()).get()->param(_parameters.at(3));\r
                else if(what == L"F")\r
-                       GetChannel()->producer()->foreground(GetLayerIndex()).get()->param(_parameters.at(3));\r
+                       GetChannel()->stage()->foreground(GetLayerIndex()).get()->param(_parameters.at(3));\r
        \r
                CASPAR_LOG(info) << "Executed param: " <<  _parameters[0] << TEXT(" successfully");\r
 \r
@@ -404,13 +406,13 @@ bool SwapCommand::DoExecute()
                        int l1 = GetLayerIndex();\r
                        int l2 = boost::lexical_cast<int>(strs.at(1));\r
 \r
-                       ch1->producer()->swap_layer(l1, l2, *ch2->producer());\r
+                       ch1->stage()->swap_layer(l1, l2, *ch2->stage());\r
                }\r
                else\r
                {\r
                        auto ch1 = GetChannel();\r
                        auto ch2 = GetChannels().at(boost::lexical_cast<int>(_parameters[0])-1);\r
-                       ch1->producer()->swap(*ch2->producer());\r
+                       ch1->stage()->swap(*ch2->stage());\r
                }\r
 \r
                CASPAR_LOG(info) << "Swapped successfully";\r
@@ -438,7 +440,7 @@ bool AddCommand::DoExecute()
        //Perform loading of the clip\r
        try\r
        {\r
-               GetChannel()->consumer()->add(GetLayerIndex(), create_consumer(_parameters));\r
+               GetChannel()->output()->add(GetLayerIndex(), create_consumer(_parameters));\r
        \r
                CASPAR_LOG(info) << "Added " <<  _parameters[0] << TEXT(" successfully");\r
 \r
@@ -465,7 +467,7 @@ bool RemoveCommand::DoExecute()
        //Perform loading of the clip\r
        try\r
        {\r
-               GetChannel()->consumer()->remove(GetLayerIndex());\r
+               GetChannel()->output()->remove(GetLayerIndex());\r
 \r
                SetReplyString(TEXT("202 REMOVE OK\r\n"));\r
 \r
@@ -492,7 +494,7 @@ bool LoadCommand::DoExecute()
        {\r
                _parameters[0] = _parameters[0];\r
                auto pFP = create_producer(GetChannel()->mixer(), _parameters);         \r
-               GetChannel()->producer()->load(GetLayerIndex(), pFP, true);\r
+               GetChannel()->stage()->load(GetLayerIndex(), pFP, true);\r
        \r
                CASPAR_LOG(info) << "Loaded " <<  _parameters[0] << TEXT(" successfully");\r
 \r
@@ -604,7 +606,7 @@ bool LoadbgCommand::DoExecute()
                        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().mode, pFP, transitionInfo);\r
-               GetChannel()->producer()->load(GetLayerIndex(), pFP2); // TODO: LOOP\r
+               GetChannel()->stage()->load(GetLayerIndex(), pFP2); // TODO: LOOP\r
        \r
                CASPAR_LOG(info) << "Loaded " << _parameters[0] << TEXT(" successfully to background");\r
                SetReplyString(TEXT("202 LOADBG OK\r\n"));\r
@@ -629,7 +631,7 @@ bool PauseCommand::DoExecute()
 {\r
        try\r
        {\r
-               GetChannel()->producer()->pause(GetLayerIndex());\r
+               GetChannel()->stage()->pause(GetLayerIndex());\r
                SetReplyString(TEXT("202 PAUSE OK\r\n"));\r
                return true;\r
        }\r
@@ -660,7 +662,7 @@ bool PlayCommand::DoExecute()
                        CASPAR_LOG(info) << "Playing " << _parameters[0];\r
                }\r
 \r
-               GetChannel()->producer()->play(GetLayerIndex());\r
+               GetChannel()->stage()->play(GetLayerIndex());\r
                \r
                SetReplyString(TEXT("202 PLAY OK\r\n"));\r
                return true;\r
@@ -677,7 +679,7 @@ bool StopCommand::DoExecute()
 {\r
        try\r
        {\r
-               GetChannel()->producer()->stop(GetLayerIndex());\r
+               GetChannel()->stage()->stop(GetLayerIndex());\r
                SetReplyString(TEXT("202 STOP OK\r\n"));\r
                return true;\r
        }\r
@@ -693,9 +695,9 @@ bool ClearCommand::DoExecute()
 {\r
        int index = GetLayerIndex(std::numeric_limits<int>::min());\r
        if(index != std::numeric_limits<int>::min())\r
-               GetChannel()->producer()->clear(index);\r
+               GetChannel()->stage()->clear(index);\r
        else\r
-               GetChannel()->producer()->clear();\r
+               GetChannel()->stage()->clear();\r
                \r
        SetReplyString(TEXT("202 CLEAR OK\r\n"));\r
 \r
@@ -924,7 +926,7 @@ bool CGCommand::DoExecuteRemove()
 \r
 bool CGCommand::DoExecuteClear() \r
 {\r
-       GetChannel()->producer()->clear(GetLayerIndex(cg_producer::DEFAULT_LAYER));\r
+       GetChannel()->stage()->clear(GetLayerIndex(cg_producer::DEFAULT_LAYER));\r
        SetReplyString(TEXT("202 CG OK\r\n"));\r
        return true;\r
 }\r
index bcf3b1e0e62b9dff1c5538382109743c7f258798..acdb1115b4d659d33e5f88a0403156590e9609bd 100644 (file)
@@ -157,7 +157,7 @@ void KeydataCommand::Execute()
        else if(state_ == 1)\r
                get_default_cg_producer(pCIIStrategy_->GetChannel())->stop(layer_, 0);\r
        else if(state_ == 2)\r
-               pCIIStrategy_->GetChannel()->producer()->clear(cg_producer::DEFAULT_LAYER);\r
+               pCIIStrategy_->GetChannel()->stage()->clear(cg_producer::DEFAULT_LAYER);\r
        else if(state_ == 3)\r
                get_default_cg_producer(pCIIStrategy_->GetChannel())->play(layer_);\r
 }\r
index 019fcc11df31bb2121eabb0293e16678161947b2..d934a0fa91cb6cadb30eff8171666404ee53c745 100644 (file)
@@ -27,7 +27,7 @@
 #include "CIICommandsimpl.h"\r
 #include <modules/flash/producer/flash_producer.h>\r
 #include <core/producer/transition/transition_producer.h>\r
-#include <core/producer/frame_producer.h>\r
+#include <core/mixer/mixer.h>\r
 #include <common/env.h>\r
 \r
 #if defined(_MSC_VER)\r
@@ -196,8 +196,8 @@ void CIIProtocolStrategy::DisplayTemplate(const std::wstring& titleName)
 {\r
        try\r
        {\r
-               pChannel_->producer()->load(0, GetPreparedTemplate(titleName));\r
-               pChannel_->producer()->play(0);\r
+               pChannel_->stage()->load(0, GetPreparedTemplate(titleName));\r
+               pChannel_->stage()->play(0);\r
 \r
                CASPAR_LOG(info) << L"Displayed title " << titleName ;\r
        }\r
@@ -218,7 +218,7 @@ void CIIProtocolStrategy::DisplayMediaFile(const std::wstring& filename)
 \r
        try\r
        {\r
-               pChannel_->producer()->load(0, pTransition);\r
+               pChannel_->stage()->load(0, pTransition);\r
        }\r
        catch(...)\r
        {\r
@@ -227,7 +227,7 @@ void CIIProtocolStrategy::DisplayMediaFile(const std::wstring& filename)
                return;\r
        }\r
 \r
-       pChannel_->producer()->play(0);\r
+       pChannel_->stage()->play(0);\r
 \r
        CASPAR_LOG(info) << L"Displayed " << filename;\r
 }\r
index 660573e411be1506da7741f39e4b5d649b8b53a0..33858e94f3c766837343b97b6cc2a3909ec5579e 100644 (file)
@@ -25,7 +25,7 @@
 #include "../util/ProtocolStrategy.h"\r
 #include "CIICommand.h"\r
 \r
-#include <core/consumer/frame_consumer.h>\r
+#include <core/producer/stage.h>\r
 \r
 #include <common/concurrency/executor.h>\r
 \r
index 1f310617de7b02d115cc2c66fe01e5ba96049d3f..e7c2f622844ba4ebd5a8a2a4d71b0c052f5455f0 100644 (file)
@@ -115,7 +115,7 @@ void CLKProtocolStrategy::Parse(const TCHAR* pData, int charCount, IO::ClientInf
 \r
                        if(currentCommand_.command_ == CLKCommand::CLKReset) \r
                        {\r
-                               pChannel_->producer()->clear(cg_producer::DEFAULT_LAYER);\r
+                               pChannel_->stage()->clear(cg_producer::DEFAULT_LAYER);\r
                                bClockLoaded_ = false;\r
                                \r
                                CASPAR_LOG(info) << L"CLK: Recieved and executed reset-command";\r
index bbade5ce39ef39b1f7a1c47af087a03c371d07a5..52ac618a5b14fdece040e54a5930ff21c708399a 100644 (file)
@@ -26,6 +26,8 @@
 \r
 #include <core/mixer/gpu/ogl_device.h>\r
 #include <core/video_channel.h>\r
+#include <core/producer/stage.h>\r
+#include <core/consumer/output.h>\r
 \r
 #include <modules/bluefish/bluefish.h>\r
 #include <modules/decklink/decklink.h>\r
@@ -105,15 +107,15 @@ struct server::implementation : boost::noncopyable
                                {\r
                                        const std::string name = xml_consumer.first;\r
                                        if(name == "screen")\r
-                                               channels_.back()->consumer()->add(index++, create_ogl_consumer(xml_consumer.second));                                   \r
+                                               channels_.back()->output()->add(index++, create_ogl_consumer(xml_consumer.second));                                     \r
                                        else if(name == "bluefish")                                     \r
-                                               channels_.back()->consumer()->add(index++, create_bluefish_consumer(xml_consumer.second));                                      \r
+                                               channels_.back()->output()->add(index++, create_bluefish_consumer(xml_consumer.second));                                        \r
                                        else if(name == "decklink")                                     \r
-                                               channels_.back()->consumer()->add(index++, create_decklink_consumer(xml_consumer.second));                              \r
+                                               channels_.back()->output()->add(index++, create_decklink_consumer(xml_consumer.second));                                \r
                                        //else if(name == "file")                                       \r
-                                       //      channels_.back()->consumer()->add(index++, create_ffmpeg_consumer(xml_consumer.second));                                                \r
+                                       //      channels_.back()->output()->add(index++, create_ffmpeg_consumer(xml_consumer.second));                                          \r
                                        else if(name == "audio")\r
-                                               channels_.back()->consumer()->add(index++, make_safe<oal_consumer>());          \r
+                                               channels_.back()->output()->add(index++, make_safe<oal_consumer>());            \r
                                        else if(name != "<xmlcomment>")\r
                                                CASPAR_LOG(warning) << "Invalid consumer: " << widen(name);     \r
                                }\r