]> git.sesse.net Git - casparcg/commitdiff
2.1.0: General simple refactoring.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 2 Feb 2012 22:06:33 +0000 (22:06 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 2 Feb 2012 22:06:33 +0000 (22:06 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@2194 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

53 files changed:
common/common.vcxproj
common/common.vcxproj.filters
common/concurrency/executor.h
common/env.cpp
common/except.cpp [moved from common/exception/win32_exception.cpp with 57% similarity]
common/except.h [moved from common/exception/exceptions.h with 73% similarity]
common/exception/win32_exception.h [deleted file]
common/gl/gl_check.h
common/tweener.cpp [moved from common/utility/tweener.cpp with 94% similarity]
common/tweener.h [moved from common/utility/tweener.h with 72% similarity]
core/StdAfx.h
core/consumer/frame_consumer.cpp
core/frame/frame_transform.cpp
core/frame/frame_transform.h
core/mixer/gpu/accelerator.cpp
core/mixer/gpu/device_buffer.cpp
core/mixer/gpu/host_buffer.cpp
core/mixer/gpu/image/image_kernel.cpp
core/mixer/gpu/write_frame.cpp
core/mixer/mixer.cpp
core/producer/color/color_producer.cpp
core/producer/frame_producer.cpp
core/producer/layer.cpp
core/producer/stage.cpp
core/producer/stage.h
core/producer/transition/transition_producer.h
core/video_channel.cpp
core/video_channel.h
modules/bluefish/StdAfx.h
modules/bluefish/util/blue_velvet.h
modules/decklink/StdAfx.h
modules/decklink/consumer/decklink_consumer.cpp
modules/decklink/producer/decklink_producer.cpp
modules/decklink/util/util.h
modules/ffmpeg/ffmpeg_error.h
modules/ffmpeg/producer/audio/audio_resampler.cpp
modules/ffmpeg/producer/filter/filter.cpp
modules/ffmpeg/producer/input/input.cpp
modules/ffmpeg/producer/muxer/frame_muxer.cpp
modules/ffmpeg/producer/util/flv.cpp
modules/ffmpeg/producer/util/util.cpp
modules/flash/StdAfx.h
modules/flash/util/swf.cpp
modules/image/consumer/image_consumer.cpp
modules/image/producer/image_scroll_producer.cpp
modules/image/util/image_loader.cpp
modules/oal/consumer/oal_consumer.cpp
modules/reroute/producer/reroute_producer.cpp
protocol/StdAfx.h
protocol/amcp/AMCPCommandsImpl.cpp
protocol/util/Thread.cpp
shell/main.cpp
shell/server.cpp

index 98c0af8e17f8c9e4dd26e88b0199cf4543b213b5..8384347ea28435f234e9ec3eab08950457db7a87 100644 (file)
     <ClInclude Include="concurrency\executor.h" />\r
     <ClInclude Include="concurrency\lock.h" />\r
     <ClInclude Include="diagnostics\graph.h" />\r
-    <ClInclude Include="exception\exceptions.h" />\r
-    <ClInclude Include="exception\win32_exception.h" />\r
+    <ClInclude Include="except.h" />\r
     <ClInclude Include="forward.h" />\r
     <ClInclude Include="gl\gl_check.h" />\r
     <ClInclude Include="log.h" />\r
     <ClInclude Include="os\windows\windows.h" />\r
     <ClInclude Include="reactive.h" />\r
     <ClInclude Include="stdafx.h" />\r
+    <ClInclude Include="tweener.h" />\r
     <ClInclude Include="utf.h" />\r
     <ClInclude Include="prec_timer.h" />\r
     <ClInclude Include="utility\move_on_copy.h" />\r
     <ClInclude Include="utility\param.h" />\r
-    <ClInclude Include="utility\tweener.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="diagnostics\graph.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
-    <ClCompile Include="exception\win32_exception.cpp">\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
-    </ClCompile>\r
+    <ClCompile Include="except.cpp" />\r
     <ClCompile Include="gl\gl_check.cpp">\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">Create</PrecompiledHeader>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">Create</PrecompiledHeader>\r
     </ClCompile>\r
-    <ClCompile Include="utf.cpp" />\r
-    <ClCompile Include="prec_timer.cpp" />\r
-    <ClCompile Include="utility\tweener.cpp">\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../stdafx.h</PrecompiledHeaderFile>\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../stdafx.h</PrecompiledHeaderFile>\r
+    <ClCompile Include="tweener.cpp">\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Use</PrecompiledHeader>\r
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">Use</PrecompiledHeader>\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">../stdafx.h</PrecompiledHeaderFile>\r
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">Use</PrecompiledHeader>\r
-      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">../stdafx.h</PrecompiledHeaderFile>\r
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">StdAfx.h</PrecompiledHeaderFile>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>\r
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">StdAfx.h</PrecompiledHeaderFile>\r
     </ClCompile>\r
+    <ClCompile Include="utf.cpp" />\r
+    <ClCompile Include="prec_timer.cpp" />\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 03c630d7c7e7317bb476cad4b4a4dc0ac4ace342..32fd24000f4a12db6f7c2762eea15cb80d5a0b54 100644 (file)
@@ -19,9 +19,6 @@
     <Filter Include="source\gl">\r
       <UniqueIdentifier>{0d94bbc2-e196-4618-a90b-19392a3a0a8e}</UniqueIdentifier>\r
     </Filter>\r
-    <Filter Include="source\exception">\r
-      <UniqueIdentifier>{35ca385e-c4db-4fe7-858b-0a0bb678675f}</UniqueIdentifier>\r
-    </Filter>\r
     <Filter Include="source\diagnostics">\r
       <UniqueIdentifier>{29a29bcc-a9a0-4083-b713-c3773d18e177}</UniqueIdentifier>\r
     </Filter>\r
@@ -36,9 +33,6 @@
     </Filter>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ClCompile Include="exception\win32_exception.cpp">\r
-      <Filter>source\exception</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="diagnostics\graph.cpp">\r
       <Filter>source\diagnostics</Filter>\r
     </ClCompile>\r
@@ -49,9 +43,6 @@
     <ClCompile Include="env.cpp">\r
       <Filter>source</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="utility\tweener.cpp">\r
-      <Filter>source\utility</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="utf.cpp">\r
       <Filter>source</Filter>\r
     </ClCompile>\r
     <ClCompile Include="log.cpp">\r
       <Filter>source</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="except.cpp">\r
+      <Filter>source</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="tweener.cpp">\r
+      <Filter>source</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ClInclude Include="exception\exceptions.h">\r
-      <Filter>source\exception</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="exception\win32_exception.h">\r
-      <Filter>source\exception</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="compiler\vs\disable_silly_warnings.h">\r
       <Filter>source\compiler\vs</Filter>\r
     </ClInclude>\r
@@ -88,9 +79,6 @@
       <Filter>source\diagnostics</Filter>\r
     </ClInclude>\r
     <ClInclude Include="stdafx.h" />\r
-    <ClInclude Include="utility\tweener.h">\r
-      <Filter>source\utility</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="os\windows\current_version.h">\r
       <Filter>source\os\windows</Filter>\r
     </ClInclude>\r
     <ClInclude Include="concurrency\defer.h">\r
       <Filter>source\concurrency</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="except.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="tweener.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 2246360d0ff5ad1511d405b59ffbf42aa8da140a..a422b11fd5431f71690d36b8ca0d3be64470cc97 100644 (file)
@@ -21,9 +21,9 @@
 \r
 #pragma once\r
 \r
-#include "../exception/win32_exception.h"\r
-#include "../utility/move_on_copy.h"\r
+#include "../except.h"\r
 #include "../log.h"\r
+#include "../utility/move_on_copy.h"\r
 \r
 #include <Windows.h>\r
 \r
index a73914093d53cfb5656b39aa27c01178b6af7fb5..bd981df178f88ccd2b9922e95f8f7c3449eb5bea 100644 (file)
@@ -25,8 +25,8 @@
 \r
 #include "../version.h"\r
 \r
+#include "except.h"\r
 #include "log.h"\r
-#include "exception/exceptions.h"\r
 #include "string.h"\r
 \r
 #include <boost/property_tree/ptree.hpp>\r
similarity index 57%
rename from common/exception/win32_exception.cpp
rename to common/except.cpp
index 566c35acaee4e0b6c58eed2fc75ddd6146ee04d9..82bdf638fba4cc8d0bd7dade5b285ccf45b6e43b 100644 (file)
@@ -1,32 +1,11 @@
-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\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
-* Author: Robert Nagy, ronag89@gmail.com\r
-*/\r
+#include "stdafx.h"\r
 \r
-#include "../stdafx.h"\r
+#include "except.h"\r
 \r
-#include "win32_exception.h"\r
-\r
-#include "../os/windows/windows.h"\r
+#include "os/windows/windows.h"\r
 \r
 namespace caspar {\r
-\r
+       \r
 void win32_exception::install_handler() \r
 {\r
 //#ifndef _DEBUG\r
similarity index 73%
rename from common/exception/exceptions.h
rename to common/except.h
index bf26204d729b6cb7841e3d28c74e093963cedea8..bbe1166cf9dfd805f25f089e3165f62967b62fc5 100644 (file)
 \r
 #pragma once\r
 \r
-#include "../utf.h"\r
+#include "utf.h"\r
 \r
 #include <exception>\r
 #include <boost/exception/all.hpp>\r
 #include <boost/exception/error_info.hpp>\r
 #include <boost/throw_exception.hpp>\r
 \r
+struct _EXCEPTION_RECORD;\r
+struct _EXCEPTION_POINTERS;\r
+\r
+typedef _EXCEPTION_RECORD EXCEPTION_RECORD;\r
+typedef _EXCEPTION_POINTERS EXCEPTION_POINTERS;\r
+\r
 namespace caspar {\r
 \r
 typedef boost::error_info<struct tag_arg_name_info, std::string>       arg_name_info_t;\r
@@ -76,6 +82,45 @@ struct timed_out                             : virtual caspar_exception {};
 struct not_supported                   : virtual caspar_exception {};\r
 struct not_implemented                 : virtual caspar_exception {};\r
 \r
+class win32_exception : public std::exception\r
+{\r
+public:\r
+       typedef const void* address;\r
+       static void install_handler();\r
+\r
+       address location() const { return location_; }\r
+       unsigned int error_code() const { return errorCode_; }\r
+       virtual const char* what() const { return message_;     }\r
+\r
+protected:\r
+       win32_exception(const EXCEPTION_RECORD& info);\r
+       static void Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);\r
+\r
+private:\r
+       const char* message_;\r
+\r
+       address location_;\r
+       unsigned int errorCode_;\r
+};\r
+\r
+class win32_access_violation : public win32_exception\r
+{\r
+       mutable char messageBuffer_[256];\r
+\r
+public:\r
+       bool is_write() const { return isWrite_; }\r
+       address bad_address() const { return badAddress_;}\r
+       virtual const char* what() const;\r
+\r
+protected:\r
+       win32_access_violation(const EXCEPTION_RECORD& info);\r
+       friend void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);\r
+\r
+private:\r
+       bool isWrite_;\r
+       address badAddress_;\r
+};\r
+\r
 }\r
 \r
 namespace std\r
diff --git a/common/exception/win32_exception.h b/common/exception/win32_exception.h
deleted file mode 100644 (file)
index f9c8730..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\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
-* Author: Robert Nagy, ronag89@gmail.com\r
-*/\r
-\r
-#pragma once\r
-\r
-#include "exceptions.h"\r
-\r
-struct _EXCEPTION_RECORD;\r
-struct _EXCEPTION_POINTERS;\r
-\r
-typedef _EXCEPTION_RECORD EXCEPTION_RECORD;\r
-typedef _EXCEPTION_POINTERS EXCEPTION_POINTERS;\r
-\r
-namespace caspar {\r
-\r
-class win32_exception : public std::exception\r
-{\r
-public:\r
-       typedef const void* address;\r
-       static void install_handler();\r
-\r
-       address location() const { return location_; }\r
-       unsigned int error_code() const { return errorCode_; }\r
-       virtual const char* what() const { return message_;     }\r
-\r
-protected:\r
-       win32_exception(const EXCEPTION_RECORD& info);\r
-       static void Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);\r
-\r
-private:\r
-       const char* message_;\r
-\r
-       address location_;\r
-       unsigned int errorCode_;\r
-};\r
-\r
-class win32_access_violation : public win32_exception\r
-{\r
-       mutable char messageBuffer_[256];\r
-\r
-public:\r
-       bool is_write() const { return isWrite_; }\r
-       address bad_address() const { return badAddress_;}\r
-       virtual const char* what() const;\r
-\r
-protected:\r
-       win32_access_violation(const EXCEPTION_RECORD& info);\r
-       friend void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);\r
-\r
-private:\r
-       bool isWrite_;\r
-       address badAddress_;\r
-};\r
-\r
-}
\ No newline at end of file
index 926ac993956bb35516f029d305c6130882024e9d..16dc08127e202bee1eafbaff3439df2d81d2dd83 100644 (file)
@@ -24,7 +24,7 @@
 \r
 #pragma once\r
 \r
