]> git.sesse.net Git - casparcg/commitdiff
ยค412
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 6 Apr 2011 18:19:11 +0000 (18:19 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 6 Apr 2011 18:19:11 +0000 (18:19 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@607 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

37 files changed:
common/common.vcxproj
common/common.vcxproj.filters
common/compiler/vs/disable_silly_warnings.h
common/env.cpp
common/object.h [new file with mode: 0644]
common/utility/string.cpp [new file with mode: 0644]
common/utility/string.h
core/core.vcxproj
core/producer/color/color_producer.cpp
core/producer/frame_producer.h
core/producer/frame_producer_device.cpp
core/producer/layer.cpp
core/producer/layer.h
core/producer/transition/transition_producer.cpp
core/producer/transition/transition_producer.h
mixer/mixer.vcxproj
modules/bluefish/bluefish.vcxproj
modules/decklink/decklink.vcxproj
modules/decklink/producer/decklink_producer.cpp
modules/ffmpeg/ffmpeg.vcxproj
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/flash/flash.vcxproj
modules/flash/producer/cg_producer.cpp
modules/flash/producer/cg_producer.h
modules/flash/producer/flash_producer.cpp
modules/flash/producer/flash_producer.h
modules/image/image.vcxproj
modules/image/producer/image_producer.cpp
modules/oal/oal.vcxproj
modules/ogl/ogl.vcxproj
modules/silverlight/producer/silverlight_producer.cpp
modules/silverlight/silverlight.vcxproj
protocol/amcp/AMCPCommandsImpl.cpp
protocol/cii/CIIProtocolStrategy.cpp
protocol/protocol.vcxproj
shell/main.cpp
shell/shell.vcxproj

index 5710dde859ebf033bd97a6dedc70b373a4041fb4..29d7af30e3f08da8b3ef7ef8abc33fbd52371660 100644 (file)
     <IncludePath>..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <LibraryPath>..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\;$(LibraryPath)</LibraryPath>\r
     <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
-    <IntDir>$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <IncludePath>..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <LibraryPath>..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\;$(LibraryPath)</LibraryPath>\r
     <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
-    <IntDir>$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">\r
     <IncludePath>..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <LibraryPath>..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\;$(LibraryPath)</LibraryPath>\r
     <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
-    <IntDir>$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">\r
     <IncludePath>..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <LibraryPath>..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\;$(LibraryPath)</LibraryPath>\r
     <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
-    <IntDir>$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
     <ClInclude Include="memory\page_locked_allocator.h" />\r
     <ClInclude Include="memory\safe_ptr.h" />\r
     <ClInclude Include="env.h" />\r
-    <ClInclude Include="printable.h" />\r
+    <ClInclude Include="object.h" />\r
     <ClInclude Include="stdafx.h" />\r
     <ClInclude Include="utility\assert.h" />\r
     <ClInclude Include="utility\printer.h" />\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Create</PrecompiledHeader>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">Create</PrecompiledHeader>\r
     </ClCompile>\r
+    <ClCompile Include="utility\string.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
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 74df585ac905760e3a5140b49a3674ae89491dff..8a523dabbebc6e93bda3e3b9d8e0d67542c3ef7d 100644 (file)
@@ -41,6 +41,9 @@
     </ClCompile>\r
     <ClCompile Include="env.cpp" />\r
     <ClCompile Include="stdafx.cpp" />\r
+    <ClCompile Include="utility\string.cpp">\r
+      <Filter>utility</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="exception\exceptions.h">\r
@@ -87,6 +90,6 @@
     <ClInclude Include="utility\tweener.h">\r
       <Filter>utility</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="printable.h" />\r
+    <ClInclude Include="object.h" />\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 41807dcb98d19539850bd33d47eb3d63338cfcee..a0636847602969d2ae92f66e6334c654aefe7435 100644 (file)
@@ -4,6 +4,7 @@
 #pragma warning (disable : 4100) // unreferenced formal parameter\r
 #pragma warning (disable : 4127) // conditional expression is constant\r
 #pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored\r
+#pragma warning (disable : 4355) // 'this' : used in base member initializer list\r
 #pragma warning (disable : 4482) // nonstandard extension used: enum 'enum' used in qualified name\r
 #pragma warning (disable : 4503) // decorated name length exceeded, name was truncated\r
 #pragma warning (disable : 4512) // assignment operator could not be generated\r
index 923e4669b9237a07221f2c1fc3b36a7e6b73e432..ecefb0b7182b7d23c55c65f917f5e8aec1280e09 100644 (file)
@@ -33,7 +33,7 @@ void env::initialize(const std::string& filename)
        media = widen(paths.get("media-path", initialPath + "\\media\\"));\r
        log = widen(paths.get("log-path", initialPath + "\\log\\"));\r
        ftemplate = widen(paths.get("template-path", initialPath + "\\template\\"));\r
-       ftemplate_host = ftemplate + L"\\" + widen(paths.get("template-host", "cg.fth"));\r
+       ftemplate_host = widen(paths.get("template-host", "cg.fth"));\r
        data = widen(paths.get("data-path", initialPath + "\\data\\"));\r
 }\r
        \r
diff --git a/common/object.h b/common/object.h
new file mode 100644 (file)
index 0000000..37d24ce
--- /dev/null
@@ -0,0 +1,65 @@
+#pragma once\r
+\r
+#include <string>\r
+\r
+#include <tbb/spin_mutex.h>\r
+\r
+namespace caspar {\r
+\r
+//class object\r
+//{\r
+//     mutable tbb::spin_mutex mutex_;\r
+//     const object* parent_;\r
+//public:\r
+//     object(const object* parent = nullptr){set_parent(parent);}\r
+//\r
+//     std::wstring print() const\r
+//     {\r
+//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
+//             return (parent_ ? parent_->print() + L"/" : L"") + do_print();\r
+//     }\r
+//             \r
+//     const object* get_parent() const\r
+//     {\r
+//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
+//             return parent_;\r
+//     }\r
+//\r
+//     void set_parent(const object* parent)\r
+//     {\r
+//             tbb::spin_mutex::scoped_lock lock(mutex_);\r
+//             parent_ = parent != this ? parent : nullptr;\r
+//     }\r
+//\r
+//private:\r
+//\r
+//     virtual std::wstring do_print() const = 0;\r
+//};\r
+\r
+class object\r
+{\r
+       mutable tbb::spin_mutex mutex_;\r
+       const object* parent_;\r
+public:\r
+       object(const object* parent = nullptr){set_parent(parent);}\r
+\r
+       virtual std::wstring print() const\r
+       {\r
+               tbb::spin_mutex::scoped_lock lock(mutex_);\r
+               return (parent_ ? parent_->print() + L"/" : L"");\r
+       }\r
+               \r
+       const object* get_parent() const\r
+       {\r
+               tbb::spin_mutex::scoped_lock lock(mutex_);\r
+               return parent_;\r
+       }\r
+\r
+       void set_parent(const object* parent)\r
+       {\r
+               tbb::spin_mutex::scoped_lock lock(mutex_);\r
+               parent_ = parent != this ? parent : nullptr;\r
+       }\r
+};\r
+\r
+}
\ No newline at end of file
diff --git a/common/utility/string.cpp b/common/utility/string.cpp
new file mode 100644 (file)
index 0000000..ce68c18
--- /dev/null
@@ -0,0 +1,25 @@
+#include "../stdafx.h"\r
+\r
+namespace caspar {\r
+       \r
+std::wstring widen(const std::string& str)\r
+{\r
+       return std::wstring(str.begin(), str.end());\r
+}\r
+\r
+std::wstring widen(const std::wstring& str)\r
+{\r
+       return str;\r
+}\r
+          \r
+std::string narrow(const std::wstring& str)\r
+{\r
+       return std::string(str.begin(), str.end());\r
+}\r
+          \r
+std::string narrow(const std::string& str)\r
+{\r
+       return str ;\r
+}\r
+\r
+}
\ No newline at end of file
index a4a750429ee0f0c93e13d7c3df632db244ee33ca..f7ca71a1f853e1c5aadfe6f15b6d18c35d0416b8 100644 (file)
@@ -1,68 +1,14 @@
 #pragma once\r
 \r
-#include <locale>\r
-#include <iostream>\r
 #include <string>\r
-#include <sstream>\r
 #include <boost/lexical_cast.hpp>\r
           \r
 namespace caspar {\r
 \r
-inline std::wstring widen(const std::string& str, const std::locale& locale = std::locale())\r
-{\r
-       std::wstringstream wsstr ;\r
-       wsstr.imbue(locale);\r
-       const std::ctype<wchar_t>& ctfacet = std::use_facet<std::ctype<wchar_t>>(wsstr.getloc()) ;\r
-       for(size_t i = 0 ;i < str.size(); ++i)\r
-               wsstr << ctfacet.widen(str[i]) ;\r
-       return wsstr.str() ;\r
-}\r
-\r
-inline std::wstring widen(const std::wstring& str, const std::locale&)\r
-{\r
-       return str;\r
-}\r
-\r
-#if defined(_MSC_VER)\r
-#pragma warning(push)\r
-#pragma warning(disable : 4244)\r
-#endif\r
-          \r
-inline std::string narrow(const std::wstring& str, const std::locale& locale = std::locale())\r
-{\r
-       std::stringstream sstr;\r
-       sstr.imbue(locale);\r
-       const std::ctype<char>& ctfacet = std::use_facet<std::ctype<char>>(sstr.getloc());\r
-       for(size_t i = 0; i < str.size(); ++i)\r
-               sstr << ctfacet.narrow(str[i], 0) ;\r
-       return sstr.str() ;\r
-}\r
-          \r
-inline std::string narrow(const std::string& str, const std::locale&)\r
-{\r
-       return str ;\r
-}\r
-\r
-#if defined(_MSC_VER)\r
-#pragma warning(pop)\r
-#endif\r
-//\r
-//inline std::string narrow_to_latin1(const std::wstring& wideString)\r
-//{\r
-//     std::string destBuffer;\r
-//     //28591 = ISO 8859-1 Latin I\r
-//     int bytesWritten = 0;\r
-//     int multibyteBufferCapacity = WideCharToMultiByte(28591, 0, wideString.c_str(), -1, 0, 0, \r
-//                                                                                                        nullptr, nullptr);\r
-//     if(multibyteBufferCapacity > 0) \r
-//     {\r
-//             destBuffer.resize(multibyteBufferCapacity);\r
-//             bytesWritten = WideCharToMultiByte(28591, 0, wideString.c_str(), -1, &destBuffer[0], \r
-//                                                                                     destBuffer.size(), nullptr, nullptr);\r
-//     }\r
-//     destBuffer.resize(bytesWritten);\r
-//     return destBuffer;\r
-//}\r
+std::wstring widen(const std::string& str);\r
+std::wstring widen(const std::wstring& str);\r
+std::string narrow(const std::wstring& str);      \r
+std::string narrow(const std::string& str);\r
 \r
 template <typename T>\r
 inline T lexical_cast_or_default(const std::wstring str, T fail_value = T())\r
index 6cf3dd76c68866dbd9e9e8859704c9442eb1c222..6ea3fb986263168442296789ee1aed2d18a9446c 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\;..\dependencies\boost_1_44_0\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\;..\dependencies\boost_1_44_0\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\;..\dependencies\boost_1_44_0\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 9d49dc15ce9883ca3c93448d3fafc98769ef84ac..dca22ba787cc305996a723037c780ef22ab3fa0b 100644 (file)
@@ -32,7 +32,6 @@ class color_producer : public frame_producer
 {\r
        safe_ptr<basic_frame> frame_;\r
        std::wstring color_str_;\r
-       printer parent_printer_;\r
 \r
 public:\r
 \r
@@ -44,7 +43,7 @@ public:
                        BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << arg_value_info(narrow(color)) << msg_info("Invalid color code"));\r
        }\r
 \r
-       virtual void initialize(const safe_ptr<frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<frame_factory>& frame_factory)\r
        {\r
                auto frame = frame_factory->create_frame(1, 1, pixel_format::bgra);\r
                auto& value = *reinterpret_cast<unsigned long*>(frame->image_data().begin());\r
@@ -52,12 +51,10 @@ public:
                str >> std::hex >> value;       \r
                frame_ = std::move(frame);\r
        }\r
-\r
-       virtual void set_parent_printer(const printer& parent_printer){parent_printer_ = parent_printer;}\r
-       \r
+               \r
        virtual safe_ptr<basic_frame> receive() { return frame_; }\r
        \r
-       virtual std::wstring print() const { return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"color[" + color_str_ + L"]"; }\r
+       virtual std::wstring print() const { return frame_producer::print() + L"color[" + color_str_ + L"]"; }\r
 };\r
 \r
 safe_ptr<frame_producer> create_color_producer(const std::vector<std::wstring>& params)\r
