]> git.sesse.net Git - casparcg/commitdiff
2.0.0.2: Some restructuring. Removed gpu_frame_x and moved them into write/read-frame...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 18 May 2011 00:21:42 +0000 (00:21 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 18 May 2011 00:21:42 +0000 (00:21 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@773 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

44 files changed:
common/common.vcxproj
common/common.vcxproj.filters
common/gl/gl_check.cpp [new file with mode: 0644]
common/gl/gl_check.h
common/stdafx.h
core/StdAfx.h
core/channel.cpp
core/channel.h
core/core.vcxproj
core/core.vcxproj.filters
core/mixer/audio/audio_mixer.cpp
core/mixer/audio/audio_mixer.h
core/mixer/frame_mixer_device.cpp
core/mixer/frame_mixer_device.h
core/mixer/gpu/device_buffer.cpp
core/mixer/gpu/device_buffer.h
core/mixer/gpu/host_buffer.cpp
core/mixer/gpu/host_buffer.h
core/mixer/gpu/ogl_device.cpp
core/mixer/gpu/ogl_device.h
core/mixer/image/image_kernel.cpp
core/mixer/image/image_kernel.h
core/mixer/image/image_mixer.cpp
core/mixer/image/image_mixer.h
core/mixer/read_frame.cpp [new file with mode: 0644]
core/mixer/read_frame.h [new file with mode: 0644]
core/mixer/write_frame.cpp [new file with mode: 0644]
core/mixer/write_frame.h [new file with mode: 0644]
core/producer/color/color_producer.cpp
modules/bluefish/consumer/bluefish_consumer.cpp
modules/decklink/consumer/decklink_consumer.cpp
modules/decklink/interop/DeckLinkAPI_h.h
modules/decklink/interop/DeckLinkAPI_i.c
modules/decklink/producer/decklink_producer.cpp
modules/ffmpeg/consumer/ffmpeg_consumer.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/video/video_decoder.cpp
modules/flash/producer/flash_producer.cpp
modules/image/producer/image_producer.cpp
modules/oal/consumer/oal_consumer.cpp
modules/ogl/consumer/ogl_consumer.cpp
modules/silverlight/producer/silverlight_producer.cpp
shell/caspar.config
shell/main.cpp

index 3f1086751f2e21f8fa276f42ad851cd5167c4203..78680599a3f0d18c37b5679534df6b065579f186 100644 (file)
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
+    <ClCompile Include="gl\gl_check.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)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
+    </ClCompile>\r
     <ClCompile Include="log\log.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
index bc2e3992dce47f9192aece3b58154ce3cd2e6190..5021bf3c91b0b774d3bd7bfa46a053c7bcdb2cda 100644 (file)
@@ -50,6 +50,9 @@
     <ClCompile Include="utility\string.cpp">\r
       <Filter>utility</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="gl\gl_check.cpp">\r
+      <Filter>gl</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="exception\exceptions.h">\r
diff --git a/common/gl/gl_check.cpp b/common/gl/gl_check.cpp
new file mode 100644 (file)
index 0000000..512e5ae
--- /dev/null
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////\r
+//\r
+// SFML - Simple and Fast Multimedia Library\r
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)\r
+//\r
+// This software is provided 'as-is', without any express or implied warranty.\r
+// In no event will the authors be held liable for any damages arising from the use of this software.\r
+//\r
+// Permission is granted to anyone to use this software for any purpose,\r
+// including commercial applications, and to alter it and redistribute it freely,\r
+// subject to the following restrictions:\r
+//\r
+// 1. The origin of this software must not be misrepresented;\r
+//    you must not claim that you wrote the original software.\r
+//    If you use this software in a product, an acknowledgment\r
+//    in the product documentation would be appreciated but is not required.\r
+//\r
+// 2. Altered source versions must be plainly marked as such,\r
+//    and must not be misrepresented as being the original software.\r
+//\r
+// 3. This notice may not be removed or altered from any source distribution.\r
+//\r
+////////////////////////////////////////////////////////////\r
+\r
+#pragma once\r
+\r
+#include "../stdafx.h"\r
+\r
+#include "gl_check.h"\r
+\r
+#include <Glee.h>\r
+\r
+#include "../exception/exceptions.h"\r
+#include "../log/log.h"\r
+\r
+#include <boost/lexical_cast.hpp>\r
+\r
+namespace caspar { namespace gl {      \r
+\r
+void SMFL_GLCheckError(const std::string& expr, const std::string& File, unsigned int Line)\r
+{\r
+       // Get the last error\r
+       GLenum ErrorCode = glGetError();\r
+\r
+       if (ErrorCode != GL_NO_ERROR)\r
+       {\r
+               std::string Error = "unknown error";\r
+               std::string Desc  = "no description";\r
+\r
+               // Decode the error code\r
+               switch (ErrorCode)\r
+               {\r
+                       case GL_INVALID_ENUM :\r
+                       {\r
+                               Error = "GL_INVALID_ENUM";\r
+                               Desc  = "an unacceptable value has been specified for an enumerated argument";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_INVALID_VALUE :\r
+                       {\r
+                               Error = "GL_INVALID_VALUE";\r
+                               Desc  = "a numeric argument is out of range";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_INVALID_OPERATION :\r
+                       {\r
+                               Error = "GL_INVALID_OPERATION";\r
+                               Desc  = "the specified operation is not allowed in the current state";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_STACK_OVERFLOW :\r
+                       {\r
+                               Error = "GL_STACK_OVERFLOW";\r
+                               Desc  = "this command would cause a stack overflow";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_STACK_UNDERFLOW :\r
+                       {\r
+                               Error = "GL_STACK_UNDERFLOW";\r
+                               Desc  = "this command would cause a stack underflow";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_OUT_OF_MEMORY :\r
+                       {\r
+                               Error = "GL_OUT_OF_MEMORY";\r
+                               Desc  = "there is not enough memory left to execute the command";\r
+                               break;\r
+                       }\r
+\r
+                       case GL_INVALID_FRAMEBUFFER_OPERATION_EXT :\r
+                       {\r
+                               Error = "GL_INVALID_FRAMEBUFFER_OPERATION_EXT";\r
+                               Desc  = "the object bound to FRAMEBUFFER_BINDING_EXT is not \"framebuffer complete\"";\r
+                               break;\r
+                       }\r
+               }\r
+\r
+               // Log the error\r
+               CASPAR_LOG(error) << "An internal OpenGL call failed in "\r
+                                 << File.substr(File.find_last_of("\\/") + 1).c_str() << " (" << Line << ") : "\r
+                                 << Error.c_str() << ", " << Desc.c_str()\r
+                                 << ", " << expr.c_str()\r
+                                 << std::endl;\r
+       }\r
+}\r
+\r
+#ifdef _DEBUG\r
+       \r
+#define CASPAR_GL_EXPR_STR(expr) #expr\r
+\r
+#define GL(expr) \\r
+       do \\r
+       { \\r
+               (expr);  \\r
+               caspar::gl::SMFL_GLCheckError(CASPAR_GL_EXPR_STR(expr), __FILE__, __LINE__);\\r
+       }while(0);\r
+#else\r
+#define GL(expr) expr\r
+#endif\r
+\r
+}}
\ No newline at end of file
index 4437af60f816df8267e383015e39a5ba140efa68..8663b8c315aad970fd1bbd95b8ccf7d6a46c3fc5 100644 (file)
 \r
 #pragma once\r
 \r
-#include <Glee.h>\r
-\r
-#include "../exception/exceptions.h"\r
-#include "../log/log.h"\r
-\r
-#include <boost/lexical_cast.hpp>\r
-\r
 namespace caspar { namespace gl {\r
-\r
-struct gl_error : virtual caspar_exception{};\r
-               \r
-inline void SMFL_GLCheckError(const std::string& expr, const std::string& File, unsigned int Line)\r
-{\r
-       // Get the last error\r
-       GLenum ErrorCode = glGetError();\r
-\r
-       if (ErrorCode != GL_NO_ERROR)\r
-       {\r
-               std::string Error = "unknown error";\r
-               std::string Desc  = "no description";\r
-\r
-               // Decode the error code\r
-               switch (ErrorCode)\r
-               {\r
-                       case GL_INVALID_ENUM :\r
-                       {\r
-                               Error = "GL_INVALID_ENUM";\r
-                               Desc  = "an unacceptable value has been specified for an enumerated argument";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_INVALID_VALUE :\r
-                       {\r
-                               Error = "GL_INVALID_VALUE";\r
-                               Desc  = "a numeric argument is out of range";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_INVALID_OPERATION :\r
-                       {\r
-                               Error = "GL_INVALID_OPERATION";\r
-                               Desc  = "the specified operation is not allowed in the current state";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_STACK_OVERFLOW :\r
-                       {\r
-                               Error = "GL_STACK_OVERFLOW";\r
-                               Desc  = "this command would cause a stack overflow";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_STACK_UNDERFLOW :\r
-                       {\r
-                               Error = "GL_STACK_UNDERFLOW";\r
-                               Desc  = "this command would cause a stack underflow";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_OUT_OF_MEMORY :\r
-                       {\r
-                               Error = "GL_OUT_OF_MEMORY";\r
-                               Desc  = "there is not enough memory left to execute the command";\r
-                               break;\r
-                       }\r
-\r
-                       case GL_INVALID_FRAMEBUFFER_OPERATION_EXT :\r
-                       {\r
-                               Error = "GL_INVALID_FRAMEBUFFER_OPERATION_EXT";\r
-                               Desc  = "the object bound to FRAMEBUFFER_BINDING_EXT is not \"framebuffer complete\"";\r
-                               break;\r
-                       }\r
-               }\r
-\r
-               // Log the error\r
-               CASPAR_LOG(error) << "An internal OpenGL call failed in "\r
-                                 << File.substr(File.find_last_of("\\/") + 1).c_str() << " (" << Line << ") : "\r
-                                 << Error.c_str() << ", " << Desc.c_str()\r
-                                 << ", " << expr.c_str()\r
-                                 << std::endl;\r
-       }\r
-}\r
+                       \r
+void SMFL_GLCheckError(const std::string& expr, const std::string& File, unsigned int Line);\r
 \r
 #ifdef _DEBUG\r
        \r
index 593184a4831f8e27aa2fc336928dca2b50e02d3e..a7e056e534dcd8a33884d24f7eed5db00d0ade7c 100644 (file)
@@ -28,6 +28,9 @@
 #define NOMINMAX\r
 #define WIN32_LEAN_AND_MEAN\r
 \r
+#include <windows.h>\r
+#include <Glee.h>\r
+\r
 #include "compiler\vs\disable_silly_warnings.h"\r
 \r
 #include <string>\r
index 8c0e0edb1d8c5f1ddbf8e301528dff14f841af17..67d7fc72f5b677f28c2483a0ae7d0ecac231e25c 100644 (file)
 #include <crtdbg.h>\r
 #endif\r
 \r
+#include <Windows.h>\r
+#include <GLee.h>\r
+#include <SFML/Window.hpp>\r
+\r
 #include <tchar.h>\r
 #include <sstream>\r
 #include <memory>\r
index 3c64f5b70bd503e0254f817452944a40b7e3f1d4..7866099bd306d84d6ab761fbafd5554f287e7581 100644 (file)
@@ -47,7 +47,7 @@ struct channel::implementation : boost::noncopyable
        const int index_;\r
        video_format_desc format_desc_;\r
        \r
-       safe_ptr<mixer::frame_mixer_device> mixer_; // Mixer must be destroyed last in order to make sure that all frames have been returned to the pool.\r
+       safe_ptr<frame_mixer_device> mixer_; // Mixer must be destroyed last in order to make sure that all frames have been returned to the pool.\r
        safe_ptr<frame_consumer_device> consumer_;\r
        safe_ptr<frame_producer_device> producer_;\r
 \r
@@ -59,7 +59,7 @@ public:
                : index_(index)\r
                , format_desc_(format_desc)\r
                , consumer_(new frame_consumer_device(format_desc))\r
-               , mixer_(new mixer::frame_mixer_device(format_desc))\r
+               , mixer_(new frame_mixer_device(format_desc))\r
                , producer_(new frame_producer_device(format_desc_))    \r
                , mixer_connection_(mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);}))\r
                , producer_connection_(producer_->connect([=](const std::map<int, safe_ptr<basic_frame>>& frames){mixer_->send(frames);}))\r
@@ -79,7 +79,7 @@ public:
                mixer_connection_.disconnect();\r
 \r
                consumer_->set_video_format_desc(format_desc_);\r
-               mixer_ = make_safe<mixer::frame_mixer_device>(format_desc_);\r
+               mixer_ = make_safe<frame_mixer_device>(format_desc_);\r
                producer_ = make_safe<frame_producer_device>(format_desc_);\r
 \r
                mixer_connection_ = mixer_->connect([=](const safe_ptr<const read_frame>& frame){consumer_->send(frame);});\r
@@ -90,7 +90,7 @@ public:
 channel::channel(int index, const video_format_desc& format_desc) : impl_(new implementation(index, format_desc)){}\r
 channel::channel(channel&& other) : impl_(std::move(other.impl_)){}\r
 const safe_ptr<frame_producer_device>& channel::producer() { return impl_->producer_;} \r
-const safe_ptr<mixer::frame_mixer_device>& channel::mixer() { return impl_->mixer_;} \r
+const safe_ptr<frame_mixer_device>& channel::mixer() { return impl_->mixer_;} \r
 const safe_ptr<frame_consumer_device>& channel::consumer() { return impl_->consumer_;} \r
 const video_format_desc& channel::get_video_format_desc() const{return impl_->format_desc_;}\r
 void channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
index 14d3fd8fde26f840879ae73700f27693a6baaf19..98a9fee64ecefd29cf48747551edf17748770d52 100644 (file)
@@ -38,7 +38,7 @@ public:
        channel(channel&& other);\r
 \r
        const safe_ptr<frame_producer_device>& producer();\r
-       const safe_ptr<mixer::frame_mixer_device>& mixer();\r
+       const safe_ptr<frame_mixer_device>& mixer();\r
        const safe_ptr<frame_consumer_device>& consumer();\r
 \r
        const video_format_desc& get_video_format_desc() const;\r
index 88eafb503e1715f5d4f8d90c5a124faeda27e172..4cc4c541f862a55e42180661db4c20d3878da542 100644 (file)
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClInclude Include="channel.h" />\r
-    <ClInclude Include="consumer\frame\read_frame.h" />\r
     <ClInclude Include="consumer\frame_consumer_device.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\gpu\device_buffer.h" />\r
-    <ClInclude Include="mixer\gpu\gpu_read_frame.h" />\r
-    <ClInclude Include="mixer\gpu\gpu_write_frame.h" />\r
     <ClInclude Include="mixer\gpu\host_buffer.h" />\r
     <ClInclude Include="mixer\gpu\ogl_device.h" />\r
     <ClInclude Include="mixer\image\image_kernel.h" />\r
     <ClInclude Include="mixer\image\image_mixer.h" />\r
+    <ClInclude Include="mixer\read_frame.h" />\r
+    <ClInclude Include="mixer\write_frame.h" />\r
     <ClInclude Include="producer\color\color_producer.h" />\r
     <ClInclude Include="producer\frame\audio_transform.h" />\r
     <ClInclude Include="producer\frame\basic_frame.h" />\r
     <ClInclude Include="producer\frame\frame_visitor.h" />\r
     <ClInclude Include="producer\frame\image_transform.h" />\r
     <ClInclude Include="producer\frame\pixel_format.h" />\r
-    <ClInclude Include="producer\frame\write_frame.h" />\r
     <ClInclude Include="producer\frame_producer.h" />\r
     <ClInclude Include="producer\frame_producer_device.h" />\r
     <ClInclude Include="producer\layer.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="mixer\gpu\gpu_read_frame.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)'=='Release|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
-    </ClCompile>\r
-    <ClCompile Include="mixer\gpu\gpu_write_frame.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)'=='Release|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
-    </ClCompile>\r
     <ClCompile Include="mixer\gpu\host_buffer.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)'=='Release|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
+    <ClCompile Include="mixer\read_frame.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)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
+    </ClCompile>\r
+    <ClCompile Include="mixer\write_frame.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)'=='Release|Win32'">../StdAfx.h</PrecompiledHeaderFile>\r
+    </ClCompile>\r
     <ClCompile Include="producer\color\color_producer.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../StdAfx.h</PrecompiledHeaderFile>\r
index a4c9a75c45dbe6cd8d88ba5427eced08a594ceca..04b3903a167c0e73297083d20a56f26557109bcd 100644 (file)
@@ -16,9 +16,6 @@
     <Filter Include="producer\frame">\r
       <UniqueIdentifier>{b19721c1-8dd1-45fb-b9e3-212b548ebbb6}</UniqueIdentifier>\r
     </Filter>\r
-    <Filter Include="consumer\frame">\r
-      <UniqueIdentifier>{fc8d2ce0-e849-4f8e-83bf-494ab4455b80}</UniqueIdentifier>\r
-    </Filter>\r
     <Filter Include="mixer">\r
       <UniqueIdentifier>{e480e128-a351-4dc6-a7ab-f58b480f6afd}</UniqueIdentifier>\r
     </Filter>\r
     <ClInclude Include="producer\frame\pixel_format.h">\r
       <Filter>producer\frame</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="producer\frame\write_frame.h">\r
-      <Filter>producer\frame</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="consumer\frame\read_frame.h">\r
-      <Filter>consumer\frame</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="video_format.h" />\r
     <ClInclude Include="producer\frame\frame_visitor.h">\r
       <Filter>producer\frame</Filter>\r
     <ClInclude Include="mixer\image\image_mixer.h">\r
       <Filter>mixer\image</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="mixer\gpu\gpu_read_frame.h">\r
-      <Filter>mixer\gpu</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="mixer\gpu\gpu_write_frame.h">\r
-      <Filter>mixer\gpu</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="mixer\gpu\host_buffer.h">\r
       <Filter>mixer\gpu</Filter>\r
     </ClInclude>\r
     <ClInclude Include="producer\separated\separated_producer.h">\r
       <Filter>producer\separated</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="mixer\read_frame.h">\r
+      <Filter>mixer</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="mixer\write_frame.h">\r
+      <Filter>mixer</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="producer\transition\transition_producer.cpp">\r
     <ClCompile Include="mixer\image\image_kernel.cpp">\r
       <Filter>mixer\image</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="mixer\gpu\gpu_read_frame.cpp">\r
-      <Filter>mixer\gpu</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="mixer\gpu\gpu_write_frame.cpp">\r
-      <Filter>mixer\gpu</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="mixer\gpu\host_buffer.cpp">\r
       <Filter>mixer\gpu</Filter>\r
     </ClCompile>\r
     <ClCompile Include="producer\separated\separated_producer.cpp">\r
       <Filter>producer\separated</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="mixer\read_frame.cpp">\r
+      <Filter>mixer</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="mixer\write_frame.cpp">\r
+      <Filter>mixer</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index d7a9a22b44c7f37a771488977ecf954dc1436d22..4904e1d03a150550d3abe8e564ae48e28587700b 100644 (file)
 \r
 #include "audio_mixer.h"\r
 \r
-#include "../gpu/gpu_write_frame.h"\r
-\r
+#include <core/mixer/write_frame.h>\r
 #include <core/producer/frame/audio_transform.h>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
        \r
 struct audio_mixer::implementation\r
 {\r
index 92f20ace9a865fd33753ebf1d91b8225a484921c..b3adb26162270310bf9e4ffe20a0baea579c00ba 100644 (file)
@@ -24,7 +24,7 @@
 \r
 #include <boost/noncopyable.hpp>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
        \r
 class audio_mixer : public core::frame_visitor, boost::noncopyable\r
 {\r
index 219a79f44cb10c368da14b0ce47ee915b5dffda4..790552422c65e7eafa9a7994bc6b4c26651c4c44 100644 (file)
@@ -21,8 +21,8 @@
 \r
 #include "frame_mixer_device.h"\r
 \r
-#include "gpu/gpu_read_frame.h"\r
-#include "gpu/gpu_write_frame.h"\r
+#include "read_frame.h"\r
+#include "write_frame.h"\r
 \r
 #include "audio/audio_mixer.h"\r
 #include "image/image_mixer.h"\r
 #include <common/diagnostics/graph.h>\r
 #include <common/utility/tweener.h>\r
 \r
-#include <core/consumer/frame/read_frame.h>\r
-#include <core/producer/frame/write_frame.h>\r
+\r
+#include <core/mixer/read_frame.h>\r
+#include <core/mixer/write_frame.h>\r
+#include <core/producer/frame/basic_frame.h>\r
 #include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/audio_transform.h>\r
@@ -47,7 +49,7 @@
 \r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
                \r
 template<typename T>\r
 class tweened_transform\r
@@ -195,7 +197,7 @@ public:
 \r
                        diag_->update_value("frame-time", static_cast<float>(frame_timer_.elapsed()*format_desc_.fps*0.5));\r
 \r
-                       output_(make_safe<const gpu_read_frame>(std::move(image), std::move(audio)));\r
+                       output_(make_safe<const read_frame>(std::move(image), std::move(audio)));\r
 \r
                        diag_->update_value("tick-time", static_cast<float>(tick_timer_.elapsed()*format_desc_.fps*0.5));\r
                        tick_timer_.restart();\r
@@ -205,7 +207,7 @@ public:
                \r
        safe_ptr<core::write_frame> create_frame(void* tag, const core::pixel_format_desc& desc)\r
        {\r
-               return make_safe<gpu_write_frame>(reinterpret_cast<int>(tag), desc, image_mixer_.create_buffers(desc));\r
+               return make_safe<write_frame>(reinterpret_cast<int>(tag), desc, image_mixer_.create_buffers(desc));\r
        }\r
                        \r
        template<typename T>    \r
index 63c4bdbce359a9707a9f4c14aa523dfc813f2f53..a7c7bc66fa642851add86825b667b59192367fdb 100644 (file)
@@ -40,7 +40,7 @@ class image_transform;
 \r
 }\r
 \r
-namespace mixer {\r
+namespace core {\r
        \r
 class frame_mixer_device : public core::frame_factory\r
 {\r
index 22ca870c12973961ce7960306836eac5911c45e0..a036371933038062a6494b5d59d75893996be1cb 100644 (file)
@@ -22,7 +22,8 @@
 #include "device_buffer.h"\r
 \r
 #include <common/gl/gl_check.h>\r
-namespace caspar { namespace mixer {\r
+\r
+namespace caspar { namespace core {\r
        \r
 GLenum FORMAT[] = {0, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_BGR, GL_BGRA};\r
 GLenum INTERNAL_FORMAT[] = {0, GL_LUMINANCE8, GL_LUMINANCE8_ALPHA8, GL_RGB8, GL_RGBA8};        \r
index f05a06b78a0fafa89bc2e3fc214e65721fb3b246..c56644a8bd2a1e479766373d2f88c73cc9a9e949 100644 (file)
@@ -25,7 +25,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
        \r
 class device_buffer : boost::noncopyable\r
 {\r
index 996abbd1e5f84196a5a49cc9c0042837dd6c583b..d19e63fd5d1e3a1da6c2118b535fb24d142aea85 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include <common/gl/gl_check.h>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
                                                                                                                                                                                                                                                                                                                                \r
 struct host_buffer::implementation : boost::noncopyable\r
 {      \r
index 3d637b8f875d4dc786fd5cca5809d43a72b138e0..53371333e0e49ae95b28551e4c23a228f3ac476c 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include <memory>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
                \r
 class host_buffer : boost::noncopyable\r
 {\r
index b86485e0747ce7fa41c7d55299d8073902e5c55a..4a411a6097fc2bd1c4ae954e38c2826492eceafe 100644 (file)
 #include <common/utility/assert.h>\r
 #include <common/gl/gl_check.h>\r
 \r
-#include <Glee.h>\r
-#include <SFML/Window.hpp>\r
-\r
 #include <boost/foreach.hpp>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
 \r
 ogl_device::ogl_device() : executor_(L"ogl_device", true)\r
 {\r
index 47bc13894d6e73722af654950c5e734e6c65b804..8c37415048a7e6e4c66cb8095a490d07649f91a9 100644 (file)
@@ -32,9 +32,9 @@
 \r
 #include <array>\r
 \r
-#include <SFML/Window/Context.hpp>\r
+#include "../../dependencies\SFML-1.6\include\SFML/Window/Context.hpp"\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
 \r
 class ogl_device\r
 {      \r
index 560f5cde7f56322743e10504e2c184ec14382011..7fa19793ce12867a6db1022febf98af1b419f80c 100644 (file)
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/image_transform.h>\r
 \r
-#include <Glee.h>\r
-\r
 #include <boost/noncopyable.hpp>\r
 \r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
 \r
 class shader_program : boost::noncopyable\r
 {\r
@@ -62,7 +60,7 @@ public:
                        GL(glDeleteObjectARB(vertex_shader));\r
                        std::stringstream str;\r
                        str << "Failed to compile vertex shader:" << std::endl << info << std::endl;\r
-                       BOOST_THROW_EXCEPTION(gl::gl_error() << msg_info(str.str()));\r
+                       BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(str.str()));\r
                }\r
                        \r
                const char* fragment_source = fragment_source_str.c_str();\r
@@ -80,7 +78,7 @@ public:
                        GL(glDeleteObjectARB(fragmemt_shader));\r
                        std::stringstream str;\r
                        str << "Failed to compile fragment shader:" << std::endl << info << std::endl;\r
-                       BOOST_THROW_EXCEPTION(gl::gl_error() << msg_info(str.str()));\r
+                       BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(str.str()));\r
                }\r
                        \r
                program_ = glCreateProgramObjectARB();\r
@@ -101,7 +99,7 @@ public:
                        GL(glDeleteObjectARB(program_));\r
                        std::stringstream str;\r
                        str << "Failed to link shader program:" << std::endl << info << std::endl;\r
-                       BOOST_THROW_EXCEPTION(gl::gl_error() << msg_info(str.str()));\r
+                       BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(str.str()));\r
                }\r
                GL(glUseProgramObjectARB(program_));\r
                glUniform1i(glGetUniformLocation(program_, "plane[0]"), 0);\r
index 8eeaffb95a7af5cac2bb059c4e09c68090ee5b0e..e0a683d79b37960c031448c35538cf56feafda05 100644 (file)
@@ -24,7 +24,7 @@
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/image_transform.h>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
        \r
 class image_kernel\r
 {\r
index 92fa718923f072030595c89b9e33aa0693783a36..5a624d6ebb37335709c74bbd0a3eda3b87b19960 100644 (file)
@@ -25,7 +25,7 @@
 #include "../gpu/ogl_device.h"\r
 #include "../gpu/host_buffer.h"\r
 #include "../gpu/device_buffer.h"\r
-#include "../gpu/gpu_write_frame.h"\r
+#include "../write_frame.h"\r
 \r
 #include <common/concurrency/executor.h>\r
 #include <common/exception/exceptions.h>\r
 \r
 #include <boost/foreach.hpp>\r
 \r
-#include <Glee.h>\r
-#include <SFML/Window/Context.hpp>\r
-\r
 #include <array>\r
 #include <unordered_map>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
                \r
 struct image_mixer::implementation : boost::noncopyable\r
 {      \r
@@ -93,14 +90,10 @@ public:
        }\r
                \r
        void visit(core::write_frame& frame)\r
-       {               \r
-               auto gpu_frame = dynamic_cast<gpu_write_frame*>(&frame);\r
-               if(!gpu_frame)\r
-                       return;\r
-                               \r
-               auto desc               = gpu_frame->get_pixel_format_desc();\r
-               auto buffers    = gpu_frame->get_plane_buffers();\r
-               auto transform  = transform_stack_.top()*gpu_frame->get_image_transform();\r
+       {                                               \r
+               auto desc               = frame.get_pixel_format_desc();\r
+               auto buffers    = frame.get_plane_buffers();\r
+               auto transform  = transform_stack_.top()*frame.get_image_transform();\r
 \r
                ogl_device::begin_invoke([=]\r
                {\r
index cdedbef9dc5886a707e65374469e405fabaf6723..00b97e5135d4cb8ed03ffbc32657655b565b2267 100644 (file)
@@ -19,6 +19,8 @@
 */\r
 #pragma once\r
 \r
+#include "../write_frame.h"\r
+\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <core/video_format.h>\r
@@ -32,7 +34,7 @@
 \r
 #include <vector>\r
 \r
-namespace caspar { namespace mixer {\r
+namespace caspar { namespace core {\r
        \r
 class image_mixer : public core::frame_visitor, boost::noncopyable\r
 {\r
diff --git a/core/mixer/read_frame.cpp b/core/mixer/read_frame.cpp
new file mode 100644 (file)
index 0000000..02b31e5
--- /dev/null
@@ -0,0 +1,53 @@
+/*\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 "../stdafx.h"\r
+\r
+#include "read_frame.h"\r
+\r
+#include <common/gl/gl_check.h>\r
+\r
+namespace caspar { namespace core {\r
+                                                                                                                                                                                                                                                                                                                       \r
+struct read_frame::implementation : boost::noncopyable\r
+{\r
+       safe_ptr<const host_buffer> image_data_;\r
+       std::vector<short> audio_data_;\r
+\r
+public:\r
+       implementation(safe_ptr<const host_buffer>&& image_data, std::vector<short>&& audio_data) \r
+               : image_data_(std::move(image_data))\r
+               , audio_data_(std::move(audio_data)){}  \r
+};\r
+\r
+read_frame::read_frame(safe_ptr<const host_buffer>&& image_data, std::vector<short>&& audio_data) : impl_(new implementation(std::move(image_data), std::move(audio_data))){}\r
+\r
+const boost::iterator_range<const unsigned char*> read_frame::image_data() const\r
+{\r
+       if(!impl_->image_data_->data())\r
+               return boost::iterator_range<const unsigned char*>();\r
+       auto ptr = static_cast<const unsigned char*>(impl_->image_data_->data());\r
+       return boost::iterator_range<const unsigned char*>(ptr, ptr + impl_->image_data_->size());\r
+}\r
+const boost::iterator_range<const short*> read_frame::audio_data() const\r
+{\r
+       return boost::iterator_range<const short*>(impl_->audio_data_.data(), impl_->audio_data_.data() + impl_->audio_data_.size());\r
+}\r
+\r
+}}
\ No newline at end of file
diff --git a/core/mixer/read_frame.h b/core/mixer/read_frame.h
new file mode 100644 (file)
index 0000000..dee959d
--- /dev/null
@@ -0,0 +1,61 @@
+/*\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 "gpu/host_buffer.h"   \r
+\r
+#include <common/memory/safe_ptr.h>\r
+\r
+#include <boost/noncopyable.hpp>\r
+#include <boost/range/iterator_range.hpp>\r
+\r
+#include <memory>\r
+#include <vector>\r
+\r
+namespace caspar { namespace core {\r
+       \r
+class read_frame : boost::noncopyable\r
+{\r
+public:\r
+       read_frame(safe_ptr<const host_buffer>&& image_data, std::vector<short>&& audio_data);\r
+\r
+       virtual const boost::iterator_range<const unsigned char*> image_data() const;\r
+       virtual const boost::iterator_range<const short*> audio_data() const;\r
+       \r
+       static safe_ptr<const read_frame> empty()\r
+       {\r
+               struct empty : public read_frame\r
+               {                       \r
+                       virtual const boost::iterator_range<const unsigned char*> image_data() const {return boost::iterator_range<const unsigned char*>();}\r
+                       virtual const boost::iterator_range<const short*> audio_data() const {return boost::iterator_range<const short*>();}\r
+               };\r
+               static safe_ptr<const empty> frame;\r
+               return frame;\r
+       }\r
+\r
+protected:\r
+       read_frame(){}\r
+\r
+private:\r
+       struct implementation;\r
+       std::shared_ptr<implementation> impl_;\r
+};\r
+\r
+}}
\ No newline at end of file
diff --git a/core/mixer/write_frame.cpp b/core/mixer/write_frame.cpp
new file mode 100644 (file)
index 0000000..37b09a5
--- /dev/null
@@ -0,0 +1,85 @@
+/*\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 "../stdafx.h"\r
+\r
+#include "write_frame.h"\r
+\r
+#include <core/producer/frame/pixel_format.h>\r
+\r
+#include <common/gl/gl_check.h>\r
+\r
+#include <boost/range/algorithm.hpp>\r
+\r
+namespace caspar { namespace core {\r
+                                                                                                                                                                                                                                                                                                                       \r
+struct write_frame::implementation : boost::noncopyable\r
+{                              \r
+       std::vector<safe_ptr<host_buffer>> buffers_;\r
+       std::vector<short> audio_data_;\r
+       const core::pixel_format_desc desc_;\r
+       int tag_;\r
+\r
+public:\r
+       implementation(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) \r
+               : desc_(desc)\r
+               , buffers_(buffers)\r
+               , tag_(tag){}\r
+       \r
+       void accept(write_frame& self, core::frame_visitor& visitor)\r
+       {\r
+               visitor.begin(self);\r
+               visitor.visit(self);\r
+               visitor.end();\r
+       }\r
+\r
+       boost::iterator_range<unsigned char*> image_data(size_t index)\r
+       {\r
+               if(index >= buffers_.size() || !buffers_[index]->data())\r
+                       return boost::iterator_range<const unsigned char*>();\r
+               auto ptr = static_cast<unsigned char*>(buffers_[index]->data());\r
+               return boost::iterator_range<unsigned char*>(ptr, ptr+buffers_[index]->size());\r
+       }\r
+\r
+       const boost::iterator_range<const unsigned char*> image_data(size_t index) const\r
+       {\r
+               if(index >= buffers_.size() || !buffers_[index]->data())\r
+                       return boost::iterator_range<const unsigned char*>();\r
+               auto ptr = static_cast<const unsigned char*>(buffers_[index]->data());\r
+               return boost::iterator_range<const unsigned char*>(ptr, ptr+buffers_[index]->size());\r
+       }\r
+};\r
+       \r
+write_frame::write_frame(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers) : impl_(new implementation(tag, desc, buffers)){}\r
+void write_frame::accept(core::frame_visitor& visitor){impl_->accept(*this, visitor);}\r
+\r
+boost::iterator_range<unsigned char*> write_frame::image_data(size_t index){return impl_->image_data(index);}\r
+std::vector<short>& write_frame::audio_data() { return impl_->audio_data_; }\r
+const boost::iterator_range<const unsigned char*> write_frame::image_data(size_t index) const\r
+{\r
+       return boost::iterator_range<const unsigned char*>(impl_->image_data(index).begin(), impl_->image_data(index).end());\r
+}\r
+const boost::iterator_range<const short*> write_frame::audio_data() const\r
+{\r
+       return boost::iterator_range<const short*>(impl_->audio_data_.data(), impl_->audio_data_.data() + impl_->audio_data_.size());\r
+}\r
+int write_frame::tag() const {return impl_->tag_;}\r
+const core::pixel_format_desc& write_frame::get_pixel_format_desc() const{return impl_->desc_;}\r
+std::vector<safe_ptr<host_buffer>>& write_frame::get_plane_buffers(){return impl_->buffers_;}\r
+}}
\ No newline at end of file
diff --git a/core/mixer/write_frame.h b/core/mixer/write_frame.h
new file mode 100644 (file)
index 0000000..5412a0c
--- /dev/null
@@ -0,0 +1,65 @@
+/*\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 <common/memory/safe_ptr.h>\r
+#include <core/producer/frame/basic_frame.h>\r
+#include <core/producer/frame/frame_visitor.h>\r
+#include <core/producer/frame/pixel_format.h>\r
+\r
+#include "gpu/host_buffer.h"\r
+\r
+#include <boost/noncopyable.hpp>\r
+#include <boost/range/iterator_range.hpp>\r
+\r
+#include <memory>\r
+#include <vector>\r
+\r
+namespace caspar { namespace core {\r
+       \r
+class write_frame : public core::basic_frame, boost::noncopyable\r
+{\r
+public:        \r
+       explicit write_frame(int tag, const core::pixel_format_desc& desc, const std::vector<safe_ptr<host_buffer>>& buffers);\r
+                       \r
+       // core::write_frame\r
+       virtual boost::iterator_range<unsigned char*> image_data(size_t plane_index = 0);       \r
+       virtual std::vector<short>& audio_data();\r
+       \r
+       virtual const boost::iterator_range<const unsigned char*> image_data(size_t plane_index = 0) const;\r
+       virtual const boost::iterator_range<const short*> audio_data() const;\r
+\r
+       virtual void accept(core::frame_visitor& visitor);\r
+\r
+       virtual int tag() const;\r
+       \r
+private:\r
+       const core::pixel_format_desc& get_pixel_format_desc() const;\r
+       std::vector<safe_ptr<host_buffer>>& get_plane_buffers();\r
+\r
+       friend class image_mixer;\r
+\r
+       struct implementation;\r
+       std::shared_ptr<implementation> impl_;\r
+};\r
+typedef std::shared_ptr<write_frame> write_frame_impl_ptr;\r
+\r
+\r
+}}
\ No newline at end of file
index 1122a095e718842340600c81b29972aba2bcff9e..b99dda3b057617fe5d6abf4fdeaaa80a449d8132 100644 (file)
@@ -22,7 +22,7 @@
 #include "color_producer.h"\r
 \r
 #include "../frame/basic_frame.h"\r
-#include "../frame/write_frame.h"\r
+#include "../../mixer/write_frame.h"\r
 \r
 #include <sstream>\r
 \r
index d28ee3bb67f080896c37a8971ea675d7c3287074..51c551bf904af967c04b28232ff4b19e5bba30b1 100644 (file)
@@ -24,7 +24,7 @@
 #include "../util/util.h"\r
 #include "../util/memory.h"\r
 \r
-#include <core/consumer/frame/read_frame.h>\r
+#include <core/mixer/read_frame.h>\r
 \r
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
index 72d950cd41768e06579f52f3d4d8ebcfc920b560..42f92c6e48c3c2f28df8d707baf15d32f4ecad69 100644 (file)
@@ -26,7 +26,7 @@
 \r
 #include "../interop/DeckLinkAPI_h.h"\r
 \r
-#include <core/consumer/frame/read_frame.h>\r
+#include <core/mixer/read_frame.h>\r
 \r
 #include <common/concurrency/com_context.h>\r
 #include <common/diagnostics/graph.h>\r
index 5778702c127e213ca545d7cf11834fc2d6fa0530..1c790d5257917d16b24956143e488b3e7acd6ae1 100644 (file)
@@ -4,7 +4,7 @@
 \r
 \r
  /* File created by MIDL compiler version 7.00.0555 */\r
-/* at Sat May 07 17:24:25 2011\r
+/* at Wed May 18 01:57:28 2011\r
  */\r
 /* Compiler settings for interop\DeckLinkAPI.idl:\r
     Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
index 77ea1d9c657ecc690bf68a9b6b0279e439580442..9ae432a3a7b364fc25c050d911a724cd7b448f80 100644 (file)
@@ -6,7 +6,7 @@
 \r
 \r
  /* File created by MIDL compiler version 7.00.0555 */\r
-/* at Sat May 07 17:24:25 2011\r
+/* at Wed May 18 01:57:28 2011\r
  */\r
 /* Compiler settings for interop\DeckLinkAPI.idl:\r
     Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
index 12b71cdc485345fbfdae1359ae818ddb6a128294..b3d544f6a89fff48e7575ae5f7a0045c1a3752e3 100644 (file)
@@ -31,7 +31,7 @@
 #include <common/memory/memclr.h>\r
 \r
 #include <core/producer/frame/frame_factory.h>\r
-#include <core/producer/frame/write_frame.h>\r
+#include <core/mixer/write_frame.h>\r
 \r
 #include <tbb/concurrent_queue.h>\r
 #include <tbb/atomic.h>\r
index bdbda90edce275e113cb7af8750cc03af8b1b97f..954b0d0309ed18588957e4cc94bcc6aa1d428b10 100644 (file)
@@ -22,7 +22,7 @@
 \r
 #include "ffmpeg_consumer.h"\r
 \r
-#include <core/consumer/frame/read_frame.h>\r
+#include <core/mixer/read_frame.h>\r
 \r
 #include <common/concurrency/executor.h>\r
 #include <common/utility/string.h>\r
index 540ff12a73a7699a8d6594ce28047111e729bf00..9b65db85fa3cb6038491b38015da7231e871aa35 100644 (file)
@@ -29,7 +29,7 @@
 #include <common/diagnostics/graph.h>\r
 \r
 #include <core/producer/frame/basic_frame.h>\r
-#include <core/producer/frame/write_frame.h>\r
+#include <core/mixer/write_frame.h>\r
 #include <core/producer/frame/audio_transform.h>\r
 #include <core/video_format.h>\r
 \r
index 4650b0662ebbef91ad92d6f21fa07794987a0c2d..37ab59d629a829ae6f05857b7724858933ee4557 100644 (file)
@@ -26,7 +26,7 @@
 \r
 #include <core/video_format.h>\r
 #include <core/producer/frame/basic_frame.h>\r
-#include <core/producer/frame/write_frame.h>\r
+#include <core/mixer/write_frame.h>\r
 #include <core/producer/frame/image_transform.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/frame_factory.h>\r
index b7b98877f8f5cc9ca87af0e946f0ab93ade5e7a8..de7ffc78a5edadaf02dc17f63306290f229f1f14 100644 (file)
@@ -32,7 +32,7 @@
 \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
+#include <core/mixer/write_frame.h>\r
 \r
 #include <common/env.h>\r
 #include <common/concurrency/com_context.h>\r
index 456c399d86ce9f9c2c4a2b5d7980a4952e24227f..bd60fb66718e79ea5d87cebae58ce63daa632ed7 100644 (file)
@@ -24,7 +24,7 @@
 #include <core/video_format.h>\r
 \r
 #include <core/producer/frame/basic_frame.h>\r
-#include <core/producer/frame/write_frame.h>\r
+#include <core/mixer/write_frame.h>\r
 \r
 #include <common/env.h>\r
 \r
index 65f9668e25ccf3ddb66f449cd3fd4e03d996fcc4..285a48adf6b4837c34a6d52d1929eb620a3762ab 100644 (file)
@@ -26,7 +26,7 @@
 \r
 #include <core/video_format.h>\r
 \r
-#include <core/consumer/frame/read_frame.h>\r
+#include <core/mixer/read_frame.h>\r
 \r
 #include <SFML/Audio.hpp>\r
 \r
index f5cfa783794819b80930ddcbd6dd6d1d3df9c53e..a5ad15a6f47a862bd5117a413b65bb3b7320e036 100644 (file)
@@ -27,7 +27,7 @@
 #include "ogl_consumer.h"\r
 \r
 #include <core/video_format.h>\r
-#include <core/consumer/frame/read_frame.h>\r
+#include <core/mixer/read_frame.h>\r
 \r
 #include <common/gl/gl_check.h>\r
 #include <common/concurrency/executor.h>\r
index cef09fd3fb9d498e03a73d680d5f8057a7c32553..b3c5bd50755c4455267ff7a6ff8064d45419b37a 100644 (file)
@@ -31,7 +31,7 @@
 \r
 #include <core/video_format.h>\r
 \r
-#include <core/producer/frame/write_frame.h>\r
+#include <core/mixer/write_frame.h>\r
 #include <core/producer/frame/frame_factory.h>\r
 \r
 #include <common/concurrency/executor.h>\r
index d57491835698090d76b050dfcba89ad2b998fad3..3f37c628865cf7cec4d5c4922db6b412c0dd5186 100644 (file)
@@ -5,14 +5,14 @@
     <log-path>L:\\Casparcg\\_log\\</log-path>\r
     <data-path>L:\\Casparcg\\_data\\</data-path>\r
     <template-path>L:\\Casparcg\\_templates\\</template-path>\r
-    <template-host>1080 59i.fth</template-host>\r
+    <template-host>cg.fth.18</template-host>\r
   </paths>\r
   <diagnostics>\r
     <graphs>true</graphs>\r
   </diagnostics>\r
   <channels>\r
     <channel>\r
-      <videomode>NTSC</videomode>\r
+      <videomode>PAL</videomode>\r
       <consumers>\r
         <decklink>\r
           <device>1</device>\r
index 9923160a9c5ad705aaa73f9129f991cf54e02588..63c58c07483291df41563db3a46b1c015c8eeccb 100644 (file)
@@ -112,7 +112,7 @@ void print_info()
        CASPAR_LOG(info) << L"FFMPEG-avcodec "  << caspar::get_avcodec_version();\r
        CASPAR_LOG(info) << L"FFMPEG-swscale "  << caspar::get_avformat_version();\r
        CASPAR_LOG(info) << L"FFMPEG-avformat " << caspar::get_swscale_version();\r
-       CASPAR_LOG(info) << L"OpenGL " << caspar::mixer::ogl_device::get_version() << "\n\n";\r
+       CASPAR_LOG(info) << L"OpenGL " << caspar::core::ogl_device::get_version() << "\n\n";\r
 }\r
  \r
 int main(int argc, wchar_t* argv[])\r