-#include "../exception/exceptions.h"\r
+#include "../except.h"\r
 \r
 namespace caspar { namespace gl {\r
 \r
similarity index 94%
rename from common/utility/tweener.cpp
rename to common/tweener.cpp
index 0cff3c10d9ac77aa1e6fd9932aa7fbf1ee21ac9e..2cd0220cd7e922599be48ee19b74a3243437d837 100644 (file)
 //    * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.\r
 //\r
 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-#include "../stdafx.h"\r
+#include "stdafx.h"\r
 \r
 #include "tweener.h"\r
 \r
+#include "except.h"\r
+\r
 #include <boost/assign/list_of.hpp>\r
 #include <boost/regex.hpp>\r
 #include <boost/lexical_cast.hpp>\r
@@ -52,7 +54,7 @@
 #include <functional>\r
 #include <vector>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
 typedef std::function<double(double, double, double, double)> tweener_t;\r
                        \r
@@ -445,7 +447,7 @@ tweener_t get_tweener(std::wstring name)
 \r
        auto it = tweens.find(name);\r
        if(it == tweens.end())\r
-               it = tweens.find(L"linear");\r
+               BOOST_THROW_EXCEPTION(invalid_argument() << msg_info("Could not find tween.") << arg_value_info(name));\r
        \r
        return [=](double t, double b, double c, double d)\r
        {\r
@@ -453,4 +455,19 @@ tweener_t get_tweener(std::wstring name)
        };\r
 };\r
 \r
-}
\ No newline at end of file
+tweener::tweener(const std::wstring& name)\r
+       : func_(get_tweener(name))\r
+{\r
+}\r
+\r
+tweener::tweener(const wchar_t* name)\r
+       : func_(get_tweener(name))\r
+{\r
+}\r
+\r
+double tweener::operator()(double t, double b , double c, double d) const\r
+{\r
+       return func_(t, b, c, d);\r
+}\r
+\r
+}}
\ No newline at end of file
similarity index 72%
rename from common/utility/tweener.h
rename to common/tweener.h
index 51ec8368942dc38b225a4147f419edec6834616f..158f56593f5d414142065594a71be06684df7898 100644 (file)
 \r
 #include <functional>\r
 \r