index 4942c6f96d20d09f0e4e62370ef3a55ff2f54ea4..8dbac788289d68384dc22b80ca40ae658b53556f 100644 (file)
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printer.h>\r
+#include <common/object.h>\r
 \r
 #include "../producer/frame/basic_frame.h"\r
 #include "../producer/frame/frame_factory.h"\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
-#include <string>\r
+#include <functional>\r
 #include <ostream>\r
+#include <string>\r
 \r
 namespace caspar { namespace core {\r
 \r
-class frame_producer : boost::noncopyable\r
+class frame_producer : public object, boost::noncopyable\r
 {\r
 public:\r
        virtual ~frame_producer(){}     \r
@@ -67,30 +68,28 @@ public:
        virtual void set_leading_producer(const safe_ptr<frame_producer>& /*producer*/) {}  // nothrow\r
        \r
        ////////////////////////////////////////////////////////////////////////////////////////////////////\r
-       /// \fn virtual void :::initialize(const safe_ptr<frame_factory>& frame_factory) = 0;\r
+       /// \fn virtual void :::set_frame_factory(const safe_ptr<frame_factory>& frame_factory) = 0;\r
        ///\r
-       /// \brief      Provides the frame frame_factory used to create frames and initializes the producer\r
+       /// \brief      Sets the frame frame_factory used to create frames\r
        ///\r
        /// \param      frame_factory   The frame frame_factory. \r
        ////////////////////////////////////////////////////////////////////////////////////////////////////\r
-       virtual void initialize(const safe_ptr<frame_factory>& frame_factory) = 0;\r
-\r
-       virtual void set_parent_printer(const printer& parent_printer) = 0;\r
+       virtual void set_frame_factory(const safe_ptr<frame_factory>& frame_factory) = 0;\r
 \r
+       virtual void param(const std::wstring&){}\r
+       \r
        static const safe_ptr<frame_producer>& empty()  // nothrow\r
        {\r
                struct empty_frame_producer : public frame_producer\r
                {\r
                        virtual safe_ptr<basic_frame> receive(){return basic_frame::empty();}\r
-                       virtual void initialize(const safe_ptr<frame_factory>&){}\r
+                       virtual void set_frame_factory(const safe_ptr<frame_factory>&){}\r
+                       virtual void set_parent(const object* parent) {}\r
                        virtual std::wstring print() const { return L"empty";}\r
-                       virtual void set_parent_printer(const printer& parent_printer) {}\r
                };\r
                static safe_ptr<frame_producer> producer = make_safe<empty_frame_producer>();\r
                return producer;\r
        }\r
-\r
-       virtual std::wstring print() const = 0; // nothrow\r
 };\r
 \r
 inline std::wostream& operator<<(std::wostream& out, const frame_producer& producer)\r
index 66a13fc682bb7946c003c1a5230cd9e96cd11690..34640f21d7bc66bfe88d7aad3884ff9da89511d3 100644 (file)
@@ -22,7 +22,7 @@
 \r
 namespace caspar { namespace core {\r
 \r
-struct frame_producer_device::implementation : boost::noncopyable\r
+struct frame_producer_device::implementation : public object, boost::noncopyable\r
 {              \r
        const printer parent_printer_;\r
 \r
@@ -70,7 +70,7 @@ public:
        {\r
                auto it = layers_.find(index);\r
                if(it == layers_.end())\r
-                       it = layers_.insert(std::make_pair(index, layer(index, std::bind(&implementation::print, this)))).first;\r
+                       it = layers_.insert(std::make_pair(index, layer(this, index))).first;\r
                return it->second;\r
        }\r
        \r
@@ -93,8 +93,7 @@ public:
 \r
        void load(int index, const safe_ptr<frame_producer>& producer, bool play_on_load, bool preview)\r
        {\r
-               producer->set_parent_printer(std::bind(&layer::print, &get_layer(index)));\r
-               producer->initialize(factory_);\r
+               producer->set_frame_factory(factory_);\r
                executor_.invoke([&]{get_layer(index).load(producer, play_on_load, preview);});\r
        }\r
 \r
index 1f30234320af91da7b17893c9aa7b90c01bcab98..44c1d928a869fd0fd59d1fbf536cbf6de555ece3 100644 (file)
@@ -43,7 +43,7 @@ public:
 \r
 frame_producer_remover g_remover;\r
 \r
-struct layer::implementation : boost::noncopyable\r
+struct layer::implementation : public object, boost::noncopyable\r
 {                              \r
        mutable tbb::spin_mutex         printer_mutex_;\r
        printer                                         parent_printer_;\r
@@ -54,8 +54,8 @@ struct layer::implementation : boost::noncopyable
        safe_ptr<basic_frame>           last_frame_;\r
        bool                                            is_paused_;\r
 public:\r
-       implementation(int index, const printer& parent_printer\r
-               : parent_printer_(parent_printer)\r
+       implementation(const object* parent, int index\r
+               : object(parent)\r
                , index_(index)\r
                , foreground_(frame_producer::empty())\r
                , background_(frame_producer::empty())\r
@@ -64,6 +64,7 @@ public:
        \r
        void load(const safe_ptr<frame_producer>& frame_producer, bool play_on_load, bool preview)\r
        {               \r
+               frame_producer->set_parent(this);\r
                background_ = frame_producer;\r
                is_paused_ = false;\r
 \r
@@ -119,7 +120,7 @@ public:
 \r
                                auto following = foreground_->get_following_producer();\r
                                following->set_leading_producer(foreground_);\r
-                               following->set_parent_printer([=]{return print();});\r
+                               following->set_parent(this);\r
                                g_remover.remove(std::move(foreground_));\r
                                foreground_ = following;\r
                                CASPAR_LOG(info) << foreground_->print() << L" Added.";\r
@@ -140,11 +141,11 @@ public:
        std::wstring print() const\r
        {\r
                tbb::spin_mutex::scoped_lock lock(printer_mutex_); // Child-producers may call print asynchronously to the producer thread.\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"layer[" + boost::lexical_cast<std::wstring>(index_) + L"]";\r
+               return object::print() + L"layer[" + boost::lexical_cast<std::wstring>(index_) + L"]";\r
        }\r
 };\r
 \r
-layer::layer(int index, const printer& parent_printer) : impl_(new implementation(index, parent_printer)){}\r
+layer::layer(const object* parent, int index) : impl_(new implementation(parent, index)){}\r
 layer::layer(layer&& other) : impl_(std::move(other.impl_)){}\r
 layer& layer::operator=(layer&& other)\r
 {\r
index 6b3635db2fba6b12ff77024a40a2acc5712f17de..12b3630c88a936411b9db35b774d4f720f4a9149 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once\r
 \r
+#include <common/object.h>\r
 #include <common/memory/safe_ptr.h>\r
 #include <common/utility/printer.h>\r
 \r
@@ -16,7 +17,7 @@ class basic_frame;
 class layer : boost::noncopyable\r
 {\r
 public:\r
-       layer(int index = std::numeric_limits<int>::min(), const printer& parent_printer = nullptr); // nothrow\r
+       explicit layer(const object* parent = nullptr, int index = std::numeric_limits<int>::min()); // nothrow\r
        layer(layer&& other); // nothrow\r
        layer& operator=(layer&& other); // nothrow\r
 \r
index 489c68652187450f1516efeecd77d094ea9c1c64..89b39c57df41f7f8ebc02432c147ec9e635ab19a 100644 (file)
@@ -31,7 +31,7 @@ namespace caspar { namespace core {
 \r
 struct transition_producer::implementation : boost::noncopyable\r
 {      \r
-       printer parent_printer_;\r
+       const transition_producer* self_;\r
        unsigned short                          current_frame_;\r
        \r
        const transition_info           info_;\r
@@ -40,32 +40,26 @@ struct transition_producer::implementation : boost::noncopyable
        safe_ptr<frame_producer>        source_producer_;\r
 \r
        std::shared_ptr<frame_factory>  frame_factory_;\r
-       video_format_desc                               format_desc_;\r
 \r
        std::vector<safe_ptr<basic_frame>> frame_buffer_;\r
        \r
-       implementation(const safe_ptr<frame_producer>& dest, const transition_info& info) \r
-               : current_frame_(0)\r
+       implementation(const transition_producer* self, const safe_ptr<frame_producer>& dest, const transition_info& info) \r
+               : self_(self)\r
+               , current_frame_(0)\r
                , info_(info)\r
                , dest_producer_(dest)\r
                , source_producer_(frame_producer::empty())\r
        {\r
-               dest_producer_->set_parent_printer(std::bind(&implementation::dest_print, this));\r
+               dest_producer_->set_parent(self_);\r
                frame_buffer_.push_back(basic_frame::empty());\r
        }\r
                                \r
-       void initialize(const safe_ptr<frame_factory>& frame_factory)\r
+       void set_frame_factory(const safe_ptr<frame_factory>& frame_factory)\r
        {\r
-               dest_producer_->initialize(frame_factory);\r
+               dest_producer_->set_frame_factory(frame_factory);\r
                frame_factory_ = frame_factory;\r
-               format_desc_ = frame_factory_->get_video_format_desc();\r
        }\r
-\r
-       virtual void set_parent_printer(const printer& parent_printer) \r
-       {\r
-               parent_printer_ = parent_printer;\r
-       }\r
-\r
+       \r
        safe_ptr<frame_producer> get_following_producer() const\r
        {\r
                return dest_producer_;\r
@@ -74,7 +68,7 @@ struct transition_producer::implementation : boost::noncopyable
        void set_leading_producer(const safe_ptr<frame_producer>& producer)\r
        {\r
                source_producer_ = producer;\r
-               source_producer_->set_parent_printer(std::bind(&implementation::source_print, this));\r
+               source_producer_->set_parent(self_);\r
        }\r
 \r
        safe_ptr<basic_frame> receive()\r
@@ -108,7 +102,7 @@ struct transition_producer::implementation : boost::noncopyable
                {\r
                        CASPAR_LOG_CURRENT_EXCEPTION();\r
                        producer = frame_producer::empty();\r
-                       CASPAR_LOG(warning) << print() << " Failed to receive frame. Removed producer from transition.";\r
+                       CASPAR_LOG(warning) << self_->print() << " Failed to receive frame. Removed producer from transition.";\r
                }\r
 \r
                if(frame == basic_frame::eof())\r
@@ -116,15 +110,16 @@ struct transition_producer::implementation : boost::noncopyable
                        try\r
                        {\r
                                auto following = producer->get_following_producer();\r
-                               following->initialize(safe_ptr<frame_factory>(frame_factory_));\r
+                               following->set_frame_factory(safe_ptr<frame_factory>(frame_factory_));\r
                                following->set_leading_producer(producer);\r
+                               following->set_parent(self_);\r
                                producer = std::move(following);\r
                        }\r
                        catch(...)\r
                        {\r
                                CASPAR_LOG_CURRENT_EXCEPTION();\r
                                producer = frame_producer::empty();\r
-                               CASPAR_LOG(warning) << print() << " Failed to initialize following producer.";\r
+                               CASPAR_LOG(warning) << self_->print() << " Failed to initialize following producer.";\r
                        }\r
 \r
                        return render_sub_frame(producer);\r
@@ -183,29 +178,29 @@ struct transition_producer::implementation : boost::noncopyable
                        d_frame2->get_image_transform().set_key_scale(delta2, 1.0);                     \r
                }\r
                \r
-               auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, format_desc_.mode);\r
-               auto d_frame = basic_frame::interlace(d_frame1, d_frame2, format_desc_.mode);\r
+               auto mode = frame_factory_->get_video_format_desc().mode;\r
+               auto s_frame = s_frame1->get_image_transform() == s_frame2->get_image_transform() ? s_frame2 : basic_frame::interlace(s_frame1, s_frame2, mode);\r
+               auto d_frame = basic_frame::interlace(d_frame1, d_frame2, mode);\r
 \r
                return basic_frame(s_frame, d_frame);\r
        }\r
 \r
-       std::wstring print() const\r
+       virtual std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"transition[" + info_.name() + L":" + boost::lexical_cast<std::wstring>(info_.duration) + L"]";\r
+               return L"transition[" + info_.name() + L":" + boost::lexical_cast<std::wstring>(info_.duration) + L"]";\r
        }\r
 \r
        std::wstring source_print() const { return print() + L"/source";}\r
        std::wstring dest_print() const { return print() + L"/dest";}\r
 };\r
 \r
+transition_producer::transition_producer(const safe_ptr<frame_producer>& dest, const transition_info& info) : impl_(new implementation(this, dest, info)){}\r
 transition_producer::transition_producer(transition_producer&& other) : impl_(std::move(other.impl_)){}\r
-transition_producer::transition_producer(const safe_ptr<frame_producer>& dest, const transition_info& info) : impl_(new implementation(dest, info)){}\r
 safe_ptr<basic_frame> transition_producer::receive(){return impl_->receive();}\r
 safe_ptr<frame_producer> transition_producer::get_following_producer() const{return impl_->get_following_producer();}\r
 void transition_producer::set_leading_producer(const safe_ptr<frame_producer>& producer) { impl_->set_leading_producer(producer); }\r
-void transition_producer::initialize(const safe_ptr<frame_factory>& frame_factory) { impl_->initialize(frame_factory);}\r
-void transition_producer::set_parent_printer(const printer& parent_printer) {impl_->set_parent_printer(parent_printer);}\r
-std::wstring transition_producer::print() const { return impl_->print();}\r
+void transition_producer::set_frame_factory(const safe_ptr<frame_factory>& frame_factory) { impl_->set_frame_factory(frame_factory);}\r
+std::wstring transition_producer::print() const { return frame_producer::print();}// + impl_->print();}\r
 \r
 }}\r
 \r
index 8c1cf5fbe31c6ccd4f04406f472adcca5185d038..2b6819ab68551cd8fc61c80165d07119a3402fdc 100644 (file)
@@ -86,9 +86,10 @@ public:
        virtual safe_ptr<basic_frame> receive();\r
 \r
        virtual safe_ptr<frame_producer> get_following_producer() const;\r
+\r
        virtual void set_leading_producer(const safe_ptr<frame_producer>& producer);\r
-       virtual void initialize(const safe_ptr<frame_factory>& frame_factory);\r
-       virtual void set_parent_printer(const printer& parent_printer);\r
+       virtual void set_frame_factory(const safe_ptr<frame_factory>& frame_factory);\r
+\r
        virtual std::wstring print() const;\r
 private:\r
        struct implementation;\r
index d516b113042ec70ab5390a712c03b46371b5f038..fc7115707e2785dc3a36b305aeeecfbcc63886e0 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\;..\common;..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\;..\common;..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\;..\common;..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 151b084d7e900dbc9faf7d5f231931d165087d43..a562e8af307900833b6d46a9b3936ce87f97ea92 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\common;..\..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\common;..\..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\common;..\..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 5a7af2653a108cd53581b83a06b15ed04b8d6418..febe37dd9f856846b2e20bbcc02151c76f8e754f 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 9e3cf4888b7b4df320e36fd4892fd02596c95379..0f3111688112981a4e96946a9693b9dea6cbe468 100644 (file)
@@ -59,7 +59,7 @@ class decklink_input : public IDeckLinkInputCallback
                ~co_init(){CoUninitialize();}\r
        } co_;\r
 \r
-       printer parent_printer_;\r
+       const object* parent_;\r
        const core::video_format_desc format_desc_;\r
        std::wstring model_name_;\r
        const size_t device_index_;\r
@@ -79,11 +79,11 @@ class decklink_input : public IDeckLinkInputCallback
        safe_ptr<core::basic_frame> tail_;\r
 \r
 public:\r
-       decklink_input(const core::video_format_desc& format_desc, size_t device_index, const std::shared_ptr<core::frame_factory>& frame_factory, const printer& parent_printer)\r
-               : parent_printer_(parent_printer)\r
+       decklink_input(const object* parent, const core::video_format_desc& format_desc, size_t device_index, const std::shared_ptr<core::frame_factory>& frame_factory)\r
+               : parent_(parent)\r
                , format_desc_(format_desc)\r
                , device_index_(device_index)\r
-               , model_name_(L"DECKLINK")\r
+               , model_name_(L"decklink")\r
                , frame_factory_(frame_factory)\r
                , tail_(core::basic_frame::empty())\r
        {\r
@@ -238,14 +238,13 @@ public:
 \r
        std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L" [" + model_name_ + L"device:" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+               return static_cast<const core::frame_producer*>(parent_)->print() + L" [" + model_name_ + L"device:" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
        }\r
 };\r
        \r
 class decklink_producer : public core::frame_producer\r
 {      \r
        const size_t device_index_;\r
-       printer parent_printer_;\r
 \r
        std::unique_ptr<decklink_input> input_;\r
        \r
@@ -257,7 +256,7 @@ public:
        explicit decklink_producer(const core::video_format_desc& format_desc, size_t device_index)\r
                : format_desc_(format_desc) \r
                , device_index_(device_index)\r
-               , executor_(print()){}\r
+               , executor_(L"decklink_producer"){}\r
 \r
        ~decklink_producer()\r
        {       \r
@@ -267,17 +266,15 @@ public:
                });\r
        }\r
 \r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                executor_.start();\r
                executor_.invoke([=]\r
                {\r
-                       input_.reset(new decklink_input(format_desc_, device_index_, frame_factory, parent_printer_));\r
+                       input_.reset(new decklink_input(this, format_desc_, device_index_, frame_factory));\r
                });\r
        }\r
-\r
-       virtual void set_parent_printer(const printer& parent_printer) { parent_printer_ = parent_printer;}\r
-       \r
+               \r
        virtual safe_ptr<core::basic_frame> receive()\r
        {\r
                return input_->get_frame();\r
@@ -285,7 +282,7 @@ public:
        \r
        std::wstring print() const\r
        {\r
-               return  (parent_printer_ ? parent_printer_() + L"/" : L"") + (input_ ? input_->print() : L"Unknown Decklink [input-" + boost::lexical_cast<std::wstring>(device_index_) + L"]");\r
+               return (input_ ? input_->print() : L"Unknown Decklink [input-" + boost::lexical_cast<std::wstring>(device_index_) + L"]");\r
        }\r
 };\r
 \r
index 783e74f64b38f1213aca3b50371192c571d4938b..2dd810910848d7f3c4f04943e1d30a14b6cb85e7 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 419a9d29dca752781dfbb576a78e2fbaa2642221..0e9fd6d005d6e8482dccbd99799a745f8f489199 100644 (file)
@@ -29,7 +29,6 @@ struct ffmpeg_producer : public core::frame_producer
 {\r
        const std::wstring                                      filename_;\r
        const bool                                                      loop_;\r
-       printer                                                         parent_printer_;\r
        \r
        std::shared_ptr<diagnostics::graph>     graph_;\r
        timer                                                           perf_timer_;\r
@@ -58,7 +57,7 @@ public:
                graph_->set_color("frame-time",  diagnostics::color(1.0f, 0.0f, 0.0f));\r
        }\r
        \r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                frame_factory_ = frame_factory;\r
                input_.reset(new input(safe_ptr<diagnostics::graph>(graph_), filename_, loop_, std::bind(&ffmpeg_producer::print, this)));\r
@@ -72,11 +71,6 @@ public:
 \r
        }\r
                \r
-       virtual void set_parent_printer(const printer& parent_printer) \r
-       {\r
-               parent_printer_ = parent_printer;\r
-       }\r
-\r
        virtual safe_ptr<core::basic_frame> receive()\r
        {\r
                perf_timer_.reset();\r
@@ -186,7 +180,7 @@ public:
 \r
        virtual std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
+               return frame_producer::print() + L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
        }\r
 };\r
 \r
index c1ff49c866c28b129428d80cba8bf6711c7f91f0..eafa30d9bf9f4132f7df8cbe983c59121cb9e407 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index b4f7698f64f822cafde67ecb4b172351e04ee208..2aa868f001be1ce80441d81b15a70fcc3d3f4cb4 100644 (file)
@@ -9,6 +9,8 @@
 #include <boost/filesystem.hpp>\r
 #include <boost/format.hpp>\r
 \r
+#include <boost/assign.hpp>\r
+\r
 using boost::format;\r
 using boost::io::group;\r
                \r
@@ -16,59 +18,63 @@ namespace caspar {
        \r
 struct cg_producer::implementation : boost::noncopyable\r
 {\r
-       printer parent_printer_;\r
-       safe_ptr<flash_producer> flash_producer_;\r
+       const cg_producer* self_;\r
+       safe_ptr<core::frame_producer> flash_producer_;\r
        std::shared_ptr<core::frame_factory> frame_factory_;\r
 public:\r
-       implementation() \r
-               : flash_producer_(flash_producer(env::template_host())){}\r
+       implementation(const cg_producer* self) \r
+               : self_(self)\r
+               , flash_producer_(create_flash_producer(boost::assign::list_of(env::template_host())))\r
+       {\r
+               flash_producer_->set_parent(self_);\r
+       }\r
 \r
        void clear()\r
        {\r
-               flash_producer_ = flash_producer(env::template_host());\r
-               flash_producer_->set_parent_printer(parent_printer_);\r
-               flash_producer_->initialize(safe_ptr<core::frame_factory>(frame_factory_));\r
+               flash_producer_ = create_flash_producer(boost::assign::list_of(env::template_host()));\r
+               flash_producer_->set_parent(self_);\r
+               flash_producer_->set_frame_factory(safe_ptr<core::frame_factory>(frame_factory_));\r
        }\r
 \r
        void add(int layer, const std::wstring& filename,  bool play_on_load, const std::wstring& label, const std::wstring& data)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking add-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking add-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Add\" returntype=\"xml\"><arguments><number>%1%</number><string>%2%</string>%3%<string>%4%</string><string><![CDATA[%5%]]></string></arguments></invoke>") % layer % filename % (play_on_load?TEXT("<true/>"):TEXT("<false/>")) % label % data).str());\r
        }\r
 \r
        void remove(int layer)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking remove-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking remove-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Delete\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array></arguments></invoke>") % layer).str());\r
        }\r
 \r
        void play(int layer)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking play-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking play-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Play\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array></arguments></invoke>") % layer).str());\r
        }\r
 \r
        void stop(int layer, unsigned int)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking stop-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking stop-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Stop\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array><number>0</number></arguments></invoke>") % layer).str());\r
        }\r
 \r
        void next(int layer)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking next-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking next-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Next\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array></arguments></invoke>") % layer).str());\r
        }\r
 \r
        void update(int layer, const std::wstring& data)\r
        {\r
-               CASPAR_LOG(info) << print() <<" Invoking update-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() <<" Invoking update-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"SetData\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array><string><![CDATA[%2%]]></string></arguments></invoke>") % layer % data).str());\r
        }\r
 \r
        void invoke(int layer, const std::wstring& label)\r
        {\r
-               CASPAR_LOG(info) << print() << " Invoking invoke-command";\r
+               CASPAR_LOG(info) << flash_producer_->print() << " Invoking invoke-command";\r
                flash_producer_->param((boost::wformat(L"<invoke name=\"Invoke\" returntype=\"xml\"><arguments><array><property id=\"0\"><number>%1%</number></property></array><string>%2%</string></arguments></invoke>") % layer % label).str());\r
        }\r
 \r