-namespace caspar {\r
+namespace caspar { namespace core {\r
 \r
-typedef std::function<double(double, double, double, double)> tweener_t;\r
-tweener_t get_tweener(std::wstring name = L"linear");\r
+class tweener\r
+{\r
+public:\r
+       tweener(const std::wstring& name = L"linear");\r
+       tweener(const wchar_t* name);\r
+       double operator()(double t, double b , double c, double d) const;\r
+private:\r
+       std::function<double(double, double, double, double)> func_;\r
+};\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file
index 3ff2938761935687133e821a4a1a58638c2829ad..6610eabb1355ba9d26300381fbd51d0e947992eb 100644 (file)
@@ -62,5 +62,4 @@
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
 #include <common/log.h>\r
-#include <common/exception/exceptions.h>\r
-#include <common/exception/win32_exception.h>\r
+#include <common/except.h>\r
index 41b2e210872bc247ebdbfcf804197e637c1b1702..f649f185361cd6dece6ccb3218a5ae9b558f7de8 100644 (file)
@@ -25,7 +25,7 @@
 \r
 #include <common/env.h>\r
 #include <common/memory/safe_ptr.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <core/video_format.h>\r
 #include <core/frame/data_frame.h>\r
 \r
index 6935578466a2135ef0e369819f63d5a4c158a655..8d4842d19b0e45b0f330052712bd46634b4ab06b 100644 (file)
@@ -74,33 +74,33 @@ frame_transform frame_transform::operator*(const frame_transform &other) const
        return frame_transform(*this) *= other;\r
 }\r
 \r
-frame_transform tween(double time, const frame_transform& source, const frame_transform& dest, double duration, const tweener_t& tweener)\r
+frame_transform frame_transform::tween(double time, const frame_transform& source, const frame_transform& dest, double duration, const tweener& tween)\r
 {      \r
-       auto do_tween = [](double time, double source, double dest, double duration, const tweener_t& tweener)\r
+       auto do_tween = [](double time, double source, double dest, double duration, const tweener& tween)\r
        {\r
-               return tweener(time, source, dest-source, duration);\r
+               return tween(time, source, dest-source, duration);\r
        };\r
        \r
        frame_transform result; \r
-       result.volume                           = do_tween(time, source.volume,                                 dest.volume,                            duration, tweener);\r
-       result.brightness                       = do_tween(time, source.brightness,                             dest.brightness,                        duration, tweener);\r
-       result.contrast                         = do_tween(time, source.contrast,                               dest.contrast,                          duration, tweener);\r
-       result.saturation                       = do_tween(time, source.saturation,                             dest.saturation,                        duration, tweener);\r
-       result.opacity                          = do_tween(time, source.opacity,                                dest.opacity,                           duration, tweener);     \r
-       result.fill_translation[0]      = do_tween(time, source.fill_translation[0],    dest.fill_translation[0],       duration, tweener), \r
-       result.fill_translation[1]      = do_tween(time, source.fill_translation[1],    dest.fill_translation[1],       duration, tweener);             \r
-       result.fill_scale[0]            = do_tween(time, source.fill_scale[0],                  dest.fill_scale[0],                     duration, tweener), \r
-       result.fill_scale[1]            = do_tween(time, source.fill_scale[1],                  dest.fill_scale[1],                     duration, tweener);     \r
-       result.clip_translation[0]      = do_tween(time, source.clip_translation[0],    dest.clip_translation[0],       duration, tweener), \r
-       result.clip_translation[1]      = do_tween(time, source.clip_translation[1],    dest.clip_translation[1],       duration, tweener);             \r
-       result.clip_scale[0]            = do_tween(time, source.clip_scale[0],                  dest.clip_scale[0],                     duration, tweener), \r
-       result.clip_scale[1]            = do_tween(time, source.clip_scale[1],                  dest.clip_scale[1],                     duration, tweener);\r
-       result.levels.max_input         = do_tween(time, source.levels.max_input,               dest.levels.max_input,          duration, tweener);\r
-       result.levels.min_input         = do_tween(time, source.levels.min_input,               dest.levels.min_input,          duration, tweener);     \r
-       result.levels.max_output        = do_tween(time, source.levels.max_output,              dest.levels.max_output,         duration, tweener);\r
-       result.levels.min_output        = do_tween(time, source.levels.min_output,              dest.levels.min_output,         duration, tweener);\r
-       result.levels.gamma                     = do_tween(time, source.levels.gamma,                   dest.levels.gamma,                      duration, tweener);\r
-       result.field_mode                       = static_cast<field_mode>(source.field_mode & dest.field_mode);\r
+       result.volume                           = do_tween(time, source.volume,                                 dest.volume,                            duration, tween);\r
+       result.brightness                       = do_tween(time, source.brightness,                             dest.brightness,                        duration, tween);\r
+       result.contrast                         = do_tween(time, source.contrast,                               dest.contrast,                          duration, tween);\r
+       result.saturation                       = do_tween(time, source.saturation,                             dest.saturation,                        duration, tween);\r
+       result.opacity                          = do_tween(time, source.opacity,                                dest.opacity,                           duration, tween);       \r
+       result.fill_translation[0]      = do_tween(time, source.fill_translation[0],    dest.fill_translation[0],       duration, tween), \r
+       result.fill_translation[1]      = do_tween(time, source.fill_translation[1],    dest.fill_translation[1],       duration, tween);               \r
+       result.fill_scale[0]            = do_tween(time, source.fill_scale[0],                  dest.fill_scale[0],                     duration, tween), \r
+       result.fill_scale[1]            = do_tween(time, source.fill_scale[1],                  dest.fill_scale[1],                     duration, tween);       \r
+       result.clip_translation[0]      = do_tween(time, source.clip_translation[0],    dest.clip_translation[0],       duration, tween), \r
+       result.clip_translation[1]      = do_tween(time, source.clip_translation[1],    dest.clip_translation[1],       duration, tween);               \r
+       result.clip_scale[0]            = do_tween(time, source.clip_scale[0],                  dest.clip_scale[0],                     duration, tween), \r
+       result.clip_scale[1]            = do_tween(time, source.clip_scale[1],                  dest.clip_scale[1],                     duration, tween);\r
+       result.levels.max_input         = do_tween(time, source.levels.max_input,               dest.levels.max_input,          duration, tween);\r
+       result.levels.min_input         = do_tween(time, source.levels.min_input,               dest.levels.min_input,          duration, tween);       \r
+       result.levels.max_output        = do_tween(time, source.levels.max_output,              dest.levels.max_output,         duration, tween);\r
+       result.levels.min_output        = do_tween(time, source.levels.min_output,              dest.levels.min_output,         duration, tween);\r
+       result.levels.gamma                     = do_tween(time, source.levels.gamma,                   dest.levels.gamma,                      duration, tween);\r
+       result.field_mode                       = source.field_mode & dest.field_mode;\r
        result.is_key                           = source.is_key | dest.is_key;\r
        result.is_mix                           = source.is_mix | dest.is_mix;\r
        \r
index 0159b695f4ebfaab6565c467c0254ba39765d2e6..c6973be6335c0deb592bf8fd465c6f4e721ed931 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #pragma once\r
 \r
-#include <common/utility/tweener.h>\r
+#include <common/tweener.h>\r
 #include <core/video_format.h>\r
 \r
 #include <boost/array.hpp>\r
@@ -68,12 +68,47 @@ public:
        \r
        frame_transform& frame_transform::operator*=(const frame_transform &other);\r
        frame_transform frame_transform::operator*(const frame_transform &other) const;\r
-};\r
 \r
-frame_transform tween(double time, const frame_transform& source, const frame_transform& dest, double duration, const tweener_t& tweener);\r
+       static frame_transform tween(double time, const frame_transform& source, const frame_transform& dest, double duration, const tweener& tween);\r
+};\r
 \r
 bool operator<(const frame_transform& lhs, const frame_transform& rhs);\r
 bool operator==(const frame_transform& lhs, const frame_transform& rhs);\r
 bool operator!=(const frame_transform& lhs, const frame_transform& rhs);\r
 \r
+class tweened_transform\r
+{\r
+       frame_transform source_;\r
+       frame_transform dest_;\r
+       int duration_;\r
+       int time_;\r
+       tweener tweener_;\r
+public:        \r
+       tweened_transform()\r
+               : duration_(0)\r
+               , time_(0)\r
+       {\r
+       }\r
+\r
+       tweened_transform(const frame_transform& source, const frame_transform& dest, int duration, const tweener& tween)\r
+               : source_(source)\r
+               , dest_(dest)\r
+               , duration_(duration)\r
+               , time_(0)\r
+               , tweener_(tween)\r
+       {\r
+       }\r
+       \r
+       frame_transform fetch()\r
+       {\r
+               return time_ == duration_ ? dest_ : frame_transform::tween(static_cast<double>(time_), source_, dest_, static_cast<double>(duration_), tweener_);\r
+       }\r
+\r
+       frame_transform fetch_and_tick(int num)\r
+       {                                               \r
+               time_ = std::min(time_+num, duration_);\r
+               return fetch();\r
+       }\r
+};\r
+\r
 }}