@@ -77,21 +83,15 @@ public:
                return flash_producer_->receive();\r
        }\r
                \r
-       void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                frame_factory_ = frame_factory;\r
-               flash_producer_->set_parent_printer(parent_printer_);\r
-               flash_producer_->initialize(frame_factory);\r
-       }\r
-\r
-       void set_parent_printer(const printer& parent_printer) \r
-       {\r
-               parent_printer_ = parent_printer;\r
+               flash_producer_->set_frame_factory(frame_factory);\r
        }\r
-\r
+       \r
        std::wstring print() const\r
        {\r
-               return flash_producer_->print();\r
+               return L"cg";\r
        }\r
 };\r
        \r
@@ -121,7 +121,7 @@ safe_ptr<core::frame_producer> create_ct_producer(const std::vector<std::wstring
        return producer;\r
 }\r
 \r
-cg_producer::cg_producer() : impl_(new implementation()){}\r
+cg_producer::cg_producer() : impl_(new implementation(this)){}\r
 cg_producer::cg_producer(cg_producer&& other) : impl_(std::move(other.impl_)){}\r
 safe_ptr<core::basic_frame> cg_producer::receive(){return impl_->receive();}\r
 void cg_producer::clear(){impl_->clear();}\r
@@ -132,8 +132,7 @@ void cg_producer::stop(int layer, unsigned int mix_out_duration){impl_->stop(lay
 void cg_producer::next(int layer){impl_->next(layer);}\r
 void cg_producer::update(int layer, const std::wstring& data){impl_->update(layer, data);}\r
 void cg_producer::invoke(int layer, const std::wstring& label){impl_->invoke(layer, label);}\r
-void cg_producer::initialize(const safe_ptr<core::frame_factory>& frame_factory){impl_->initialize(frame_factory);}\r
-void cg_producer::set_parent_printer(const printer& parent_printer) { impl_->set_parent_printer(parent_printer);}\r
-std::wstring cg_producer::print() const{return impl_->print();}\r
+void cg_producer::set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory){impl_->set_frame_factory(frame_factory);}\r
+std::wstring cg_producer::print() const{return frame_producer::print() + impl_->print();}\r
 \r
 }