\ No newline at end of file
index 560bdbe83ea6ef8aaaa1757c0b4a4f5373154b5e..fc86af17f5d4718ad8e5223edd028b5efca4887d 100644 (file)
@@ -27,7 +27,7 @@
 \r
 #include "shader.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/assert.h>\r
 #include <common/gl/gl_check.h>\r
 \r
index 7f2748ae518d26e495c4f7ed5f9120306abd1c27..8de3e61ae385bc0a03133df19f0d9b4d7f8b0366 100644 (file)
@@ -24,7 +24,7 @@
 #include "device_buffer.h"\r
 #include "accelerator.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
 \r
 #include <gl/glew.h>\r
index 891185cfdf29f423c10d1978ebdc94707ad9d209..2a0a6d67f5c38b48e89697b9719f0d7f8e77ead1 100644 (file)
@@ -26,7 +26,7 @@
 #include "device_buffer.h"\r
 #include "accelerator.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
 \r
 #include <gl/glew.h>\r
index 96d340efc4465a2fade084f0d3db62de3477b9cc..333ab58954263675aef9522aba298348a73a02b8 100644 (file)
@@ -30,7 +30,7 @@
 #include "../device_buffer.h"\r
 #include "../accelerator.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
 #include <common/env.h>\r
 \r
index 68241feecf762fc5acbb70fed6272251beca757e..11353aa39da3430d9f470a2a087bb8e1c5df3f60 100644 (file)
@@ -27,7 +27,7 @@
 #include "host_buffer.h"\r
 #include "device_buffer.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <core/frame/frame_visitor.h>\r
 #include <core/frame/pixel_format.h>\r
 \r