\ No newline at end of file
index 8bdd818bf797c13dad319951b046d4f311f6950e..2fb67db134aefa651157e07c64c77e2af838cfdd 100644 (file)
@@ -17,10 +17,6 @@ public:
        explicit cg_producer();\r
        cg_producer(cg_producer&& other);\r
        \r
-       virtual safe_ptr<core::basic_frame> receive();\r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory);\r
-       virtual void set_parent_printer(const printer& parent_printer);\r
-\r
        void clear();\r
        void add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = TEXT(""), const std::wstring& data = TEXT(""));\r
        void remove(int layer);\r
@@ -30,6 +26,9 @@ public:
        void update(int layer, const std::wstring& data);\r
        void invoke(int layer, const std::wstring& label);\r
        \r
+       // frame_producer\r
+       virtual safe_ptr<core::basic_frame> receive();\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory);\r
        virtual std::wstring print() const;\r
 \r
 private:\r
index a7132c23b8682765498d340e7af328f49d6b3301..aab9a7729393fa6f09decafe25482f32ada249de 100644 (file)
@@ -32,6 +32,7 @@
 #include <core/producer/frame/basic_frame.h>\r
 #include <core/producer/frame/write_frame.h>\r
 \r
+#include <common/env.h>\r
 #include <common/concurrency/executor.h>\r
 #include <common/utility/timer.h>\r
 #include <common/diagnostics/graph.h>\r
@@ -56,7 +57,7 @@ class flash_renderer
                ~co_init(){CoUninitialize();}\r
        } co_;\r
        \r
-       printer parent_printer_;\r
+       const object* parent_;\r
        const std::wstring filename_;\r
        const core::video_format_desc format_desc_;\r
 \r
@@ -72,14 +73,9 @@ class flash_renderer
        safe_ptr<diagnostics::graph> graph_;\r
        timer perf_timer_;\r
        \r
-       std::wstring print()\r
-       {\r
-               return parent_printer_();\r
-       }\r
-\r
 public:\r
-       flash_renderer(const safe_ptr<diagnostics::graph>& graph, const std::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename, const printer& parent_printer\r
-               : parent_printer_(parent_printer)\r
+       flash_renderer(const object* parent, const safe_ptr<diagnostics::graph>& graph, const std::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename\r
+               : parent_(parent)\r
                , graph_(graph)\r
                , filename_(filename)\r
                , format_desc_(frame_factory->get_video_format_desc())\r
@@ -97,7 +93,7 @@ public:
                if(FAILED(CComObject<caspar::flash::FlashAxContainer>::CreateInstance(&ax_)))\r
                        BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Failed to create FlashAxContainer"));\r
                \r
-               ax_->set_print(parent_printer_);\r
+               ax_->set_print([this]{return L"";});\r
 \r
                if(FAILED(ax_->CreateAxControl()))\r
                        BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Failed to Create FlashAxControl"));\r
@@ -128,7 +124,7 @@ public:
 \r
                bmp_.reset(CreateDIBSection(static_cast<HDC>(hdc_.get()), &info, DIB_RGB_COLORS, reinterpret_cast<void**>(&bmp_data_), 0, 0), DeleteObject);\r
                SelectObject(static_cast<HDC>(hdc_.get()), bmp_.get()); \r
-               CASPAR_LOG(info) << parent_printer_() << L" Thread started.";\r
+               CASPAR_LOG(info) << print() << L" Thread started.";\r
        }\r
 \r
        ~flash_renderer()\r
@@ -147,7 +143,7 @@ public:
                        CASPAR_LOG(warning) << print() << " Flash function call failed. Param: " << param << ".";\r
                graph_->add_tag("param");\r
 \r
-               if(abs(ax_->GetFPS() / format_desc_.fps) > 0.001)\r
+               if(abs(ax_->GetFPS() - format_desc_.fps) > 0.001 && abs(ax_->GetFPS()/2.0 - format_desc_.fps) > 0.001)\r
                        CASPAR_LOG(warning) << print() << " Invalid frame-rate: " << ax_->GetFPS() << L". Should be either " << format_desc_.fps << L" or " << format_desc_.fps*2.0 << L".";\r
        }\r
        \r