index 0b4a849b055088eb5f357955dcbc1e3570e75be3..cc062e207aba9e82ad70e1b49ffe38ddb5e16a8d 100644 (file)
@@ -35,9 +35,8 @@
 #include <common/env.h>\r
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/gl/gl_check.h>\r
-#include <common/utility/tweener.h>\r
 \r
 #include <core/frame/draw_frame.h>\r
 #include <core/frame/frame_factory.h>\r
index 932daf36e1ff2c52102630e4f631edb9d1c3aa14..62909b91d4d75d970749085d01ca95eb8640016c 100644 (file)
@@ -29,7 +29,7 @@
 #include <core/frame/pixel_format.h>\r
 #include <core/mixer/gpu/write_frame.h>\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <boost/algorithm/string.hpp>\r
 \r
index adb3eb05aa795f5089770e401c6f64efdef8b52d..972600f0ba5d9398ca5fb2b233679ac6cf6a5e73 100644 (file)
@@ -31,7 +31,7 @@
 \r
 #include <common/memory/safe_ptr.h>\r
 #include <common/concurrency/executor.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/utility/move_on_copy.h>\r
 \r
 namespace caspar { namespace core {\r
index a8b498c32640b1b84dcac165f3519bfc6b28990e..9f50928fae17ac4c71545a1d8336602e62b5750b 100644 (file)
@@ -131,12 +131,7 @@ public:
                        return core::draw_frame::empty();\r
                }\r
        }\r
-\r
-       boost::unique_future<std::wstring> call(bool foreground, const std::wstring& param)\r
-       {\r
-               return (foreground ? foreground_ : background_)->call(param);\r
-       }\r
-\r
+       \r
        bool empty() const\r
        {\r
                return background_ == core::frame_producer::empty() && foreground_ == core::frame_producer::empty();\r
@@ -187,6 +182,5 @@ safe_ptr<draw_frame> layer::receive(int flags) {return impl_->receive(flags);}
 safe_ptr<frame_producer> layer::foreground() const { return impl_->foreground_;}\r
 safe_ptr<frame_producer> layer::background() const { return impl_->background_;}\r
 bool layer::empty() const {return impl_->empty();}\r
-boost::unique_future<std::wstring> layer::call(bool foreground, const std::wstring& param){return impl_->call(foreground, param);}\r
 boost::property_tree::wptree layer::info() const{return impl_->info();}\r
 }}
\ No newline at end of file
index 63de87e1ec99b96bc216d4ebedcf2ae345601d81..0667a44816d0c0eb53e652be7af484c6ec863ed5 100644 (file)
 \r
 namespace caspar { namespace core {\r
        \r
-template<typename T>\r
-class tweened_transform\r
-{\r
-       T source_;\r
-       T dest_;\r
-       int duration_;\r
-       int time_;\r
-       tweener_t tweener_;\r
-public:        \r
-       tweened_transform()\r
-               : duration_(0)\r
-               , time_(0)\r
-               , tweener_(get_tweener(L"linear")){}\r
-       tweened_transform(const T& source, const T& dest, int duration, const std::wstring& tween = L"linear")\r
-               : source_(source)\r
-               , dest_(dest)\r
-               , duration_(duration)\r
-               , time_(0)\r
-               , tweener_(get_tweener(tween)){}\r
-       \r
-       T fetch()\r
-       {\r
-               return time_ == duration_ ? dest_ : tween(static_cast<double>(time_), source_, dest_, static_cast<double>(duration_), tweener_);\r
-       }\r
-\r
-       T fetch_and_tick(int num)\r
-       {                                               \r
-               time_ = std::min(time_+num, duration_);\r
-               return fetch();\r
-       }\r
-};\r
-\r
 struct stage::impl : public std::enable_shared_from_this<impl>\r
-                                  , boost::noncopyable\r
 {                      \r
-       std::map<int, layer>                                                                    layers_;        \r
-       std::map<int, tweened_transform<core::frame_transform>> transforms_;    \r
-\r
-       executor                                                                                                executor_;\r
+       std::map<int, layer>                            layers_;        \r
+       std::map<int, tweened_transform>        transforms_;    \r
+       executor                                                        executor_;\r
 public:\r
-       impl()  \r
-               : executor_(L"stage")\r
+       impl() : executor_(L"stage")\r
        {\r
        }\r
                \r
@@ -94,12 +59,12 @@ public:
        {               \r
                return executor_.invoke([=]() -> std::map<int, safe_ptr<draw_frame>>\r
                {\r
-                       std::map<int, safe_ptr<class draw_frame>> result;\r
+                       std::map<int, safe_ptr<class draw_frame>> frames;\r
 \r
                        try\r
                        {                                       \r
                                BOOST_FOREACH(auto& layer, layers_)                     \r
-                                       result[layer.first] = draw_frame::empty();      \r
+                                       frames[layer.first] = draw_frame::empty();      \r
 \r
                                auto format_desc2 = format_desc;\r
 \r
@@ -129,7 +94,7 @@ public:
                                                frame1 = core::draw_frame::interlace(frame1, frame2, format_desc2.field_mode);\r
                                        }\r
 \r
-                                       result[layer.first] = frame1;\r
+                                       frames[layer.first] = frame1;\r
                                });             \r
                        }\r
                        catch(...)\r
@@ -138,11 +103,11 @@ public:
                                CASPAR_LOG_CURRENT_EXCEPTION();\r
                        }       \r
 \r
-                       return result;\r
+                       return frames;\r
                });\r
        }\r
                \r