@@ -167,6 +163,11 @@ public:
                return ax_->GetFPS();   \r
        }\r
        \r
+       std::wstring print()\r
+       {\r
+               return parent_->print();\r
+       }\r
+\r
 private:\r
 \r
        safe_ptr<core::basic_frame> render_simple_frame(bool underflow)\r
@@ -194,9 +195,8 @@ private:
        }\r
 };\r
 \r
-struct flash_producer::implementation\r
+struct flash_producer : public core::frame_producer\r
 {      \r
-       printer parent_printer_;\r
        const std::wstring filename_;   \r
        tbb::atomic<int> fps_;\r
 \r
@@ -211,28 +211,19 @@ struct flash_producer::implementation
                        \r
        executor executor_;\r
                \r
-       std::wstring print() const\r
-       { \r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"flash[" + boost::filesystem::wpath(filename_).filename() + L", " + \r
-                                       boost::lexical_cast<std::wstring>(fps_) + \r
-                                       (interlaced(fps_, format_desc_) ? L"i" : L"p") + L"]";          \r
-       }       \r
-               \r
 public:\r
-       implementation(const std::wstring& filename) \r
+       flash_producer(const std::wstring& filename) \r
                : filename_(filename)           \r
                , tail_(core::basic_frame::empty())             \r
-               , executor_(print())\r
+               , executor_(L"flash_producer")\r
        {       \r
                if(!boost::filesystem::exists(filename))\r
                        BOOST_THROW_EXCEPTION(file_not_found() << boost::errinfo_file_name(narrow(filename)));  \r
                 \r
-               graph_ = diagnostics::create_graph(boost::bind(&implementation::print, this));\r
                fps_ = 0;\r
-               graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f));       \r
        }\r
 \r
-       ~implementation()\r
+       ~flash_producer()\r
        {\r
                executor_.clear();\r
                executor_.invoke([=]\r
@@ -241,19 +232,16 @@ public:
                });\r
        }\r
        \r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                frame_factory_ = frame_factory;\r
                format_desc_ = frame_factory->get_video_format_desc();\r
-               frame_buffer_.set_capacity(static_cast<size_t>(format_desc_.fps/4.0));\r
+               frame_buffer_.set_capacity(4);\r
+               graph_ = diagnostics::create_graph([this]{return print();});\r
+               graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f));       \r
                executor_.start();\r
        }\r