-       void apply_transforms(const std::vector<std::tuple<int, stage::transform_func_t, unsigned int, std::wstring>>& transforms)\r
+       void apply_transforms(const std::vector<std::tuple<int, stage::transform_func_t, unsigned int, tweener>>& transforms)\r
        {\r
                executor_.begin_invoke([=]\r
                {\r
@@ -150,18 +115,18 @@ public:
                        {\r
                                auto src = transforms_[std::get<0>(transform)].fetch();\r
                                auto dst = std::get<1>(transform)(src);\r
-                               transforms_[std::get<0>(transform)] = tweened_transform<frame_transform>(src, dst, std::get<2>(transform), std::get<3>(transform));\r
+                               transforms_[std::get<0>(transform)] = tweened_transform(src, dst, std::get<2>(transform), std::get<3>(transform));\r
                        }\r
                }, high_priority);\r
        }\r
                                                \r
-       void apply_transform(int index, const stage::transform_func_t& transform, unsigned int mix_duration, const std::wstring& tween)\r
+       void apply_transform(int index, const stage::transform_func_t& transform, unsigned int mix_duration, const tweener& tween)\r
        {\r
                executor_.begin_invoke([=]\r
                {\r
                        auto src = transforms_[index].fetch();\r
                        auto dst = transform(src);\r
-                       transforms_[index] = tweened_transform<frame_transform>(src, dst, mix_duration, tween);\r
+                       transforms_[index] = tweened_transform(src, dst, mix_duration, tween);\r
                }, high_priority);\r
        }\r
 \r
@@ -228,15 +193,7 @@ public:
                        layers_.clear();\r
                }, high_priority);\r
        }       \r