-\r
-       virtual void set_parent_printer(const printer& parent_printer) \r
-       {\r
-               parent_printer_ = parent_printer;\r
-       }\r
-\r
+       \r
        virtual safe_ptr<core::basic_frame> receive()\r
        {               \r
                if(!renderer_)\r
@@ -286,13 +274,13 @@ public:
                return tail_;\r
        }\r
        \r
-       void param(const std::wstring& param) \r
+       virtual void param(const std::wstring& param) \r
        {       \r
                executor_.begin_invoke([=]\r
                {\r
                        if(!renderer_)\r
                        {\r
-                               renderer_.reset(new flash_renderer(safe_ptr<diagnostics::graph>(graph_), frame_factory_, filename_, [=]{return print();}));\r
+                               renderer_.reset(new flash_renderer(this, safe_ptr<diagnostics::graph>(graph_), frame_factory_, filename_));\r
                                while(frame_buffer_.try_push(core::basic_frame::empty())){}             \r
                        }\r
 \r
@@ -307,17 +295,23 @@ public:
                        }\r
                });\r
        }\r
+               \r
+       virtual std::wstring print() const\r
+       { \r
+               return frame_producer::print() + L"flash[" + boost::filesystem::wpath(filename_).filename() + L", " + \r
+                                       boost::lexical_cast<std::wstring>(fps_) + \r
+                                       (interlaced(fps_, format_desc_) ? L"i" : L"p") + L"]";          \r
+       }       \r
 };\r
 \r
-flash_producer::flash_producer(flash_producer&& other) : impl_(std::move(other.impl_)){}\r
-flash_producer::flash_producer(const std::wstring& filename) : impl_(new implementation(filename)){}\r
-safe_ptr<core::basic_frame> flash_producer::receive(){return impl_->receive();}\r
-void flash_producer::param(const std::wstring& param){impl_->param(param);}\r
-void flash_producer::initialize(const safe_ptr<core::frame_factory>& frame_factory) { impl_->initialize(frame_factory);}\r
-void flash_producer::set_parent_printer(const printer& parent_printer){impl_->set_parent_printer(parent_printer);}\r
-std::wstring flash_producer::print() const {return impl_->print();}\r
+safe_ptr<core::frame_producer> create_flash_producer(const std::vector<std::wstring>& params)\r
+{\r
+       std::wstring filename = env::template_folder() + L"\\" + params[0];\r
+       \r
+       return make_safe<flash_producer>(filename);\r
+}\r
 \r
-std::wstring flash_producer::find_template(const std::wstring& template_name)\r
+std::wstring find_flash_template(const std::wstring& template_name)\r
 {\r
        if(boost::filesystem::exists(template_name + L".ft")) \r
                return template_name + L".ft";\r
index d719c5670807c37652c710119dccd254618f2f72..652fa56c9387f2aa489136ba9e5450f57a9e0760 100644 (file)
 \r
 namespace caspar {\r
 \r
-class flash_producer : public core::frame_producer\r
-{\r
-public:\r
-       explicit flash_producer(const std::wstring& filename);\r
-       flash_producer(flash_producer&& other);\r
+safe_ptr<core::frame_producer> create_flash_producer(const std::vector<std::wstring>& params);\r
 \r
-       virtual safe_ptr<core::basic_frame> receive();\r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory);\r
-       virtual void set_parent_printer(const printer& parent_printer);\r
-       virtual std::wstring print() const;\r
-\r
-       void param(const std::wstring& param);\r
-       \r
-       static std::wstring find_template(const std::wstring& templateName);\r
-private:       \r
-       struct implementation;\r
-       std::shared_ptr<implementation> impl_;\r
-};\r
+std::wstring find_flash_template(const std::wstring& templateName);\r
 \r
 }
\ No newline at end of file
index 2a04fc4fa82d472dbc219229373c1e7548f189af..d486f4848910495f378f95f3431de215a59fece6 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\FreeImage\Dist\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\FreeImage\Dist\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\FreeImage\Dist\;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index a222ff5f9a6263207b39719877a73cd3a743f982..eb7d5fb4034817810fb31027ce977c8504471823 100644 (file)
@@ -20,34 +20,33 @@ namespace caspar {
 \r
 struct image_producer : public core::frame_producer\r
 {      \r
-       printer parent_printer_;\r
        std::shared_ptr<core::frame_factory> frame_factory_;\r
        std::wstring filename_;\r
        safe_ptr<core::basic_frame> frame_;\r
+       decltype(load_image(L"")) bitmap_;\r
        \r
-       image_producer(const std::wstring& filename) \r
-               : filename_(filename), frame_(core::basic_frame::empty())       {}\r
+       explicit image_producer(const std::wstring& filename) \r
+               : filename_(filename)\r
+               , frame_(core::basic_frame::empty())    \r
+               , bitmap_(load_image(filename_))\r
+       {\r
+               FreeImage_FlipVertical(bitmap_.get());\r
+       }\r
        \r
        virtual safe_ptr<core::basic_frame> receive(){return frame_;}\r
 \r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                frame_factory_ = frame_factory;\r
-               auto bitmap = load_image(filename_);\r
-               FreeImage_FlipVertical(bitmap.get());\r
-               auto frame = frame_factory->create_frame(FreeImage_GetWidth(bitmap.get()), FreeImage_GetHeight(bitmap.get()));\r
-               std::copy_n(FreeImage_GetBits(bitmap.get()), frame->image_data().size(), frame->image_data().begin());\r
+               auto frame = frame_factory->create_frame(FreeImage_GetWidth(bitmap_.get()), FreeImage_GetHeight(bitmap_.get()));\r
+               std::copy_n(FreeImage_GetBits(bitmap_.get()), frame->image_data().size(), frame->image_data().begin());\r
+               bitmap_.reset();\r
                frame_ = std::move(frame);\r
        }\r
        \r
-       virtual void set_parent_printer(const printer& parent_printer) \r
-       {\r
-               parent_printer_ = parent_printer;\r
-       }\r
-\r
        virtual std::wstring print() const\r
        {\r
-               return (parent_printer_ ? parent_printer_() + L"/" : L"") + L"image_producer. filename: " + filename_;\r
+               return frame_producer::print() + L"image_producer[" + filename_ + L"]";\r
        }\r
 };\r
 \r
index df312d6892aec9cd3e0f55049eac5daf16a7e58e..468867c43a4ec1ce52f6f25fde065ba82ea29ba8 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\SFML-1.6\include;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\SFML-1.6\include;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\SFML-1.6\include;..\..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
index 813cb7acffae9352f38c447ad2ff95a22adae17a..7fbe3e797595f724212fae5fb6b349340ed3cff8 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\GLee5_4\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\GLee5_4\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\GLee5_4\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include;$(IncludePath)</IncludePath>\r
index 03932c758b5e78c792ba6f0df05acd1eb1559eba..7b8397f58c01f9c716891dabdaa8686204eb47b0 100644 (file)
@@ -135,18 +135,14 @@ public:
 \r
 struct silverlight_producer : public core::frame_producer\r
 {                              \r
-       std::wstring print() const{ return L"silverlight[]"; }  \r
-\r
        std::unique_ptr<silverlight_renderer> renderer_;\r
        \r
        executor executor_;\r
-\r
 public:\r
 \r
-       silverlight_producer() : executor_(print())\r
-       {}\r
+       silverlight_producer() : executor_(L"silverlight"){}\r
        \r
-       virtual void initialize(const safe_ptr<core::frame_factory>& frame_factory)\r
+       virtual void set_frame_factory(const safe_ptr<core::frame_factory>& frame_factory)\r
        {\r
                executor_.start();\r
                executor_.invoke([=]\r
@@ -154,12 +150,7 @@ public:
                        renderer_.reset(new silverlight_renderer(frame_factory));\r
                });\r
        }\r
-\r
-       void set_parent_printer(const printer& parent_printer)\r
-       {\r
-\r
-       }\r
-\r
+       \r
        virtual safe_ptr<core::basic_frame> receive()\r
        {\r
                executor_.begin_invoke([=]\r
@@ -169,6 +160,8 @@ public:
 \r
                return renderer_->get_frame();\r
        }\r
+\r
+       std::wstring print() const{ return frame_producer::print() + L"silverlight"; }  \r
 };\r
 \r
 safe_ptr<core::frame_producer> create_silverlight_producer(const std::vector<std::wstring>& params)\r
index c3600f6f8cf98d1f0a3a3d6039e1b15ba8555b7f..89e8e2d5ca03615d55daf2f11e8b41661b24bb8a 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)bin\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\..\;..\..\dependencies\boost_1_44_0\;..\..\dependencies\ffmpeg 0.6\include\;..\..\dependencies\tbb30_20100406oss\include\;..\..\dependencies\SFML-1.6\include\;$(IncludePath)</IncludePath>\r
index 79c4a83fa4ce9c2f9a28092bfd3860dc74d6cc40..ebbe5b152450e126cde442e7662c7cec7a0bc679 100644 (file)
@@ -752,7 +752,7 @@ bool CGCommand::DoExecuteAdd() {
                }\r
        }\r
 \r
-       std::wstring fullFilename = flash_producer::find_template(env::template_folder() + _parameters[2]);\r
+       std::wstring fullFilename = find_flash_template(env::template_folder() + _parameters[2]);\r
        if(!fullFilename.empty())\r
        {\r
                std::wstring extension = boost::filesystem::wpath(fullFilename).extension();\r
index 3a417ee7d697d0691aea9c880e2355e72a056ddd..b9dfc21345a8f061c60db62e7fc74289bcfc8816 100644 (file)
@@ -174,18 +174,18 @@ void CIIProtocolStrategy::WriteTemplateData(const std::wstring& templateName, co
                fullTemplateFilename += TEXT("\\");\r
        }\r
        fullTemplateFilename += templateName;\r
-       fullTemplateFilename = flash_producer::find_template(fullTemplateFilename);\r
+       fullTemplateFilename = find_flash_template(fullTemplateFilename);\r
        if(fullTemplateFilename.empty())\r
        {\r
                CASPAR_LOG(error) << "Failed to save instance of " << templateName << TEXT(" as ") << titleName << TEXT(", template ") << fullTemplateFilename << " not found";\r
                return;\r
        }\r
        \r
-       auto producer = flash_producer(env::template_folder()+TEXT("CG.fth"));\r
+       auto producer = create_flash_producer(boost::assign::list_of(env::template_folder()+TEXT("CG.fth")));\r
 \r
        std::wstringstream flashParam;\r
        flashParam << TEXT("<invoke name=\"Add\" returntype=\"xml\"><arguments><number>1</number><string>") << currentProfile_ << '/' <<  templateName << TEXT("</string><number>0</number><true/><string> </string><string><![CDATA[ ") << xmlData << TEXT(" ]]></string></arguments></invoke>");\r
-       producer.param(flashParam.str());\r
+       producer->param(flashParam.str());\r
 \r
        CASPAR_LOG(info) << "Saved an instance of " << templateName << TEXT(" as ") << titleName ;\r
 \r
index 4cba62a920d763c3bf30c3ff953a7b0fc066943f..13f901ffc97075ec57aa8571ac697963889af755 100644 (file)
   </ImportGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <IncludePath>../;..\dependencies/tbb30_20100406oss/include;..\dependencies\boost_1_44_0;$(IncludePath)</IncludePath>\r
-    <OutDir>$(ProjectDir)\bin\$(Configuration)\</OutDir>\r
+    <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <IncludePath>../;..\dependencies/tbb30_20100406oss/include;..\dependencies\boost_1_44_0;$(IncludePath)</IncludePath>\r
-    <OutDir>$(ProjectDir)\bin\$(Configuration)\</OutDir>\r
-    <IntDir>$(ProjectDir)\bin\$(Configuration)\</IntDir>\r
+    <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">\r
     <IncludePath>../;..\dependencies/tbb30_20100406oss/include;..\dependencies\boost_1_44_0;$(IncludePath)</IncludePath>\r
-    <OutDir>$(ProjectDir)\bin\$(Configuration)\</OutDir>\r
+    <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">\r
     <IncludePath>../;..\dependencies/tbb30_20100406oss/include;..\dependencies\boost_1_44_0;$(IncludePath)</IncludePath>\r
-    <OutDir>$(ProjectDir)\bin\$(Configuration)\</OutDir>\r
+    <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>\r
+    <IntDir>$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
index 713695882c0243bd0561ffc26c9ae9283b6200b6..e6f030d6058494aa0d7bfd1bf895d6f0f70c996b 100644 (file)
@@ -101,7 +101,7 @@ void setup_console_window()
 }\r
 \r
 void print_version()\r
-{      \r
+{\r
        CASPAR_LOG(info) << L"Copyright (c) 2010 Sveriges Television AB, www.casparcg.com, <info@casparcg.com>";\r
        CASPAR_LOG(info) << L"Starting CasparCG Video and Graphics Playout Server " << env::version();\r
        CASPAR_LOG(info) << L"Flash " << get_flash_version();\r
@@ -147,7 +147,7 @@ void print_version()
 }\r
  \r
 int main(int argc, wchar_t* argv[])\r
-{      \r
+{              \r
        #ifdef _DEBUG\r
                _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_CHECK_ALWAYS_DF );\r
                _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );\r
index 2df076e38fb86d30300cbdfabe4ae7406c1fea9d..89e61527a62b6c9a67735bb45ed94350de41d246 100644 (file)
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(SolutionDir)tmp\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(SolutionDir)tmp\$(Configuration)\</IntDir>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <IncludePath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">..\dependencies\BluefishSDK_V5_8_0_31\Inc\;..\dependencies\boost_1_44_0\;..\dependencies\ffmpeg 0.6\include\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\include\;..\dependencies\tbb30_20100406oss\include\;$(IncludePath)</IncludePath>\r
     <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Program\Microsoft DirectX SDK (June 2010)\Lib\x86;..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\ia32\vc10\;$(LibraryPath)</LibraryPath>\r
     <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">C:\Program\Microsoft DirectX SDK (June 2010)\Lib\x86;..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\ia32\vc10\;$(LibraryPath)</LibraryPath>\r
     <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">C:\Program\Microsoft DirectX SDK (June 2010)\Lib\x86;..\dependencies\BluefishSDK_V5_8_0_31\Lib\;..\dependencies\boost_1_44_0\stage\lib\;..\dependencies\ffmpeg 0.6\lib\;..\dependencies\FreeImage\Dist\;..\dependencies\GLee5_4\;..\dependencies\SFML-1.6\lib\;..\dependencies\tbb30_20100406oss\lib\ia32\vc10\;$(LibraryPath)</LibraryPath>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(SolutionDir)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(SolutionDir)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(SolutionDir)bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">$(SolutionDir)bin\$(Configuration)\</OutDir>\r
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionName)</TargetName>\r
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionName)</TargetName>\r
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(SolutionName)</TargetName>\r