-       \r
-       boost::unique_future<std::wstring> call(int index, bool foreground, const std::wstring& param)\r
-       {\r
-               return std::move(*executor_.invoke([=]\r
-               {\r
-                       return std::make_shared<boost::unique_future<std::wstring>>(std::move(layers_[index].call(foreground, param)));\r
-               }, high_priority));\r
-       }\r
-       \r
+               \r
        void swap_layers(const safe_ptr<stage>& other)\r
        {\r
                if(other->impl_.get() == this)\r
@@ -316,7 +273,7 @@ public:
 \r
 stage::stage() : impl_(new impl()){}\r
 void stage::apply_transforms(const std::vector<stage::transform_tuple_t>& transforms){impl_->apply_transforms(transforms);}\r
-void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
+void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const tweener& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
 void stage::clear_transforms(int index){impl_->clear_transforms(index);}\r
 void stage::clear_transforms(){impl_->clear_transforms();}\r
 void stage::load(int index, const safe_ptr<frame_producer>& producer, bool preview, int auto_play_delta){impl_->load(index, producer, preview, auto_play_delta);}\r
@@ -330,7 +287,6 @@ void stage::swap_layer(int index, int other_index){impl_->swap_layer(index, othe
 void stage::swap_layer(int index, int other_index, const safe_ptr<stage>& other){impl_->swap_layer(index, other_index, other);}\r
 boost::unique_future<safe_ptr<frame_producer>> stage::foreground(int index) {return impl_->foreground(index);}\r
 boost::unique_future<safe_ptr<frame_producer>> stage::background(int index) {return impl_->background(index);}\r
-boost::unique_future<std::wstring> stage::call(int index, bool foreground, const std::wstring& param){return impl_->call(index, foreground, param);}\r
 boost::unique_future<boost::property_tree::wptree> stage::info() const{return impl_->info();}\r
 boost::unique_future<boost::property_tree::wptree> stage::info(int index) const{return impl_->info(index);}\r
 std::map<int, safe_ptr<class draw_frame>> stage::operator()(const video_format_desc& format_desc){return (*impl_)(format_desc);}\r
index 6842fc1841a2fd307149a4d5040a507a2dc4e619..c3e59da1fd8873d04f881560d188160bdc9b7cd1 100644 (file)
@@ -25,8 +25,8 @@
 \r
 #include <common/forward.h>\r
 #include <common/memory/safe_ptr.h>\r
+#include <common/tweener.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
 #include <functional>\r
@@ -38,18 +38,20 @@ FORWARD1(boost, template<typename> class unique_future);
 \r
 namespace caspar { namespace core {\r
        \r
-class stage sealed : boost::noncopyable\r
+class stage sealed\r
 {\r
+       stage(const stage&);\r
+       stage& operator=(const stage&);\r
 public:        \r
        typedef std::function<struct frame_transform(struct frame_transform)> transform_func_t;\r
-       typedef std::tuple<int, transform_func_t, unsigned int, std::wstring> transform_tuple_t;\r
+       typedef std::tuple<int, transform_func_t, unsigned int, tweener> transform_tuple_t;\r
 \r
        stage();\r
                \r
        std::map<int, safe_ptr<class draw_frame>> operator()(const struct video_format_desc& format_desc);\r
 \r
        void apply_transforms(const std::vector<transform_tuple_t>& transforms);\r
-       void apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");\r
        void clear_transforms(int index);\r
        void clear_transforms();\r
                                \r
@@ -63,12 +65,11 @@ public:
        void swap_layer(int index, int other_index);\r
        void swap_layer(int index, int other_index, const safe_ptr<stage>& other);\r
        \r
-       boost::unique_future<std::wstring>                                              call(int index, bool foreground, const std::wstring& param);\r
        boost::unique_future<safe_ptr<struct frame_producer>>   foreground(int index);\r
        boost::unique_future<safe_ptr<struct frame_producer>>   background(int index);\r
 \r
        boost::unique_future<boost::property_tree::wptree> info() const;\r
-       boost::unique_future<boost::property_tree::wptree> info(int layer) const;\r
+       boost::unique_future<boost::property_tree::wptree> info(int index) const;\r
        \r
 private:\r
        struct impl;\r
index 58c78cd73cb47dc146fcf04b6f51e8202404be32..852f938eb13070a1eddf116ec7ea7bf6f06c0140 100644 (file)
@@ -23,9 +23,9 @@
 \r
 #include "../../video_format.h"\r
 \r
-#include <common/memory/safe_ptr.h>\r
 #include <common/enum_class.h>\r
-#include <common/utility/tweener.h>\r
+#include <common/memory/safe_ptr.h>\r
+#include <common/tweener.h>\r
 \r
 #include <string>\r
 \r
@@ -62,12 +62,12 @@ struct transition_info
                : type(transition_type::cut)\r
                , duration(0)\r
                , direction(transition_direction::from_left)\r
-               , tweener(get_tweener(L"linear")){}\r
+               , tweener(L"linear"){}\r
                \r
        size_t                                  duration;\r
        transition_direction    direction;\r
        transition_type                 type;\r
-       tweener_t                               tweener;\r
+       tweener                                 tweener;\r
 };\r
 \r
 safe_ptr<struct frame_producer> create_transition_producer(const field_mode& mode, const safe_ptr<struct frame_producer>& destination, const transition_info& info);\r
index d38a16c253653eac97c7320577844eba9f3167f0..cae1ac2826b58f8d66a1b712b927835134285090 100644 (file)
@@ -162,10 +162,6 @@ public:
                auto mixer_info  = mixer_->info();\r
                auto output_info = output_->info();\r
 \r
-               stage_info.timed_wait(boost::posix_time::seconds(2));\r
-               mixer_info.timed_wait(boost::posix_time::seconds(2));\r
-               output_info.timed_wait(boost::posix_time::seconds(2));\r
-               \r
                info.add(L"video-mode", format_desc_.name);\r
                info.add_child(L"stage", stage_info.get());\r
                info.add_child(L"mixer", mixer_info.get());\r
index a0e39510570b3bef2d147dee7098950b0bb414cb..39cf33a7f8f12bb1dc7a34a49759eab084cbdf95 100644 (file)
@@ -25,7 +25,6 @@
 #include <common/reactive.h>\r
 #include <common/forward.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
 FORWARD3(caspar, core, gpu, class accelerator);\r
@@ -33,8 +32,9 @@ FORWARD3(caspar, core, gpu, class accelerator);
 namespace caspar { namespace core {\r
        \r
 class video_channel sealed : public reactive::observable<safe_ptr<const struct data_frame>>\r
-                                                  , boost::noncopyable\r
 {\r
+       video_channel(const video_channel&);\r
+       video_channel& operator=(const video_channel&);\r
 public:\r
        explicit video_channel(int index, const struct video_format_desc& format_desc, const safe_ptr<gpu::accelerator>& ogl);\r
 \r
index 46453c4bb4feb8d20fe7d7bec20f2fe18d158820..86c39eeea656226a348a3e690769c1ba4311b941 100644 (file)
@@ -44,6 +44,6 @@
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
 #include <common/log.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <assert.h>\r
index 2aa6863b893f6244feed7760f06fc696bcbe9271..5612adb46eb0c79c821610487bb74602edb8015b 100644 (file)
@@ -27,7 +27,7 @@
 #include <BlueHancUtils.h>\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 namespace caspar { \r
 \r
index c2278fff883fbc1910a2166d121ada8161d5c51f..f9b216ddb9bc1caa5ac646868acdbfa705391106 100644 (file)
@@ -82,6 +82,5 @@ extern "C"
 \r
 #include "../common/memory/safe_ptr.h"\r
 #include "../common/utf.h"\r
-#include "../common/exception/exceptions.h"\r
-#include "../common/exception/win32_exception.h"\r
+#include "../common/except.h"\r
 #include "../common/log.h"\r
index 3d03a8be26b3da6d2d8767b2840451fb276cd0be..e311b0d9a30ed1de88d1d8de595145eb09857f44 100644 (file)
@@ -33,7 +33,7 @@
 #include <common/concurrency/executor.h>\r
 #include <common/concurrency/lock.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/memory/memshfl.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
index 3d27c60d15713ace67039fcff8af3af3b0db63ff..1db16f3fde52fd2a4cd0ced8f90abcd5405b7d1b 100644 (file)
@@ -33,7 +33,7 @@
 \r
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 #include <common/utility/param.h>\r
 \r
index 4b6f3254e18fcebdae6f996f3a411767da4e7428..87c62c36a1a92f179b44cce6a30a966729c241df 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #pragma once\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 #include <core/video_format.h>\r
 \r
index ffb16ba967feba7a5140a735444a8a5a834eb82e..59f4e43895ddbfebdfa3b6aff8609f8d2b6fbec5 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #pragma once\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <string>\r
 \r
index b4cb395a52bbd8ed1e011be9b0b8699d4f5c56bf..e3f60fb97db031d3417281bc9ae6b5322083d6d6 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "audio_resampler.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
index 598d6a72c90ea90fafcf790bf40fb14369189b10..d0a00d9e3acaf5ca6585047e9bffd6228b8d519d 100644 (file)
@@ -27,7 +27,7 @@
 \r
 #include "../../ffmpeg_error.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <boost/assign.hpp>\r
 #include <boost/range/iterator_range.hpp>\r
index 4fa36e2587fb08455b92a03ec5da69b6545d89ba..38155df0f1027564ee3ff1fb5a743bd38e985b7f 100644 (file)
@@ -28,8 +28,7 @@
 \r
 #include <common/diagnostics/graph.h>\r
 #include <common/concurrency/executor.h>\r
-#include <common/exception/exceptions.h>\r
-#include <common/exception/win32_exception.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 \r
 #include <core/video_format.h>\r
index f747e2b01d299fc0b9462406a0f8bc6586c839f4..53eb799f1c85be6ae565deff83d8461401185ea8 100644 (file)
@@ -34,7 +34,7 @@
 #include <core/mixer/gpu/write_frame.h>\r
 \r
 #include <common/env.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
index 8ca1a81821654cae51147d3f3a5d94c4d8de4e87..5ce5aff7498369b11101e3953bc308bbee0fcb22 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "flv.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 \r
 #include <boost/filesystem.hpp>\r
index 4893f8840b2073e0a560a833a9330222080e2df2..5925dffb574b77ba301d00c6de3af09f3fda92b3 100644 (file)
@@ -36,7 +36,7 @@
 #include <core/producer/frame_producer.h>\r
 #include <core/mixer/gpu/write_frame.h>\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <tbb/parallel_for.h>\r
 \r
index d619ca0688634497852daf27b70ff3288d95ebfb..a9121de07823d14577d56890b0d5ff1de95f7c06 100644 (file)
@@ -58,5 +58,4 @@
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
 #include "../common/log.h"\r
-#include "../common/exception/exceptions.h"\r
-#include "../common/exception/win32_exception.h"\r
+#include "../common/except.h"\r
index 9fff378c050fac30e175dd0ee146285a5c153e82..01bb5e73dbf6b886e3869aab49f9aef8cb70796a 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "../StdAfx.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <zlib.h> // Compiled into FreeImage\r
 \r
index b90def5a6086f0c5f14c682c8c3e16b242f8cf99..85a060f7decef7f70a18ec61640e5b7b28587f29 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "image_consumer.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/env.h>\r
 #include <common/log.h>\r
 #include <common/utf.h>\r
index 7740c5cc8a5aabbdc6bef289ba7bca373825c566..a4b055fc856f306980ae123dcb1aa710db567828 100644 (file)
@@ -33,7 +33,7 @@
 \r
 #include <common/env.h>\r
 #include <common/log.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 \r
 #include <boost/assign.hpp>\r
 #include <boost/filesystem.hpp>\r
index e64fd04df3311f30fbe622b9d66ce8e4f7986ee7..092df73b00684ae57645ad7494696b1fcc3e3746 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "image_loader.h"\r
 \r
-#include <common/exception/Exceptions.h>\r
+#include <common/except.h>\r
 #include <common/utf.h>\r
 \r
 #if defined(_MSC_VER)\r
index 642cf9a34d53d148d9ca3c6303e41ea684967199..9996cfe79a80b6ba556010d50edc84106290b1f7 100644 (file)
@@ -21,7 +21,7 @@
 \r
 #include "oal_consumer.h"\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/log.h>\r
 #include <common/utf.h>\r
index addb5663d9d2d851a0a0ac358d9b41a7100563f6..e0ac61dc49577fc43056bc3678665167d8917d3c 100644 (file)
@@ -30,7 +30,7 @@
 #include <core/mixer/gpu/write_frame.h>\r
 #include <core/frame/data_frame.h>\r
 \r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/log.h>\r
 #include <common/reactive.h>\r
index a67685882162d53b5a06628cc5c0adea461ab092..a67b5d092ff0db54c7d05791f3c8362853a67810 100644 (file)
@@ -60,7 +60,6 @@
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
 #include "../common/log.h"\r
-#include "../common/exception/exceptions.h"\r
-#include "../common/exception/win32_exception.h"\r
+#include "../common/except.h"\r
 \r
 #include <assert.h>
\ No newline at end of file
index eaeeb59a657d7f4d39dad76c1d22f3684c2cc16a..47753a7206348f528c6ced7b681cd19691c349a9 100644 (file)
@@ -288,14 +288,14 @@ bool CallCommand::DoExecute()
                        std::wstring param;\r
                        for(auto it = std::begin(_parameters2)+1; it != std::end(_parameters2); ++it, param += L" ")\r
                                param += *it;\r
-                       result = GetChannel()->stage()->call(GetLayerIndex(), what == L"F", boost::trim_copy(param));\r
+                       result = (what == L"F" ? GetChannel()->stage()->foreground(GetLayerIndex()) : GetChannel()->stage()->background(GetLayerIndex())).get()->call(boost::trim_copy(param));\r
                }\r
                else\r
                {\r
                        std::wstring param;\r
                        for(auto it = std::begin(_parameters2); it != std::end(_parameters2); ++it, param += L" ")\r
                                param += *it;\r
-                       result = GetChannel()->stage()->call(GetLayerIndex(), true, boost::trim_copy(param));\r
+                       result = GetChannel()->stage()->foreground(GetLayerIndex()).get()->call(boost::trim_copy(param));\r
                }\r
 \r
                if(!result.timed_wait(boost::posix_time::seconds(2)))\r
@@ -715,7 +715,7 @@ bool LoadbgCommand::DoExecute()
                transitionInfo.duration = boost::lexical_cast<size_t>(what["DURATION"].str());\r
                auto direction = what["DIRECTION"].matched ? what["DIRECTION"].str() : L"";\r
                auto tween = what["TWEEN"].matched ? what["TWEEN"].str() : L"";\r
-               transitionInfo.tweener = get_tweener(tween);            \r
+               transitionInfo.tweener = tween;         \r
 \r
                if(transition == TEXT("CUT"))\r
                        transitionInfo.type = transition_type::cut;\r
index 1e1099b0b983eee81f693f838f072eb2a2af7331..45d90512e407c3e29c0484da064baad611adc9df 100644 (file)
@@ -22,7 +22,7 @@
 #include "../StdAfx.h"\r
 \r
 #include "thread.h"\r
-#include <common/exception/win32_exception.h>\r
+#include <common/except.h>\r
 \r
 namespace caspar {\r
        \r
index a2ed41d90bdb568091dcc49b56fa67e40e14aa2c..642e4cb1b4a438c86d4afbfa387b571893de8034 100644 (file)
@@ -51,8 +51,8 @@
 #include <modules/image/image.h>\r
 \r
 #include <common/env.h>\r
-#include <common/exception/win32_exception.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
+#include <common/except.h>\r
 #include <common/log.h>\r
 #include <common/gl/gl_check.h>\r
 #include <common/os/windows/current_version.h>\r
index fc279e050aa76cf4e56dc6b98dffbfe8341768b3..77b0c68e9f304756ddc263751a8c7a9ce7472dfb 100644 (file)
@@ -23,7 +23,7 @@
 #include "server.h"\r
 \r
 #include <common/env.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/except.h>\r
 #include <common/utf.h>\r
 \r
 #include <core/mixer/gpu/accelerator.h>\r