]> git.sesse.net Git - casparcg/commitdiff
2.1.0: Some mayor refactoring.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 11 Jan 2012 23:12:11 +0000 (23:12 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 11 Jan 2012 23:12:11 +0000 (23:12 +0000)
  - Don't use boost::noncopyable, use CASPAR_NO_COPY instead.
  - Use enum_class instead of regular enums.
  - Use FORWARDx to forward declare classes inside namespaces.
  - Forward declare class in active namespace inline.
  - Move some general classes into common root.
  - Renamed string to utf.
  - Removed lexical_cast_or_default, just use regular lexical_cast.
  - Misc...

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

122 files changed:
common/common.vcxproj
common/common.vcxproj.filters
common/concurrency/com_context.h
common/concurrency/executor.h
common/diagnostics/graph.h
common/enum_class.h [new file with mode: 0644]
common/env.cpp
common/exception/exceptions.h
common/exception/win32_exception.cpp
common/exception/win32_exception.h
common/forward.h [new file with mode: 0644]
common/gl/gl_check.cpp
common/log.cpp [moved from common/log/log.cpp with 96% similarity]
common/log.h [moved from common/log/log.h with 94% similarity]
common/memory/memshfl.h
common/no_copy.h [new file with mode: 0644]
common/prec_timer.cpp [new file with mode: 0644]
common/prec_timer.h [moved from common/utility/assert.h with 59% similarity]
common/stdafx.h
common/utf.cpp [moved from common/utility/string.cpp with 93% similarity]
common/utf.h [moved from common/utility/string.h with 80% similarity]
common/utility/timer.h [deleted file]
core/StdAfx.h
core/consumer/frame_consumer.h
core/consumer/output.cpp
core/consumer/output.h
core/core.vcxproj.filters
core/mixer/audio/audio_mixer.cpp
core/mixer/audio/audio_mixer.h
core/mixer/audio/audio_util.h
core/mixer/gpu/device_buffer.cpp
core/mixer/gpu/device_buffer.h
core/mixer/gpu/fence.h
core/mixer/gpu/host_buffer.h
core/mixer/gpu/ogl_device.cpp
core/mixer/gpu/ogl_device.h
core/mixer/gpu/shader.cpp
core/mixer/gpu/shader.h
core/mixer/image/blend_modes.cpp
core/mixer/image/blend_modes.h
core/mixer/image/image_kernel.cpp
core/mixer/image/image_kernel.h
core/mixer/image/image_mixer.cpp
core/mixer/image/image_mixer.h
core/mixer/mixer.cpp
core/mixer/mixer.h
core/mixer/read_frame.cpp
core/mixer/read_frame.h
core/mixer/write_frame.cpp
core/mixer/write_frame.h
core/producer/channel/channel_producer.cpp
core/producer/channel/channel_producer.h
core/producer/color/color_producer.cpp
core/producer/color/color_producer.h
core/producer/frame/basic_frame.cpp
core/producer/frame/basic_frame.h
core/producer/frame/frame_factory.h
core/producer/frame/frame_transform.cpp
core/producer/frame/frame_transform.h
core/producer/frame/frame_visitor.h
core/producer/frame/pixel_format.h
core/producer/frame_producer.cpp
core/producer/frame_producer.h
core/producer/layer.cpp
core/producer/layer.h
core/producer/playlist/playlist_producer.h
core/producer/separated/separated_producer.cpp
core/producer/separated/separated_producer.h
core/producer/stage.cpp
core/producer/stage.h
core/producer/transition/transition_producer.cpp
core/producer/transition/transition_producer.h
core/video_channel.cpp
core/video_channel.h
core/video_format.cpp
core/video_format.h
modules/bluefish/StdAfx.h
modules/bluefish/bluefish.cpp
modules/bluefish/consumer/bluefish_consumer.cpp
modules/bluefish/util/blue_velvet.cpp
modules/decklink/StdAfx.h
modules/decklink/consumer/decklink_consumer.cpp
modules/decklink/producer/decklink_producer.cpp
modules/decklink/util/util.h
modules/ffmpeg/StdAfx.h
modules/ffmpeg/consumer/ffmpeg_consumer.cpp
modules/ffmpeg/ffmpeg.cpp
modules/ffmpeg/ffmpeg_error.cpp
modules/ffmpeg/producer/audio/audio_decoder.cpp
modules/ffmpeg/producer/audio/audio_resampler.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/filter/parallel_yadif.cpp
modules/ffmpeg/producer/input/input.cpp
modules/ffmpeg/producer/muxer/display_mode.h
modules/ffmpeg/producer/muxer/frame_muxer.cpp
modules/ffmpeg/producer/tbb_avcodec.cpp
modules/ffmpeg/producer/util/flv.cpp
modules/ffmpeg/producer/util/util.cpp
modules/ffmpeg/producer/util/util.h
modules/ffmpeg/producer/video/video_decoder.cpp
modules/flash/StdAfx.h
modules/flash/producer/FlashAxContainer.cpp
modules/flash/producer/cg_producer.cpp
modules/flash/producer/cg_producer.h
modules/flash/producer/flash_producer.cpp
modules/image/consumer/image_consumer.cpp
modules/image/image.cpp
modules/image/producer/image_producer.cpp
modules/image/producer/image_scroll_producer.cpp
modules/image/util/image_loader.cpp
modules/oal/consumer/oal_consumer.cpp
modules/ogl/consumer/ogl_consumer.cpp
protocol/StdAfx.h
protocol/amcp/AMCPCommandsImpl.cpp
protocol/util/AsyncEventServer.cpp
shell/casparcg.config
shell/main.cpp
shell/server.cpp
shell/shell.vcxproj
shell/shell.vcxproj.filters
shell/stdafx.cpp [new file with mode: 0644]
shell/stdafx.h [new file with mode: 0644]

index fa7504f95479d30d42115277393ef5073604a002..c323308708e46981fd8fd33f80762fd894bd1dde 100644 (file)
     <ClInclude Include="concurrency\lock.h" />\r
     <ClInclude Include="concurrency\target.h" />\r
     <ClInclude Include="diagnostics\graph.h" />\r
+    <ClInclude Include="no_copy.h" />\r
     <ClInclude Include="exception\exceptions.h" />\r
     <ClInclude Include="exception\win32_exception.h" />\r
+    <ClInclude Include="forward.h" />\r
     <ClInclude Include="gl\gl_check.h" />\r
-    <ClInclude Include="log\log.h" />\r
+    <ClInclude Include="log.h" />\r
     <ClInclude Include="memory\memshfl.h" />\r
     <ClInclude Include="memory\page_locked_allocator.h" />\r
     <ClInclude Include="memory\safe_ptr.h" />\r
     <ClInclude Include="env.h" />\r
     <ClInclude Include="os\windows\current_version.h" />\r
     <ClInclude Include="os\windows\system_info.h" />\r
+    <ClInclude Include="enum_class.h" />\r
     <ClInclude Include="stdafx.h" />\r
-    <ClInclude Include="utility\assert.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\string.h" />\r
-    <ClInclude Include="utility\timer.h" />\r
     <ClInclude Include="utility\tweener.h" />\r
   </ItemGroup>\r
   <ItemGroup>\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="log\log.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="log.cpp" />\r
     <ClCompile Include="env.cpp" />\r
     <ClCompile Include="stdafx.cpp">\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">Create</PrecompiledHeader>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">Create</PrecompiledHeader>\r
     </ClCompile>\r
-    <ClCompile Include="utility\string.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="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
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../stdafx.h</PrecompiledHeaderFile>\r
+      <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../stdafx.h</PrecompiledHeaderFile>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Use</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">Use</PrecompiledHeader>\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
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>\r
     </ClCompile>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
index f2e01bce7caf5e55c1332fc69014daf97c969fba..659751980720b98101f623a18bb6eb72ee398f4c 100644 (file)
@@ -16,9 +16,6 @@
     <Filter Include="source\memory">\r
       <UniqueIdentifier>{9259676d-c225-4422-a50e-30d152d78dc2}</UniqueIdentifier>\r
     </Filter>\r
-    <Filter Include="source\log">\r
-      <UniqueIdentifier>{3b529e9b-c729-4c8a-8166-0cb8d8030973}</UniqueIdentifier>\r
-    </Filter>\r
     <Filter Include="source\gl">\r
       <UniqueIdentifier>{0d94bbc2-e196-4618-a90b-19392a3a0a8e}</UniqueIdentifier>\r
     </Filter>\r
     <ClCompile Include="exception\win32_exception.cpp">\r
       <Filter>source\exception</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="log\log.cpp">\r
-      <Filter>source\log</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="diagnostics\graph.cpp">\r
       <Filter>source\diagnostics</Filter>\r
     </ClCompile>\r
     <ClCompile Include="stdafx.cpp" />\r
-    <ClCompile Include="utility\string.cpp">\r
-      <Filter>source\utility</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="gl\gl_check.cpp">\r
       <Filter>source\gl</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="prec_timer.cpp">\r
+      <Filter>source</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="log.cpp">\r
+      <Filter>source</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="exception\exceptions.h">\r
@@ -75,9 +75,6 @@
     <ClInclude Include="concurrency\executor.h">\r
       <Filter>source\concurrency</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="log\log.h">\r
-      <Filter>source\log</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="gl\gl_check.h">\r
       <Filter>source\gl</Filter>\r
     </ClInclude>\r
       <Filter>source\diagnostics</Filter>\r
     </ClInclude>\r
     <ClInclude Include="stdafx.h" />\r
-    <ClInclude Include="utility\assert.h">\r
-      <Filter>source\utility</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="utility\string.h">\r
-      <Filter>source\utility</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="utility\timer.h">\r
-      <Filter>source\utility</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="utility\tweener.h">\r
       <Filter>source\utility</Filter>\r
     </ClInclude>\r
     <ClInclude Include="concurrency\lock.h">\r
       <Filter>source\concurrency</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="utf.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="prec_timer.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="log.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="forward.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="no_copy.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="enum_class.h">\r
+      <Filter>source</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 509c0afdbc7e2f0976807e78b537e31490844ee9..7303af352f57414588915387c0bd5e94d7e63a30 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "executor.h"\r
 \r
-#include "../log/log.h"\r
+#include "../log.h"\r
 #include "../exception/exceptions.h"\r
 \r
 #define NOMINMAX\r
index b0b5801638a0a0b4ff2db799d6a9c8c3371f0da0..9a6378246e431453baef121b92272364f4029117 100644 (file)
 #pragma once\r
 \r
 #include "../exception/win32_exception.h"\r
-#include "../exception/exceptions.h"\r
-#include "../utility/string.h"\r
 #include "../utility/move_on_copy.h"\r
-#include "../log/log.h"\r
+#include "../log.h"\r
+\r
+#include <Windows.h>\r
 \r
 #include <tbb/atomic.h>\r
 #include <tbb/concurrent_queue.h>\r
index 78a8aa8b20e8b4270dd1f986fa2dec55e35957cf..16108e1f340d2530b316def902eff026157fada2 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once\r
 \r
 #include "../memory/safe_ptr.h"\r
+#include "../no_copy.h"\r
 \r
 #include <string>\r
 #include <tuple>\r
@@ -33,6 +34,8 @@ std::tuple<float, float, float, float> color(int code);
 \r
 class graph\r
 {\r
+       CASPAR_NO_COPY(graph);\r
+\r
        friend void register_graph(const safe_ptr<graph>& graph);\r
 public:\r
        graph();\r
diff --git a/common/enum_class.h b/common/enum_class.h
new file mode 100644 (file)
index 0000000..696ff21
--- /dev/null
@@ -0,0 +1,42 @@
+#pragma once\r
+\r
+namespace caspar {\r
+\r
+template<typename def, typename inner = typename def::type>\r
+class enum_class : public def\r
+{\r
+       typedef typename def::type type;\r
+       inner val_; \r
+public: \r
+       explicit enum_class(int v) : val_(static_cast<type>(v)) {}\r
+       enum_class(type v) : val_(v) {}\r
+       inner value() const { return val_; }\r
\r
+       bool operator==(const enum_class& s) const { return val_ == s.val_; }\r
+       bool operator!=(const enum_class& s) const { return val_ != s.val_; }\r
+       bool operator<(const enum_class& s) const { return val_ <  s.val_; }\r
+       bool operator<=(const enum_class& s) const { return val_ <= s.val_; }\r
+       bool operator>(const enum_class& s) const { return val_ >  s.val_; }\r
+       bool operator>=(const enum_class& s) const { return val_ >= s.val_; }\r
+\r
+       enum_class operator&(const enum_class& s) const\r
+       {\r
+               return enum_class(static_cast<type>(val_ & s.val_));\r
+       }\r
+\r
+       enum_class operator|(const enum_class& s) const\r
+       {\r
+               return enum_class(static_cast<type>(val_ | s.val_));\r
+       }\r
+\r
+       //operator inner()\r
+       //{\r
+       //      return val_;\r
+       //}\r
+};\r
+\r
+#define CASPAR_ENUM_CLASS_DEF(name) name ## _def\r
+#define CASPAR_BEGIN_ENUM_CLASS typedef struct { enum type                             \r
+#define CASPAR_END_ENUM_CLASS(name) ;} CASPAR_ENUM_CLASS_DEF(name); typedef enum_class<CASPAR_ENUM_CLASS_DEF(name)> name;\r
+\r
+}
\ No newline at end of file
index b4ad9dda49fb665431b84a949e3b2558c741ad06..211523f9df71acda4a1d0d36060064cd1819c24c 100644 (file)
@@ -25,9 +25,9 @@
 \r
 #include "../version.h"\r
 \r
-#include "log/log.h"\r
+#include "log.h"\r
 #include "exception/exceptions.h"\r
-#include "utility/string.h"\r
+#include "string.h"\r
 \r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/property_tree/xml_parser.hpp>\r
index 93dc9b2cbaa921a262f92b88f8dd6832a7df3c6a..0f65ca0dc0b35d0b560024f442c490e506986e14 100644 (file)
 \r
 #pragma once\r
 \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
-#include "../utility/string.h"\r
-\r
 namespace caspar {\r
 \r
 typedef boost::error_info<struct tag_arg_name_info, std::string>               arg_name_info;\r
index 43af7c033d1f92bd9e34f879d6c10fa88811a72d..af58021a2996466b4e2307a1950880ac0e3c9c83 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "win32_exception.h"\r
 \r
-#include "../log/log.h"\r
+#include <windows.h>\r
 \r
 namespace caspar {\r
 \r
index 37b818b9ad525212fc29e25585096380b820fb7a..4264cf98f347284c1d7a09d881d5c3ff152624ff 100644 (file)
 \r
 #include "exceptions.h"\r
 \r
-#define NOMINMAX\r
-#define WIN32_LEAN_AND_MEAN\r
+#include "../no_copy.h"\r
 \r
-#include <windows.h>\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
+       //CASPAR_NO_COPY(win32_exception);\r
 public:\r
        typedef const void* address;\r
        static void install_handler();\r
@@ -53,6 +57,8 @@ private:
 \r
 class win32_access_violation : public win32_exception\r
 {\r
+       //CASPAR_NO_COPY(win32_access_violation);\r
+\r
        mutable char messageBuffer_[256];\r
 \r
 public:\r
diff --git a/common/forward.h b/common/forward.h
new file mode 100644 (file)
index 0000000..d09bc56
--- /dev/null
@@ -0,0 +1,6 @@
+#pragma once\r
+\r
+#define FORWARD0(expr)                                 expr\r
+#define FORWARD1(a1, expr)                             namespace a1 { expr; }\r
+#define FORWARD2(a1, a2, expr)                 namespace a1 { namespace a2 { expr; }}\r
+#define FORWARD3(a1, a2, a3, expr)             namespace a1 { namespace a2 { namespace a3 { expr; } }}
\ No newline at end of file
index 6d5079f14c85cca507c9b81cf118b1fa8c5f48d2..6e7f7adb581a68de3302f7957661d7330724648f 100644 (file)
 \r
 #include "gl_check.h"\r
 \r
-#include <GL/glew.h>\r
-\r
-#include "../exception/exceptions.h"\r
-#include "../log/log.h"\r
+#include "../log.h"\r
 \r
-#include <boost/lexical_cast.hpp>\r
+#include <GL/glew.h>\r
 \r
 namespace caspar { namespace gl {      \r
 \r
similarity index 96%
rename from common/log/log.cpp
rename to common/log.cpp
index 9dd218384ac5ac22254bbfb5d08c974a92fb0a5b..6704ef0994632a214ca08f1f814e60153f8db18f 100644 (file)
@@ -19,7 +19,7 @@
 * Author: Robert Nagy, ronag89@gmail.com\r
 */\r
 \r
-#include "../stdafx.h"\r
+#include "stdafx.h"\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (disable : 4100) // 'identifier' : unreferenced formal parameter\r
 \r
 #include "log.h"\r
 \r
-#include "../exception/exceptions.h"\r
-#include "../utility/string.h"\r
+#include "utf.h"\r
+\r
+#include "exception/exceptions.h"\r
+\r
 #include <ios>\r
 #include <string>\r
 #include <ostream>\r
similarity index 94%
rename from common/log/log.h
rename to common/log.h
index 7cd399286c7b4e884f0201fa627c76e9690ba02c..a70f93fcf0e3dcab9d818dabb49334818416b453 100644 (file)
@@ -30,8 +30,6 @@
 #pragma warning (disable : 4996) // _CRT_SECURE_NO_WARNINGS\r
 #endif\r
 \r
-#include "../utility/string.h"\r
-\r
 #include <boost/log/detail/prologue.hpp>\r
 #include <boost/log/keywords/severity.hpp>\r
 #include <boost/log/sources/global_logger_storage.hpp>\r
index d29e5698e54aa3490eb5475f09c73d5ee9459e11..f4636adaa2746c6fe3a29ce8d95d916435fc36d7 100644 (file)
 \r
 #include <intrin.h>\r
 \r
-#include <assert.h>\r
-\r
-#include <tbb/parallel_for.h>\r
-\r
 namespace caspar {\r
        \r
 static void* aligned_memshfl(void* dest, const void* source, size_t count, int m1, int m2, int m3, int m4)\r
diff --git a/common/no_copy.h b/common/no_copy.h
new file mode 100644 (file)
index 0000000..2f22bab
--- /dev/null
@@ -0,0 +1,5 @@
+#pragma once\r
+\r
+#define CASPAR_NO_COPY(TypeName) \\r
+  TypeName(const TypeName&);   \\r
+  void operator=(const TypeName&)\r
diff --git a/common/prec_timer.cpp b/common/prec_timer.cpp
new file mode 100644 (file)
index 0000000..65f61ba
--- /dev/null
@@ -0,0 +1,81 @@
+/*\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
+#include "stdafx.h"\r
+\r
+#include "prec_timer.h"\r
+\r
+#define NOMINMAX\r
+\r
+#include <windows.h>\r
+#include <Mmsystem.h>\r
+\r
+namespace caspar {\r
+       \r
+prec_timer::prec_timer()\r
+       : time_(0)\r
+{\r
+}\r
+\r
+// Author: Ryan M. Geiss\r
+// http://www.geisswerks.com/ryan/FAQS/timing.html\r
+void prec_timer::tick(double interval)\r
+{      \r
+       auto t = ::timeGetTime();\r
+\r
+       if (time_ != 0)\r
+       {\r
+               auto ticks_to_wait = static_cast<DWORD>(interval*1000.0);\r
+               bool done = 0;\r
+               do\r
+               {                               \r
+                       auto ticks_passed = t - time_;\r
+                       auto ticks_left   = ticks_to_wait - ticks_passed;\r
+\r
+                       if (t < time_)    // time wrap\r
+                               done = 1;\r
+                       if (ticks_passed >= ticks_to_wait)\r
+                               done = 1;\r
+                               \r
+                       if (!done)\r
+                       {\r
+                               // if > 0.002s left, do Sleep(1), which will actually sleep some \r
+                               //   steady amount, probably 1-2 ms,\r
+                               //   and do so in a nice way (cpu meter drops; laptop battery spared).\r
+                               // otherwise, do a few Sleep(0)'s, which just give up the timeslice,\r
+                               //   but don't really save cpu or battery, but do pass a tiny\r
+                               //   amount of time.\r
+                               if (ticks_left > 2)\r
+                                       Sleep(1);\r
+                               else                        \r
+                                       for (int i = 0; i < 10; ++i) \r
+                                               Sleep(0);  // causes thread to give up its timeslice\r
+                       }\r
+\r
+                       t = ::timeGetTime();\r
+               }\r
+               while (!done);            \r
+       }\r
+\r
+       time_ = t;\r
+}      \r
+\r
+}
\ No newline at end of file
similarity index 59%
rename from common/utility/assert.h
rename to common/prec_timer.h
index 18be7cbad9e1cd6825f26611d701253a36dc5498..82bed017d9916913850f6e38aff688090666bff3 100644 (file)
 \r
 #pragma once\r
 \r
-#include "../log/log.h"\r
+namespace caspar {\r
+       \r
+class prec_timer\r
+{\r
+public:\r
+       prec_timer();\r
 \r
-#ifdef _MSC_VER\r
-#define _CASPAR_DBG_BREAK _CrtDbgBreak()\r
-#else\r
-#define _CASPAR_DBG_BREAK\r
-#endif\r
+       // Author: Ryan M. Geiss\r
+       // http://www.geisswerks.com/ryan/FAQS/timing.html\r
+       void tick(double interval);\r
 \r
-#define CASPAR_VERIFY_EXPR_STR(str) #str\r
+private:       \r
+       DWORD time_;\r
+};\r
 \r
-#define CASPAR_VERIFY(expr) do{if(!(expr)){ CASPAR_LOG(warning) << "Assertion Failed: " << \\r
-       CASPAR_VERIFY_EXPR_STR(expr) << " " \\r
-       << "file:" << __FILE__ << " " \\r
-       << "line:" << __LINE__ << " "; \\r
-       _CASPAR_DBG_BREAK;\\r
-       }}while(0);\r
 \r
-#ifdef _DEBUG\r
-#define CASPAR_ASSERT(expr) CASPAR_VERIFY(expr)\r
-#else\r
-#define CASPAR_ASSERT(expr)\r
-#endif
\ No newline at end of file
+}
\ No newline at end of file
index bf5426cd199f14a4cfcd3a2dbe76d30336da3581..1c31d8b8f4fb1422e519eda05b0b2acf846b596d 100644 (file)
@@ -23,3 +23,5 @@
 \r
 #define NOMINMAX\r
 #define WIN32_LEAN_AND_MEAN\r
+\r
+#include <windows.h>
\ No newline at end of file
similarity index 93%
rename from common/utility/string.cpp
rename to common/utf.cpp
index fe5c5c8aff2a5d6472621f15685dc113c953d6d0..b453a044c440359d217b6626bbe116de5e67d313 100644 (file)
@@ -19,7 +19,9 @@
 * Author: Robert Nagy, ronag89@gmail.com\r
 */\r
 \r
-#include "../stdafx.h"\r
+#include "stdafx.h"\r
+\r
+#include "utf.h"\r
 \r
 #pragma warning(push, 1)\r
 \r
similarity index 80%
rename from common/utility/string.h
rename to common/utf.h
index 45ce4217922b00593e593176f2b14e4699b1788a..f60182ab81998dcad13427e5e3b6ba2bbd6058b6 100644 (file)
@@ -31,17 +31,4 @@ std::wstring u16(const std::wstring& str);
 std::string u8(const std::wstring& str);          \r
 std::string u8(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
-{\r
-       try\r
-       {\r
-               return boost::lexical_cast<T>(str);\r
-       }\r
-       catch(boost::bad_lexical_cast&)\r
-       {\r
-               return fail_value;\r
-       }\r
-}\r
-\r
 }
\ No newline at end of file
diff --git a/common/utility/timer.h b/common/utility/timer.h
deleted file mode 100644 (file)
index 79a3162..0000000
+++ /dev/null
@@ -1,86 +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
-#define NOMINMAX\r
-\r
-#include <windows.h>\r
-#include <Mmsystem.h>\r
-\r
-namespace caspar {\r
-       \r
-class high_prec_timer\r
-{\r
-public:\r
-       high_prec_timer()\r
-               : time_(0)\r
-       {\r
-       }\r
-\r
-       // Author: Ryan M. Geiss\r
-       // http://www.geisswerks.com/ryan/FAQS/timing.html\r
-       void tick(double interval)\r
-       {       \r
-               auto t = ::timeGetTime();\r
-\r
-               if (time_ != 0)\r
-               {\r
-                       auto ticks_to_wait = static_cast<DWORD>(interval*1000.0);\r
-                       bool done = 0;\r
-                       do\r
-                       {                               \r
-                               auto ticks_passed = t - time_;\r
-                               auto ticks_left   = ticks_to_wait - ticks_passed;\r
-\r
-                               if (t < time_)    // time wrap\r
-                                       done = 1;\r
-                               if (ticks_passed >= ticks_to_wait)\r
-                                       done = 1;\r
-                               \r
-                               if (!done)\r
-                               {\r
-                                       // if > 0.002s left, do Sleep(1), which will actually sleep some \r
-                                       //   steady amount, probably 1-2 ms,\r
-                                       //   and do so in a nice way (cpu meter drops; laptop battery spared).\r
-                                       // otherwise, do a few Sleep(0)'s, which just give up the timeslice,\r
-                                       //   but don't really save cpu or battery, but do pass a tiny\r
-                                       //   amount of time.\r
-                                       if (ticks_left > 2)\r
-                                               Sleep(1);\r
-                                       else                        \r
-                                               for (int i = 0; i < 10; ++i) \r
-                                                       Sleep(0);  // causes thread to give up its timeslice\r
-                               }\r
-\r
-                               t = ::timeGetTime();\r
-                       }\r
-                       while (!done);            \r
-               }\r
-\r
-               time_ = t;\r
-       }               \r
-private:       \r
-       DWORD time_;\r
-};\r
-\r
-\r
-}
\ No newline at end of file
index 30a9629d62483a8a511294e19246c57ab2c5815e..d58b25d7cfbc68056cac3ae7fb6af627ff33ecd2 100644 (file)
@@ -26,6 +26,7 @@
 #endif\r
 \r
 #define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN\r
 \r
 #include <GL/glew.h>\r
 \r
@@ -43,6 +44,7 @@
 #include <tbb/concurrent_queue.h>\r
 #include <tbb/concurrent_unordered_map.h>\r
 \r
+#include <boost/assert.hpp>\r
 #include <boost/assign.hpp>\r
 #include <boost/circular_buffer.hpp>\r
 #include <boost/timer.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/property_tree/xml_parser.hpp>\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 #include <common/memory/safe_ptr.h>\r
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/exception/win32_exception.h>\r
-#include <common/utility/assert.h>\r
index d1d7da9413487be285abd4213583a513bee0e5ee..56574526894bb81e5ac62eef70a6e3eab2838720 100644 (file)
@@ -21,9 +21,9 @@
 \r
 #pragma once\r
 \r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
 #include <functional>\r
 \r
 namespace caspar { namespace core {\r
        \r
-class read_frame;\r
-struct video_format_desc;\r
-\r
-struct frame_consumer : boost::noncopyable\r
+struct frame_consumer\r
 {\r
+       CASPAR_NO_COPY(frame_consumer);\r
+\r
+       frame_consumer(){}\r
        virtual ~frame_consumer() {}\r
        \r
-       virtual bool send(const safe_ptr<read_frame>& frame) = 0;\r
-       virtual void initialize(const video_format_desc& format_desc, int channel_index) = 0;\r
+       virtual bool send(const safe_ptr<class read_frame>& frame) = 0;\r
+       virtual void initialize(const struct video_format_desc& format_desc, int channel_index) = 0;\r
        virtual std::wstring print() const = 0;\r
        virtual boost::property_tree::wptree info() const = 0;\r
        virtual bool has_synchronization_clock() const {return true;}\r
@@ -52,9 +52,9 @@ struct frame_consumer : boost::noncopyable
 \r
 safe_ptr<frame_consumer> create_consumer_cadence_guard(const safe_ptr<frame_consumer>& consumer);\r
 \r
-typedef std::function<safe_ptr<core::frame_consumer>(const std::vector<std::wstring>&)> consumer_factory_t;\r
+typedef std::function<safe_ptr<frame_consumer>(const std::vector<std::wstring>&)> consumer_factory_t;\r
 \r
 void register_consumer_factory(const consumer_factory_t& factory);\r
-safe_ptr<core::frame_consumer> create_consumer(const std::vector<std::wstring>& params);\r
+safe_ptr<frame_consumer> create_consumer(const std::vector<std::wstring>& params);\r
 \r
 }}
\ No newline at end of file
index a05630c5c09f76186d160c6609a7d767adde0f0d..3401e2d7f475f7cb9afce69ca8bc7847b58f473e 100644 (file)
 \r
 #include "output.h"\r
 \r
+#include "frame_consumer.h"\r
+\r
 #include "../video_format.h"\r
 #include "../mixer/gpu/ogl_device.h"\r
 #include "../mixer/read_frame.h"\r
 \r
 #include <common/concurrency/executor.h>\r
-#include <common/utility/assert.h>\r
-#include <common/utility/timer.h>\r
+#include <common/diagnostics/graph.h>\r
+#include <common/prec_timer.h>\r
 #include <common/memory/memshfl.h>\r
 #include <common/env.h>\r
 \r
+#include <boost/assert.hpp>\r
 #include <boost/circular_buffer.hpp>\r
 #include <boost/timer.hpp>\r
 #include <boost/range/algorithm.hpp>\r
@@ -55,7 +58,7 @@ struct output::impl
 \r
        std::map<int, safe_ptr<frame_consumer>>                 consumers_;\r
        \r
-       high_prec_timer                                                                 sync_timer_;\r
+       prec_timer                                                                              sync_timer_;\r
 \r
        boost::circular_buffer<safe_ptr<read_frame>>    frames_;\r
 \r
@@ -254,14 +257,6 @@ public:
                        return info;\r
                }, high_priority));\r
        }\r
-\r
-       bool empty()\r
-       {\r
-               return executor_.invoke([this]\r
-               {\r
-                       return consumers_.empty();\r
-               });\r
-       }\r
 };\r
 \r
 output::output(const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc, int channel_index) : impl_(new impl(graph, format_desc, channel_index)){}\r
@@ -272,5 +267,4 @@ void output::remove(const safe_ptr<frame_consumer>& consumer){impl_->remove(cons
 void output::send(const std::pair<safe_ptr<read_frame>, std::shared_ptr<void>>& frame) {impl_->send(frame); }\r
 void output::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
 boost::unique_future<boost::property_tree::wptree> output::info() const{return impl_->info();}\r
-bool output::empty() const{return impl_->empty();}\r
 }}
\ No newline at end of file
index 2019178af9a9650cbc0b99bfde160cabf65828b9..56fc6054989851bd4c29ff5999a0dd32e13e24b8 100644 (file)
 \r
 #pragma once\r
 \r
-#include "../consumer/frame_consumer.h"\r
-\r
+#include <common/forward.h>\r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 #include <common/concurrency/target.h>\r
-#include <common/diagnostics/graph.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
-#include <boost/thread/future.hpp>\r
+\r
+FORWARD1(boost, template<typename> class unique_future)\r
+FORWARD2(caspar, diagnostics, class graph);\r
 \r
 namespace caspar { namespace core {\r
        \r
-class output sealed : public target<std::pair<safe_ptr<read_frame>, std::shared_ptr<void>>>\r
-                                       , boost::noncopyable\r
+class output sealed : public target<std::pair<safe_ptr<class read_frame>, std::shared_ptr<void>>>\r
 {\r
+       CASPAR_NO_COPY(output);\r
 public:\r
-       explicit output(const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc, int channel_index);\r
+       explicit output(const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc, int channel_index);\r
 \r
        // target\r
        \r
-       virtual void send( const std::pair<safe_ptr<read_frame>, std::shared_ptr<void>>& frame) override;\r
+       virtual void send(const std::pair<safe_ptr<class read_frame>, std::shared_ptr<void>>& frame) override;\r
 \r
        // output\r
        \r
-       void add(const safe_ptr<frame_consumer>& consumer);\r
-       void add(int index, const safe_ptr<frame_consumer>& consumer);\r
-       void remove(const safe_ptr<frame_consumer>& consumer);\r
+       void add(const safe_ptr<struct frame_consumer>& consumer);\r
+       void add(int index, const safe_ptr<struct frame_consumer>& consumer);\r
+       void remove(const safe_ptr<struct frame_consumer>& consumer);\r
        void remove(int index);\r
        \r
-       void set_video_format_desc(const video_format_desc& format_desc);\r
+       void set_video_format_desc(const struct video_format_desc& format_desc);\r
 \r
        boost::unique_future<boost::property_tree::wptree> info() const;\r
-\r
-       bool empty() const;\r
 private:\r
        struct impl;\r
        safe_ptr<impl> impl_;\r
index d6afc6710b8ff5ab584cf46f0eabe1d996ab5656..fdd9b6c74b204508e4857acb32120249223e5d81 100644 (file)
@@ -90,9 +90,6 @@
     <ClInclude Include="mixer\audio\audio_mixer.h">\r
       <Filter>source\mixer\audio</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="producer\separated\separated_producer.h">\r
-      <Filter>source\producer\separated</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="mixer\read_frame.h">\r
       <Filter>source\mixer</Filter>\r
     </ClInclude>\r
     <ClInclude Include="producer\channel\channel_producer.h">\r
       <Filter>source\producer\channel</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="producer\separated\separated_producer.h">\r
+      <Filter>source\producer\separated</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="producer\transition\transition_producer.cpp">\r
index 1c211bca34a10906391af13e6d378f6688238ba8..99020283474ff17281fc2b58f80fb3c4134e03c3 100644 (file)
@@ -27,8 +27,6 @@
 #include <core/producer/frame/frame_transform.h>\r
 #include <common/diagnostics/graph.h>\r
 \r
-#include <tbb/cache_aligned_allocator.h>\r
-\r
 #include <boost/range/adaptors.hpp>\r
 #include <boost/range/distance.hpp>\r
 \r
index 760e116924b08d54629ddee3f54983f07b0a1726..753125316523ce110e3dcaa8c557a1348df723a2 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/forward.h>\r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <core/producer/frame/frame_visitor.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
 #include <tbb/cache_aligned_allocator.h>\r
 \r
 #include <vector>\r
 \r
-namespace caspar {\r
-       \r
-namespace diagnostics {\r
-       \r
-class graph;\r
-\r
-}\r
-\r
-namespace core {\r
+FORWARD2(caspar, diagnostics, class graph);\r
 \r
-struct video_format_desc;\r
-       \r
+namespace caspar { namespace core {\r
+               \r
 typedef std::vector<int32_t, tbb::cache_aligned_allocator<int32_t>> audio_buffer;\r
 \r
-class audio_mixer sealed : public core::frame_visitor, boost::noncopyable\r
+class audio_mixer sealed : public frame_visitor\r
 {\r
+       CASPAR_NO_COPY(audio_mixer);\r
 public:\r
        audio_mixer(const safe_ptr<diagnostics::graph>& graph);\r
 \r
@@ -54,7 +47,7 @@ public:
        virtual void visit(core::write_frame& frame);\r
        virtual void end();\r
 \r
-       audio_buffer operator()(const video_format_desc& format_desc);\r
+       audio_buffer operator()(const struct video_format_desc& format_desc);\r
        \r
 private:\r
        struct impl;\r
index a24f2cbd1d5f8ba30a783c372e219715d8032e3a..03180e8c78fc58ce8abc6afb21d30e48685c79e3 100644 (file)
@@ -23,7 +23,6 @@
 \r
 #include <algorithm>\r
 #include <vector>\r
-\r
 #include <stdint.h>\r
 \r
 #include <tbb/cache_aligned_allocator.h>\r
@@ -31,7 +30,7 @@
 namespace caspar { namespace core {\r
        \r
 template<typename T>\r
-static std::vector<int8_t, tbb::cache_aligned_allocator<int8_t>> audio_32_to_24(const T& audio_data)\r
+std::vector<int8_t, tbb::cache_aligned_allocator<int8_t>> audio_32_to_24(const T& audio_data)\r
 {      \r
        auto size                = std::distance(std::begin(audio_data), std::end(audio_data));\r
        auto input8              = reinterpret_cast<const int8_t*>(&(*std::begin(audio_data)));\r
@@ -49,7 +48,7 @@ static std::vector<int8_t, tbb::cache_aligned_allocator<int8_t>> audio_32_to_24(
 }\r
 \r
 template<typename T>\r
-static std::vector<int16_t, tbb::cache_aligned_allocator<int16_t>> audio_32_to_16(const T& audio_data)\r
+std::vector<int16_t, tbb::cache_aligned_allocator<int16_t>> audio_32_to_16(const T& audio_data)\r
 {      \r
        auto size                = std::distance(std::begin(audio_data), std::end(audio_data));\r
        auto input32     = &(*std::begin(audio_data));\r
index c6dce8ddd37352b02ffa196ca086e5e1fd80f72b..dd4807832e87b90d733def7fd7120264f96e31c8 100644 (file)
@@ -53,7 +53,6 @@ struct device_buffer::impl : boost::noncopyable
        const int stride_;\r
 \r
        fence            fence_;\r
-\r
 public:\r
        impl(int width, int height, int stride) \r
                : width_(width)\r
index 6e5b113d1c738318a8778ef2d31e184cea271904..d6ce8eaabbaf8e139f2ffbd4576b67804a458b03 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
-#include <memory>\r
-\r
 namespace caspar { namespace core {\r
                \r
-class device_buffer : boost::noncopyable\r
+class device_buffer\r
 {\r
-public:\r
-       \r
+       CASPAR_NO_COPY(device_buffer);\r
+public:        \r
        int stride() const;     \r
        int width() const;\r
        int height() const;\r
index 075a60c6376af7f961612a66b4d7436e7efbcf0b..4809c1b243fb529e5ba6cb24aa5ef16becc78d3b 100644 (file)
@@ -25,8 +25,6 @@
 \r
 namespace caspar { namespace core {\r
        \r
-class ogl_device;\r
-\r
 // Used to avoid blocking ogl thread for async operations. \r
 // This is imported when several objects use the same ogl context.\r
 // Based on http://www.opengl.org/registry/specs/ARB/sync.txt.\r
@@ -36,7 +34,7 @@ public:
        fence();\r
        void set();\r
        bool ready() const;\r
-       void wait(ogl_device& ogl);\r
+       void wait(class ogl_device& ogl);\r
 private:\r
        struct impl;\r
        std::shared_ptr<impl> impl_;\r
index 0edbef4a521f34f40e3f39967b25eaa9aae4488e..cc82e69675c4f1926eb959dc1098fbed2ee5ed86 100644 (file)
 \r
 #pragma once\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 namespace caspar { namespace core {\r
-\r
-class ogl_device;\r
-               \r
-class host_buffer : boost::noncopyable\r
+                       \r
+class host_buffer\r
 {\r
+       CASPAR_NO_COPY(host_buffer);\r
 public:\r
        enum usage_t\r
        {\r
@@ -50,7 +48,7 @@ public:
        \r
        void begin_read(int width, int height, unsigned int format);\r
        bool ready() const;\r
-       void wait(ogl_device& ogl);\r
+       void wait(class ogl_device& ogl);\r
 private:\r
        friend class ogl_device;\r
        host_buffer(int size, usage_t usage);\r
index 29d627ce042803ab27824f716b769293a77496e2..8df015a9abacd270f4d256852c4c648686e91b30 100644 (file)
@@ -28,9 +28,9 @@
 #include "shader.h"\r
 \r
 #include <common/exception/exceptions.h>\r
-#include <common/utility/assert.h>\r
 #include <common/gl/gl_check.h>\r
 \r
+#include <boost/assert.hpp>\r
 #include <boost/foreach.hpp>\r
 \r
 #include <gl/glew.h>\r
@@ -116,8 +116,8 @@ safe_ptr<device_buffer> ogl_device::allocate_device_buffer(int width, int height
                                \r
 safe_ptr<device_buffer> ogl_device::create_device_buffer(int width, int height, int stride)\r
 {\r
-       CASPAR_VERIFY(stride > 0 && stride < 5);\r
-       CASPAR_VERIFY(width > 0 && height > 0);\r
+       BOOST_VERIFY(stride > 0 && stride < 5);\r
+       BOOST_VERIFY(width > 0 && height > 0);\r
        auto& pool = device_pools_[stride-1][((width << 16) & 0xFFFF0000) | (height & 0x0000FFFF)];\r
        std::shared_ptr<device_buffer> buffer;\r
        if(!pool->items.try_pop(buffer))                \r
@@ -169,8 +169,8 @@ safe_ptr<host_buffer> ogl_device::allocate_host_buffer(int size, host_buffer::us
        \r
 safe_ptr<host_buffer> ogl_device::create_host_buffer(int size, host_buffer::usage_t usage)\r
 {\r
-       CASPAR_VERIFY(usage == host_buffer::write_only || usage == host_buffer::read_only);\r
-       CASPAR_VERIFY(size > 0);\r
+       BOOST_VERIFY(usage == host_buffer::write_only || usage == host_buffer::read_only);\r
+       BOOST_VERIFY(size > 0);\r
        auto& pool = host_pools_[usage][size];\r
        std::shared_ptr<host_buffer> buffer;\r
        if(!pool->items.try_pop(buffer))        \r
index 98cf080d17bf9e6ec7e3162df3bd569c18e840d5..e5ae7a08b20575c338c6a0e80637b0f5aea6b318 100644 (file)
@@ -24,6 +24,8 @@
 #include "host_buffer.h"\r
 #include "device_buffer.h"\r
 \r
+#include <common/forward.h>\r
+#include <common/no_copy.h>\r
 #include <common/concurrency/executor.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <tbb/concurrent_unordered_map.h>\r
 #include <tbb/concurrent_queue.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-#include <boost/thread/future.hpp>\r
-\r
 #include <array>\r
 #include <unordered_map>\r
 \r
+FORWARD1(boost, template<typename> class unique_future);\r
+\r
 namespace caspar { namespace core {\r
 \r
 class shader;\r
@@ -47,6 +48,8 @@ class shader;
 template<typename T>\r
 struct buffer_pool\r
 {\r
+       CASPAR_NO_COPY(buffer_pool);\r
+\r
        tbb::atomic<int> usage_count;\r
        tbb::atomic<int> flush_count;\r
        tbb::concurrent_bounded_queue<std::shared_ptr<T>> items;\r
@@ -58,8 +61,10 @@ struct buffer_pool
        }\r
 };\r
 \r
-class ogl_device : public std::enable_shared_from_this<ogl_device>, boost::noncopyable\r
+class ogl_device : public std::enable_shared_from_this<ogl_device>\r
 {      \r
+       CASPAR_NO_COPY(ogl_device);\r
+\r
        std::unordered_map<GLenum, bool> caps_;\r
        std::array<int, 4>                               viewport_;\r
        std::array<int, 4>                               scissor_;\r
index 5628f82878ed807b370a0630eb755414668dfa8a..6a60a6cfabe5228a2a16c3ba096655b711d04a47 100644 (file)
@@ -33,6 +33,8 @@ namespace caspar { namespace core {
 \r
 struct shader::impl : boost::noncopyable\r
 {\r
+       CASPAR_NO_COPY(impl);\r
+\r
        GLuint program_;\r
        std::unordered_map<std::string, GLint> locations_;\r
 public:\r
index 3d079939780dc72cb270c4c196769f51cd13d9e5..f7c5f47a08687df772b6081a9ffd82676af55d4f 100644 (file)
 \r
 #pragma once\r
 \r
-#include <string>\r
-\r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
+#include <string>\r
 \r
 namespace caspar { namespace core {\r
                \r
-class shader : boost::noncopyable\r
+class shader\r
 {\r
+       CASPAR_NO_COPY(shader);\r
 public:\r
        shader(const std::string& vertex_source_str, const std::string& fragment_source_str);\r
        void set(const std::string& name, bool value);\r
index 340a2b43569787090e9a8bb59c4f76724e9b3867..04a51b5041384ec5e80def03d752a846dedcab38 100644 (file)
@@ -27,7 +27,7 @@
 \r
 namespace caspar { namespace core {\r
                \r
-blend_mode::type get_blend_mode(const std::wstring& str)\r
+blend_mode get_blend_mode(const std::wstring& str)\r
 {\r
        if(boost::iequals(str, L"normal"))\r
                return blend_mode::normal;\r
index 6690ee89cc8a9803e12b1116c2b931d9d10eb21b..67deb59afb6fd7b79b155ab9c95378c6c8f2b534 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/enum_class.h>\r
+\r
 namespace caspar { namespace core {\r
                \r
-struct blend_mode\r
+CASPAR_BEGIN_ENUM_CLASS\r
 {\r
-       enum type \r
-       {\r
-               normal = 0,\r
-               lighten,\r
-               darken,\r
-               multiply,\r
-               average,\r
-               add,\r
-               subtract,\r
-               difference,\r
-               negation,\r
-               exclusion,\r
-               screen,\r
-               overlay,\r
-               soft_light,\r
-               hard_light,\r
-               color_dodge,\r
-               color_burn,\r
-               linear_dodge,\r
-               linear_burn,\r
-               linear_light,\r
-               vivid_light,\r
-               pin_light,\r
-               hard_mix,\r
-               reflect,\r
-               glow,\r
-               phoenix,\r
-               contrast,\r
-               saturation,\r
-               color,\r
-               luminosity,\r
-               mix,\r
-               blend_mode_count \r
-       };\r
-};\r
+       normal = 0,\r
+       lighten,\r
+       darken,\r
+       multiply,\r
+       average,\r
+       add,\r
+       subtract,\r
+       difference,\r
+       negation,\r
+       exclusion,\r
+       screen,\r
+       overlay,\r
+       soft_light,\r
+       hard_light,\r
+       color_dodge,\r
+       color_burn,\r
+       linear_dodge,\r
+       linear_burn,\r
+       linear_light,\r
+       vivid_light,\r
+       pin_light,\r
+       hard_mix,\r
+       reflect,\r
+       glow,\r
+       phoenix,\r
+       contrast,\r
+       saturation,\r
+       color,\r
+       luminosity,\r
+       mix,\r
+       blend_mode_count \r
+}\r
+CASPAR_END_ENUM_CLASS(blend_mode)\r
 \r
-blend_mode::type get_blend_mode(const std::wstring& str);\r
+blend_mode get_blend_mode(const std::wstring& str);\r
 \r
 }}
\ No newline at end of file
index 1677da14b3feec827aebd324d050d5ff62c43fd6..d58bfa6b6b28be3b893686a6dc49d2c01071fc48 100644 (file)
@@ -38,7 +38,7 @@
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/frame_transform.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
+#include <boost/assert.hpp>\r
 \r
 namespace caspar { namespace core {\r
        \r
@@ -56,6 +56,8 @@ GLubyte lower_pattern[] = {
 \r
 struct image_kernel::impl : boost::noncopyable\r
 {      \r
+       CASPAR_NO_COPY(impl);\r
+\r
        safe_ptr<ogl_device>    ogl_;\r
        safe_ptr<shader>                shader_;\r
        bool                                    blend_modes_;\r
@@ -70,7 +72,7 @@ struct image_kernel::impl : boost::noncopyable
        {\r
                static const double epsilon = 0.001;\r
 \r
-               CASPAR_ASSERT(params.pix_desc.planes.size() == params.textures.size());\r
+               BOOST_ASSERT(params.pix_desc.planes.size() == params.textures.size());\r
 \r
                if(params.textures.empty() || !params.background)\r
                        return;\r
@@ -108,7 +110,7 @@ struct image_kernel::impl : boost::noncopyable
                shader_->set("is_hd",                   params.pix_desc.planes.at(0).height > 700 ? 1 : 0);\r
                shader_->set("has_local_key",   params.local_key);\r
                shader_->set("has_layer_key",   params.layer_key);\r
-               shader_->set("pixel_format",    params.pix_desc.pix_fmt);       \r
+               shader_->set("pixel_format",    params.pix_desc.pix_fmt.value());       \r
                shader_->set("opacity",                 params.transform.is_key ? 1.0 : params.transform.opacity);      \r
                \r
                // Setup blend_func\r
@@ -121,12 +123,12 @@ struct image_kernel::impl : boost::noncopyable
                        params.background->bind(6);\r
 \r
                        shader_->set("background",      texture_id::background);\r
-                       shader_->set("blend_mode",      params.blend_mode);\r
-                       shader_->set("keyer",           params.keyer);\r
+                       shader_->set("blend_mode",      params.blend_mode.value());\r
+                       shader_->set("keyer",           params.keyer.value());\r
                }\r
                else\r
                {\r
-                       switch(params.keyer)\r
+                       switch(params.keyer.value())\r
                        {\r
                        case keyer::additive:\r
                                ogl_->blend_func(GL_ONE, GL_ONE);       \r
index 1d5902d6914eb643f6d6209ab5a4ab1b45a83d7f..e8221978ee29bcd7769577d0ff08615e0aff06ca 100644 (file)
 \r
 #include "blend_modes.h"\r
 \r
+#include <common/no_copy.h>\r
+#include <common/enum_class.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/producer/frame/frame_transform.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
 namespace caspar { namespace core {\r
        \r
-class device_buffer;\r
-class ogl_device;\r
-\r
-struct keyer\r
+CASPAR_BEGIN_ENUM_CLASS\r
 {\r
-       enum type\r
-       {\r
-               linear = 0,\r
-               additive\r
-       };\r
-};\r
+       linear = 0,\r
+       additive\r
+}\r
+CASPAR_END_ENUM_CLASS(keyer)\r
 \r
-struct draw_params\r
+struct draw_params sealed\r
 {\r
-       pixel_format_desc                                               pix_desc;\r
-       std::vector<safe_ptr<device_buffer>>    textures;\r
-       frame_transform                                                 transform;\r
-       blend_mode::type                                                blend_mode;\r
-       keyer::type                                                             keyer;\r
-       std::shared_ptr<device_buffer>                  background;\r
-       std::shared_ptr<device_buffer>                  local_key;\r
-       std::shared_ptr<device_buffer>                  layer_key;\r
+       pixel_format_desc                                                       pix_desc;\r
+       std::vector<safe_ptr<class device_buffer>>      textures;\r
+       frame_transform                                                         transform;\r
+       blend_mode                                                                      blend_mode;\r
+       keyer                                                                           keyer;\r
+       std::shared_ptr<class device_buffer>            background;\r
+       std::shared_ptr<class device_buffer>            local_key;\r
+       std::shared_ptr<class device_buffer>            layer_key;\r
 \r
        draw_params() \r
                : blend_mode(blend_mode::normal)\r
@@ -62,10 +57,11 @@ struct draw_params
        }\r
 };\r
 \r
-class image_kernel sealed : boost::noncopyable\r
+class image_kernel sealed\r
 {\r
+       CASPAR_NO_COPY(image_kernel);\r
 public:\r
-       image_kernel(const safe_ptr<ogl_device>& ogl);\r
+       image_kernel(const safe_ptr<class ogl_device>& ogl);\r
        void draw(draw_params&& params);\r
 private:\r
        struct impl;\r
index 30a39d4b9d40bb5a45617b24672ccbd13a0c88d1..8edce30c04a40004d111897fecb5fb559d28e845 100644 (file)
@@ -29,9 +29,7 @@
 #include "../gpu/host_buffer.h"\r
 #include "../gpu/device_buffer.h"\r
 \r
-#include <common/exception/exceptions.h>\r
 #include <common/gl/gl_check.h>\r
-#include <common/utility/move_on_copy.h>\r
 \r
 #include <core/producer/frame/frame_transform.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 \r
 #include <boost/foreach.hpp>\r
 #include <boost/range/algorithm_ext/erase.hpp>\r
+#include <boost/thread/future.hpp>\r
 \r
 #include <algorithm>\r
-#include <deque>\r
+#include <vector>\r
 \r
 using namespace boost::assign;\r
 \r
@@ -56,7 +55,7 @@ struct item
        frame_transform                                                 transform;\r
 };\r
 \r
-typedef std::pair<blend_mode::type, std::vector<item>> layer;\r
+typedef std::pair<blend_mode, std::vector<item>> layer;\r
 \r
 class image_renderer\r
 {\r
@@ -92,13 +91,13 @@ private:
                        BOOST_FOREACH(auto& layer, upper)\r
                        {\r
                                BOOST_FOREACH(auto& item, layer.second)\r
-                                       item.transform.field_mode = static_cast<field_mode::type>(item.transform.field_mode & field_mode::upper);\r
+                                       item.transform.field_mode = static_cast<field_mode>(item.transform.field_mode & field_mode::upper);\r
                        }\r
 \r
                        BOOST_FOREACH(auto& layer, lower)\r
                        {\r
                                BOOST_FOREACH(auto& item, layer.second)\r
-                                       item.transform.field_mode = static_cast<field_mode::type>(item.transform.field_mode & field_mode::lower);\r
+                                       item.transform.field_mode = static_cast<field_mode>(item.transform.field_mode & field_mode::lower);\r
                        }\r
 \r
                        draw(std::move(upper), draw_buffer, format_desc);\r
@@ -213,7 +212,7 @@ private:
 \r
        void draw_mixer_buffer(safe_ptr<device_buffer>&                 draw_buffer, \r
                                                   std::shared_ptr<device_buffer>&& source_buffer, \r
-                                                  blend_mode::type                                     blend_mode = blend_mode::normal)\r
+                                                  blend_mode                                           blend_mode = blend_mode::normal)\r
        {\r
                if(!source_buffer)\r
                        return;\r
@@ -251,7 +250,7 @@ public:
        {\r
        }\r
 \r
-       void begin_layer(blend_mode::type blend_mode)\r
+       void begin_layer(blend_mode blend_mode)\r
        {\r
                layers_.push_back(std::make_pair(blend_mode, std::vector<item>()));\r
        }\r
@@ -291,7 +290,7 @@ void image_mixer::begin(basic_frame& frame){impl_->begin(frame);}
 void image_mixer::visit(write_frame& frame){impl_->visit(frame);}\r
 void image_mixer::end(){impl_->end();}\r
 boost::unique_future<safe_ptr<host_buffer>> image_mixer::operator()(const video_format_desc& format_desc){return impl_->render(format_desc);}\r
-void image_mixer::begin_layer(blend_mode::type blend_mode){impl_->begin_layer(blend_mode);}\r
+void image_mixer::begin_layer(blend_mode blend_mode){impl_->begin_layer(blend_mode);}\r
 void image_mixer::end_layer(){impl_->end_layer();}\r
 \r
 }}
\ No newline at end of file
index 7ca5a5f5ff5ec1791712f85621a9720ff655bb9a..8aef1d686eb9746bb6221567526827271982b7b3 100644 (file)
 \r
 #include "blend_modes.h"\r
 \r
+#include <common/forward.h>\r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <core/producer/frame/frame_visitor.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
-#include <boost/thread/future.hpp>\r
+FORWARD1(boost, template<typename> class unique_future);\r
 \r
 namespace caspar { namespace core {\r
-\r
-class write_frame;\r
-class host_buffer;\r
-class ogl_device;\r
-struct video_format_desc;\r
-struct pixel_format_desc;\r
-\r
-class image_mixer sealed : public core::frame_visitor, boost::noncopyable\r
+       \r
+class image_mixer sealed : public frame_visitor\r
 {\r
+       CASPAR_NO_COPY(image_mixer);\r
 public:\r
-       image_mixer(const safe_ptr<ogl_device>& ogl);\r
+       image_mixer(const safe_ptr<class ogl_device>& ogl);\r
        \r
-       virtual void begin(core::basic_frame& frame);\r
-       virtual void visit(core::write_frame& frame);\r
+       virtual void begin(class basic_frame& frame);\r
+       virtual void visit(class write_frame& frame);\r
        virtual void end();\r
 \r
-       void begin_layer(blend_mode::type blend_mode);\r
+       void begin_layer(blend_mode blend_mode);\r
        void end_layer();\r
                \r
-       boost::unique_future<safe_ptr<host_buffer>> operator()(const video_format_desc& format_desc);\r
+       boost::unique_future<safe_ptr<class host_buffer>> operator()(const struct video_format_desc& format_desc);\r
                \r
 private:\r
        struct impl;\r
index 9aa8a8f942ea8372ad2aaf548fcff33cb3b5b19c..a11f87660ac63b89c9a6045b4906941b088cf756 100644 (file)
@@ -30,7 +30,9 @@
 #include "image/image_mixer.h"\r
 \r
 #include <common/env.h>\r
+#include <common/no_copy.h>\r
 #include <common/concurrency/executor.h>\r
+#include <common/diagnostics/graph.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/gl/gl_check.h>\r
 #include <common/utility/tweener.h>\r
@@ -41,7 +43,6 @@
 #include <core/producer/frame/frame_factory.h>\r
 #include <core/producer/frame/frame_transform.h>\r
 #include <core/producer/frame/pixel_format.h>\r
-\r
 #include <core/video_format.h>\r
 \r
 #include <boost/foreach.hpp>\r
@@ -59,18 +60,20 @@ namespace caspar { namespace core {
                \r
 struct mixer::impl : boost::noncopyable\r
 {              \r
-       safe_ptr<mixer::target_t>                                       target_;\r
+       CASPAR_NO_COPY(impl);\r
+\r
+       safe_ptr<mixer::target_t>                       target_;\r
 \r
-       safe_ptr<diagnostics::graph>                            graph_;\r
-       boost::timer                                                            mix_timer_;     \r
+       safe_ptr<diagnostics::graph>            graph_;\r
+       boost::timer                                            mix_timer_;     \r
 \r
-       video_format_desc                                                       format_desc_;\r
-       safe_ptr<ogl_device>                                            ogl_;\r
+       video_format_desc                                       format_desc_;\r
+       safe_ptr<ogl_device>                            ogl_;\r
        \r
-       audio_mixer                                                                     audio_mixer_;\r
-       image_mixer                                                                     image_mixer_;\r
+       audio_mixer                                                     audio_mixer_;\r
+       image_mixer                                                     image_mixer_;\r
        \r
-       std::unordered_map<int, blend_mode::type>       blend_modes_;\r
+       std::unordered_map<int, blend_mode>     blend_modes_;\r
                        \r
        executor executor_;\r
 \r
@@ -123,11 +126,15 @@ public:
                });             \r
        }\r
                                        \r
-       void set_blend_mode(int index, blend_mode::type value)\r
+       void set_blend_mode(int index, blend_mode value)\r
        {\r
                executor_.begin_invoke([=]\r
                {\r
-                       blend_modes_[index] = value;\r
+                       auto it = blend_modes_.find(index);\r
+                       if(it == blend_modes_.end())\r
+                               blend_modes_.insert(std::make_pair(index, value));\r
+                       else\r
+                               it->second = value;\r
                }, high_priority);\r
        }\r
        \r
@@ -150,7 +157,7 @@ public:
 mixer::mixer(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc, const safe_ptr<ogl_device>& ogl) \r
        : impl_(new impl(target, graph, format_desc, ogl)){}\r
 void mixer::send(const std::pair<std::map<int, safe_ptr<core::basic_frame>>, std::shared_ptr<void>>& frames){ impl_->send(frames);}\r
-void mixer::set_blend_mode(int index, blend_mode::type value){impl_->set_blend_mode(index, value);}\r
+void mixer::set_blend_mode(int index, blend_mode value){impl_->set_blend_mode(index, value);}\r
 void mixer::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
 boost::unique_future<boost::property_tree::wptree> mixer::info() const{return impl_->info();}\r
 }}
\ No newline at end of file
index 8e5c7003479eae7cad9572c1ecae8a124b77c408..be0b9ef72aa460714d47b7a448030cfa8ca80ed8 100644 (file)
 \r
 #include "image/blend_modes.h"\r
 \r
-#include "../producer/frame/frame_factory.h"\r
-\r
+#include <common/no_copy.h>\r
+#include <common/forward.h>\r
 #include <common/memory/safe_ptr.h>\r
 #include <common/concurrency/target.h>\r
-#include <common/diagnostics/graph.h>\r
 \r
 #include <boost/property_tree/ptree_fwd.hpp>\r
-#include <boost/thread/future.hpp>\r
 \r
 #include <map>\r
 \r
-namespace caspar { \r
+FORWARD2(caspar, diagnostics, class graph);\r
+FORWARD1(boost, template<typename> class unique_future);\r
 \r
-class executor;\r
+namespace caspar { namespace core {\r
        \r
-namespace core {\r
-\r
-class read_frame;\r
-class write_frame;\r
-class basic_frame;\r
-class ogl_device;\r
-struct frame_transform;\r
-struct pixel_format;\r
-\r
-class mixer sealed : public target<std::pair<std::map<int, safe_ptr<core::basic_frame>>, std::shared_ptr<void>>>\r
+class mixer sealed : public target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>>\r
 {\r
+       CASPAR_NO_COPY(mixer);\r
 public:        \r
-       typedef target<std::pair<safe_ptr<read_frame>, std::shared_ptr<void>>> target_t;\r
+       typedef target<std::pair<safe_ptr<class read_frame>, std::shared_ptr<void>>> target_t;\r
 \r
-       explicit mixer(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc, const safe_ptr<ogl_device>& ogl);\r
+       explicit mixer(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc, const safe_ptr<class ogl_device>& ogl);\r
                \r
        // target\r
 \r
-       virtual void send(const std::pair<std::map<int, safe_ptr<basic_frame>>, std::shared_ptr<void>>& frames) override; \r
+       virtual void send(const std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>& frames) override; \r
                \r
        // mixer\r
                \r
-       void set_video_format_desc(const video_format_desc& format_desc);\r
+       void set_video_format_desc(const struct video_format_desc& format_desc);\r
        \r
-       void set_blend_mode(int index, blend_mode::type value);\r
+       void set_blend_mode(int index, blend_mode value);\r
 \r
        boost::unique_future<boost::property_tree::wptree> info() const;\r
        \r
index 1ed63799fb1d080baa2eb64a607b23b298a781ca..20db1b191e9d6a303c3c724f7e2c8c9a8161178b 100644 (file)
@@ -33,6 +33,8 @@ namespace caspar { namespace core {
                                                                                                                                                                                                                                                                                                                        \r
 struct read_frame::impl : boost::noncopyable\r
 {\r
+       CASPAR_NO_COPY(impl);\r
+\r
        safe_ptr<ogl_device>            ogl_;\r
        int                                                     width_;\r
        int                                                     height_;\r
@@ -106,7 +108,7 @@ int read_frame::height() const{return impl_ ? impl_->height_ : 0;}
 //     auto height             = 720;\r
 //     auto width4             = frame->image_data().size()/height;\r
 //\r
-//     CASPAR_ASSERT(frame->image_data().size() % height == 0);\r
+//     BOOST_ASSERT(frame->image_data().size() % height == 0);\r
 //                     \r
 //     tbb::affinity_partitioner ap;\r
 //     tbb::parallel_for(tbb::blocked_range<int>(0, height), [&](tbb::blocked_range<int>& r)\r
index d72f07b71e2703f2caba5aaa8977a3bdf47cc7d6..18d9bb50434b2c91a6249f073050d8732eeb3ecf 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
 #include <core/mixer/audio/audio_mixer.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/range/iterator_range.hpp>\r
 \r
-#include <cstdint>\r
+#include <stdint.h>\r
 #include <memory>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
        \r
-class host_buffer;\r
-class ogl_device;\r
-\r
-class read_frame sealed : boost::noncopyable\r
+class read_frame sealed\r
 {\r
+       CASPAR_NO_COPY(read_frame);\r
 public:\r
        read_frame();\r
-       read_frame(const safe_ptr<ogl_device>& ogl, int width, int height, safe_ptr<host_buffer>&& image_data, audio_buffer&& audio_data);\r
+       read_frame(const safe_ptr<class ogl_device>& ogl, int width, int height, safe_ptr<class host_buffer>&& image_data, audio_buffer&& audio_data);\r
 \r
        const boost::iterator_range<const uint8_t*> image_data();\r
        const boost::iterator_range<const int32_t*> audio_data();\r
index 78f2c3d604a17ba64bce3a5fe57ee0e1838f1bfb..7646c5acda04596dee32099726ab56e6159c260e 100644 (file)
@@ -27,6 +27,8 @@
 #include "gpu/host_buffer.h"\r
 #include "gpu/device_buffer.h"\r
 \r
+#include <common/no_copy.h>\r
+\r
 #include <core/producer/frame/frame_visitor.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 \r
 namespace caspar { namespace core {\r
                                                                                                                                                                                                                                                                                                                        \r
 struct write_frame::impl\r
-{                              \r
+{                      \r
        std::shared_ptr<ogl_device>                                     ogl_;\r
        std::vector<std::shared_ptr<host_buffer>>       buffers_;\r
        std::vector<safe_ptr<device_buffer>>            textures_;\r
        audio_buffer                                                            audio_data_;\r
        const core::pixel_format_desc                           desc_;\r
        const void*                                                                     tag_;\r
-       core::field_mode::type                                          mode_;\r
+       core::field_mode                                                        mode_;\r
 \r
        impl(const void* tag)\r
                : tag_(tag)\r
+               , mode_(core::field_mode::empty)\r
        {\r
        }\r
 \r
@@ -134,8 +137,8 @@ const core::pixel_format_desc& write_frame::get_pixel_format_desc() const{return
 const std::vector<safe_ptr<device_buffer>>& write_frame::get_textures() const{return impl_->textures_;}\r
 void write_frame::commit(int plane_index){impl_->commit(plane_index);}\r
 void write_frame::commit(){impl_->commit();}\r
-void write_frame::set_type(const field_mode::type& mode){impl_->mode_ = mode;}\r
-core::field_mode::type write_frame::get_type() const{return impl_->mode_;}\r
+void write_frame::set_type(const field_mode& mode){impl_->mode_ = mode;}\r
+core::field_mode write_frame::get_type() const{return impl_->mode_;}\r
 void write_frame::accept(core::frame_visitor& visitor){impl_->accept(*this, visitor);}\r
 \r
 }}
\ No newline at end of file
index 0702f1e97d5a97304000f5561f308a912b846b68..fa2011d1c8c6e8835fd60167ccd781afface99ee 100644 (file)
 #include <core/video_format.h>\r
 #include <core/mixer/audio/audio_mixer.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/range/iterator_range.hpp>\r
 \r
-#include <cstdint>\r
+#include <stdint.h>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
-\r
-class device_buffer;\r
-struct frame_visitor;\r
-struct pixel_format_desc;\r
-class ogl_device;      \r
-\r
-class write_frame sealed : public core::basic_frame, boost::noncopyable\r
+       \r
+class write_frame sealed : public core::basic_frame\r
 {\r
 public:        \r
        explicit write_frame(const void* tag);\r
-       explicit write_frame(const safe_ptr<ogl_device>& ogl, const void* tag, const core::pixel_format_desc& desc);\r
+       explicit write_frame(const safe_ptr<class ogl_device>& ogl, const void* tag, const struct pixel_format_desc& desc);\r
 \r
        write_frame(const write_frame& other);\r
        write_frame(write_frame&& other);\r
@@ -54,7 +48,7 @@ public:
                        \r
        // basic_frame\r
 \r
-       virtual void accept(frame_visitor& visitor) override;\r
+       virtual void accept(struct frame_visitor& visitor) override;\r
 \r
        // write _frame\r
 \r
@@ -66,17 +60,17 @@ public:
        void commit(int plane_index);\r
        void commit();\r
        \r
-       void set_type(const field_mode::type& mode);\r
-       field_mode::type get_type() const;\r
+       void set_type(const field_mode& mode);\r
+       field_mode get_type() const;\r
        \r
        const void* tag() const;\r
 \r
-       const core::pixel_format_desc& get_pixel_format_desc() const;\r
+       const struct pixel_format_desc& get_pixel_format_desc() const;\r
        \r
 private:\r
        friend class image_mixer;\r
        \r
-       const std::vector<safe_ptr<device_buffer>>& get_textures() const;\r
+       const std::vector<safe_ptr<class device_buffer>>& get_textures() const;\r
 \r
        struct impl;\r
        safe_ptr<impl> impl_;\r
index e259421428ff3294138b649f4461dace8fc8a9de..1528372cea663515063c4ec0e6d867a52a42e4da 100644 (file)
@@ -27,6 +27,7 @@
 #include "../../consumer/output.h"\r
 #include "../../video_channel.h"\r
 \r
+#include "../frame_producer.h"\r
 #include "../frame/basic_frame.h"\r
 #include "../frame/frame_factory.h"\r
 #include "../frame/pixel_format.h"\r
@@ -34,6 +35,7 @@
 #include "../../mixer/read_frame.h"\r
 \r
 #include <common/exception/exceptions.h>\r
+#include <common/no_copy.h>\r
 \r
 #include <asmlib.h>\r
 \r
@@ -43,6 +45,8 @@ namespace caspar { namespace core {
 \r
 class channel_consumer : public frame_consumer\r
 {      \r
+       CASPAR_NO_COPY(channel_consumer);\r
+\r
        tbb::concurrent_bounded_queue<std::shared_ptr<read_frame>>      frame_buffer_;\r
        core::video_format_desc                                                                         format_desc_;\r
        int                                                                                                                     channel_index_;\r
@@ -127,6 +131,8 @@ public:
        \r
 class channel_producer : public frame_producer\r
 {\r
+       CASPAR_NO_COPY(channel_producer);\r
+\r
        const safe_ptr<frame_factory>           frame_factory_;\r
        const safe_ptr<channel_consumer>        consumer_;\r
 \r
@@ -210,7 +216,7 @@ public:
        }\r
 };\r
 \r
-safe_ptr<frame_producer> create_channel_producer(const safe_ptr<core::frame_factory>& frame_factory, const safe_ptr<video_channel>& channel)\r
+safe_ptr<core::frame_producer> create_channel_producer(const safe_ptr<core::frame_factory>& frame_factory, const safe_ptr<core::video_channel>& channel)\r
 {\r
        return create_producer_print_proxy(\r
                        make_safe<channel_producer>(frame_factory, channel));\r
index 6d39ce6a61f44c400f7bcee56296a8a6e9589611..67ed043ede58eb487d10ebb158fd9ff4e69b925c 100644 (file)
 \r
 #pragma once\r
 \r
-#include "../frame_producer.h"\r
+#include "../../video_channel.h"\r
+\r
+#include <common/memory/safe_ptr.h>\r
 \r
 #include <string>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
-\r
-class video_channel;\r
-struct frame_factory;\r
-\r
-safe_ptr<frame_producer> create_channel_producer(const safe_ptr<core::frame_factory>& frame_factory, const safe_ptr<video_channel>& channel);\r
+       \r
+safe_ptr<struct frame_producer> create_channel_producer(const safe_ptr<struct frame_factory>& frame_factory, const safe_ptr<video_channel>& channel);\r
 \r
 }}\r
index e1178862acd18c73b1f68704160fd9c12ba05b89..a07fb845b1b4fcf50bd034b2bdfc0c961da94e53 100644 (file)
@@ -29,6 +29,7 @@
 #include "../frame/pixel_format.h"\r
 #include "../../mixer/write_frame.h"\r
 \r
+#include <common/no_copy.h>\r
 #include <common/exception/exceptions.h>\r
 \r
 #include <boost/algorithm/string.hpp>\r
@@ -39,6 +40,8 @@ namespace caspar { namespace core {
        \r
 class color_producer : public frame_producer\r
 {\r
+       CASPAR_NO_COPY(color_producer);\r
+\r
        safe_ptr<basic_frame> frame_;\r
        const std::wstring color_str_;\r
 \r
@@ -115,7 +118,7 @@ std::wstring get_hex_color(const std::wstring& str)
        return str;\r
 }\r
 \r
-safe_ptr<frame_producer> create_color_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::vector<std::wstring>& params)\r
+safe_ptr<frame_producer> create_color_producer(const safe_ptr<frame_factory>& frame_factory, const std::vector<std::wstring>& params)\r
 {\r
        if(params.size() < 0)\r
                return core::frame_producer::empty();\r
@@ -127,7 +130,7 @@ safe_ptr<frame_producer> create_color_producer(const safe_ptr<core::frame_factor
        return create_producer_print_proxy(\r
                        make_safe<color_producer>(frame_factory, color2));\r
 }\r
-safe_ptr<core::write_frame> create_color_frame(void* tag, const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& color)\r
+safe_ptr<write_frame> create_color_frame(void* tag, const safe_ptr<frame_factory>& frame_factory, const std::wstring& color)\r
 {\r
        auto color2 = get_hex_color(color);\r
        if(color2.length() != 9 || color2[0] != '#')\r
index 82522d1fc98467401df11cdf837c578164aad966..ce6cfde36157e72777937ee242ffdddd080f46cf 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/memory/safe_ptr.h>\r
+\r
 #include <string>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
-\r
-class write_frame;\r
-struct frame_factory;\r
-struct frame_producer;\r
-\r
-safe_ptr<frame_producer> create_color_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
-safe_ptr<core::write_frame> create_color_frame(void* tag, const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& color);\r
+       \r
+safe_ptr<struct frame_producer> create_color_producer(const safe_ptr<struct frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
+safe_ptr<class write_frame> create_color_frame(void* tag, const safe_ptr<struct frame_factory>& frame_factory, const std::wstring& color);\r
 \r
 }}\r
index 60fb854806f858fc2723a0886499d4ccaa951070..e3bff589ffd8c82514e2baf370301596df957e49 100644 (file)
@@ -24,7 +24,6 @@
 #include "basic_frame.h"\r
 \r
 #include "frame_transform.h"\r
-#include "../../video_format.h"\r
 \r
 #include <boost/foreach.hpp>\r
 \r
@@ -34,19 +33,21 @@ struct basic_frame::impl
 {              \r
        std::vector<safe_ptr<basic_frame>> frames_;\r
 \r
-       frame_transform frame_transform_;       \r
-       \r
+       frame_transform frame_transform_;               \r
 public:\r
        impl(const std::vector<safe_ptr<basic_frame>>& frames) : frames_(frames) \r
        {\r
        }\r
+\r
        impl(std::vector<safe_ptr<basic_frame>>&& frames) : frames_(std::move(frames))\r
        {\r
        }\r
+\r
        impl(safe_ptr<basic_frame>&& frame) \r
        {\r
                frames_.push_back(std::move(frame));\r
        }\r
+\r
        impl(const safe_ptr<basic_frame>& frame)                \r
        { \r
                frames_.push_back(frame);\r
@@ -86,7 +87,7 @@ const frame_transform& basic_frame::get_frame_transform() const { return impl_->
 frame_transform& basic_frame::get_frame_transform() { return impl_->frame_transform_;}\r
 void basic_frame::accept(frame_visitor& visitor){impl_->accept(*this, visitor);}\r
 \r
-safe_ptr<basic_frame> basic_frame::interlace(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2, field_mode::type mode)\r
+safe_ptr<basic_frame> basic_frame::interlace(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2, field_mode mode)\r
 {                              \r
        if(frame1 == basic_frame::eof() || frame2 == basic_frame::eof())\r
                return basic_frame::eof();\r
index e207dc7f32a753e644426f34565970ff0ca1443f..54a290bc33d76c60bcc2000e37550e7c2f623027 100644 (file)
 \r
 #include <common/memory/safe_ptr.h>\r
 \r
-namespace caspar { namespace core {\r
-\r
-struct frame_transform;\r
+#include <vector>\r
 \r
+namespace caspar { namespace core {\r
+       \r
 class basic_frame\r
 {\r
 public:\r
@@ -47,10 +47,10 @@ public:
        \r
        void swap(basic_frame& other);\r
 \r
-       const frame_transform& get_frame_transform() const;\r
-       frame_transform& get_frame_transform();\r
+       const struct frame_transform& get_frame_transform() const;\r
+       struct frame_transform& get_frame_transform();\r
                                \r
-       static safe_ptr<basic_frame> interlace(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2, field_mode::type mode);\r
+       static safe_ptr<basic_frame> interlace(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2, field_mode mode);\r
        static safe_ptr<basic_frame> combine(const safe_ptr<basic_frame>& frame1, const safe_ptr<basic_frame>& frame2);\r
        static safe_ptr<basic_frame> fill_and_key(const safe_ptr<basic_frame>& fill, const safe_ptr<basic_frame>& key);\r
                \r
index 251f7780d300f00b2f544f92b436e0e2feeddb6f..3eb435ce46897c38f41a3dfcace18f6ed9e3994d 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/no_copy.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
 namespace caspar { namespace core {\r
-       \r
-class write_frame;\r
-struct pixel_format_desc;\r
-struct video_format_desc;\r
-               \r
-struct frame_factory : boost::noncopyable\r
+                       \r
+struct frame_factory\r
 {\r
-       virtual safe_ptr<write_frame> create_frame(const void* video_stream_tag, const pixel_format_desc& desc) = 0;    \r
-       \r
-       virtual video_format_desc get_video_format_desc() const = 0; // nothrow\r
+       CASPAR_NO_COPY(frame_factory);\r
+\r
+       frame_factory(){}\r
+\r
+       virtual safe_ptr<class write_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc) = 0;               \r
+       virtual struct video_format_desc get_video_format_desc() const = 0; // nothrow\r
 };\r
 \r
 }}
\ No newline at end of file
index 4532affe88702d9901bd944e68b6ae03ca0ae4a2..dd8d3c5afe07613e1df98d17780de4dc08780f5b 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "frame_transform.h"\r
 \r
-#include <common/utility/assert.h>\r
+#include <algorithm>\r
 \r
 namespace caspar { namespace core {\r
                \r
@@ -63,7 +63,7 @@ frame_transform& frame_transform::operator*=(const frame_transform &other)
        levels.min_output                = std::max(levels.min_output, other.levels.min_output);\r
        levels.max_output                = std::min(levels.max_output, other.levels.max_output);\r
        levels.gamma                    *= other.levels.gamma;\r
-       field_mode                               = static_cast<field_mode::type>(field_mode & other.field_mode);\r
+       field_mode                               = static_cast<core::field_mode>(field_mode & other.field_mode);\r
        is_key                                  |= other.is_key;\r
        is_mix                                  |= other.is_mix;\r
        return *this;\r
@@ -100,7 +100,7 @@ frame_transform tween(double time, const frame_transform& source, const frame_tr
        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::type>(source.field_mode & dest.field_mode);\r
+       result.field_mode                       = static_cast<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 18a6f55229d314d9f330f116dfe50c440c38bfb9..0159b695f4ebfaab6565c467c0254ba39765d2e6 100644 (file)
@@ -27,9 +27,7 @@
 #include <boost/array.hpp>\r
 \r
 namespace caspar { namespace core {\r
-\r
-struct pixel_format_desc;\r
-               \r
+                       \r
 struct levels sealed\r
 {\r
        levels() \r
@@ -64,7 +62,7 @@ public:
        boost::array<double, 2> clip_scale;  \r
        levels                                  levels;\r
 \r
-       field_mode::type                field_mode;\r
+       field_mode                              field_mode;\r
        bool                                    is_key;\r
        bool                                    is_mix;\r
        \r
index 14f6bd29ab05150122809195b1b16e3b338beb61..dd26178b58b34b201c9cbbac108566b32477c1c8 100644 (file)
 #pragma once\r
 \r
 namespace caspar { namespace core {\r
-\r
-class basic_frame;\r
-class write_frame;\r
-\r
+       \r
 struct frame_visitor\r
 {\r
-       virtual void begin(basic_frame& frame) = 0;\r
+       virtual void begin(class basic_frame& frame) = 0;\r
        virtual void end() = 0;\r
-       virtual void visit(write_frame& frame) = 0;\r
+       virtual void visit(class write_frame& frame) = 0;\r
 };\r
 \r
 }}
\ No newline at end of file
index 4e7efbb1bd731c04f8d9bb7e4e298433c91f7c5d..31f3692031c0fc8ae8d703181eaae4a622395ae6 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/enum_class.h>\r
+\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
                \r
-struct pixel_format\r
+CASPAR_BEGIN_ENUM_CLASS\r
 {\r
-       enum type\r
-       {\r
-               gray = 0,\r
-               bgra,\r
-               rgba,\r
-               argb,\r
-               abgr,\r
-               ycbcr,\r
-               ycbcra,\r
-               luma,\r
-               count,\r
-               invalid\r
-       };\r
-};\r
+       gray = 0,\r
+       bgra,\r
+       rgba,\r
+       argb,\r
+       abgr,\r
+       ycbcr,\r
+       ycbcra,\r
+       luma,\r
+       count,\r
+       invalid\r
+}\r
+CASPAR_END_ENUM_CLASS(pixel_format)\r
 \r
 struct pixel_format_desc sealed\r
 {\r
@@ -76,8 +76,8 @@ struct pixel_format_desc sealed
        {\r
        }\r
        \r
-       pixel_format::type pix_fmt;\r
-       std::vector<plane> planes;\r
+       pixel_format            pix_fmt;\r
+       std::vector<plane>      planes;\r
 };\r
 \r
 }}
\ No newline at end of file
index 5f5cb1d7871d383982146d91a959f0835c32a03e..07d0d3a6d4fca7ca51b756bea671804d7a489ddf 100644 (file)
 #include <common/utility/move_on_copy.h>\r
 \r
 namespace caspar { namespace core {\r
+\r
+boost::unique_future<std::wstring> frame_producer::call(const std::wstring&) \r
+{\r
+       BOOST_THROW_EXCEPTION(not_supported());\r
+}\r
        \r
 std::vector<const producer_factory_t> g_factories;\r
        \r
index 19a9e464fc7e4187d6083a5aa3c4a3744b073907..24ff14f9ea06cfe33267968143427053a474f115 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/no_copy.h>\r
+#include <common/forward.h>\r
 #include <common/memory/safe_ptr.h>\r
-#include <common/exception/exceptions.h>\r
+#include <common/enum_class.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-\r
-#include <algorithm>\r
 #include <stdint.h>\r
 #include <limits>\r
 #include <functional>\r
 #include <string>\r
 #include <vector>\r
 \r
-#include <boost/thread/future.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
-namespace caspar { \r
-       \r
-class executor;\r
-       \r
-namespace core {\r
-\r
-class basic_frame;\r
-struct frame_factory;\r
+FORWARD1(caspar, class executor);\r
+FORWARD1(boost, template<typename T> class unique_future);\r
 \r
-struct frame_producer : boost::noncopyable\r
+namespace caspar { namespace core {\r
+       \r
+struct frame_producer\r
 {\r
+       CASPAR_NO_COPY(frame_producer);\r
 public:\r
-       enum flags\r
+       CASPAR_BEGIN_ENUM_CLASS\r
        {\r
-               NO_FLAG = 0,\r
-               ALPHA_ONLY_FLAG = 1,\r
-               DEINTERLACE_FLAG\r
-       };\r
+               none            = 0,\r
+               alpha_only      = 2,\r
+               deinterlace     = 4, \r
+       }\r
+       CASPAR_END_ENUM_CLASS(flags)\r
 \r
+       frame_producer(){}\r
        virtual ~frame_producer(){}     \r
 \r
        virtual std::wstring print() const = 0; // nothrow\r
        virtual boost::property_tree::wptree info() const = 0;\r
 \r
-       virtual boost::unique_future<std::wstring> call(const std::wstring&) \r
-       {\r
-               BOOST_THROW_EXCEPTION(not_supported());\r
-       }\r
+       virtual boost::unique_future<std::wstring> call(const std::wstring&);\r
 \r
        virtual safe_ptr<frame_producer> get_following_producer() const {return frame_producer::empty();}  // nothrow\r
        virtual void set_leading_producer(const safe_ptr<frame_producer>&) {}  // nothrow\r
                \r
        virtual uint32_t nb_frames() const {return std::numeric_limits<uint32_t>::max();}\r
        \r
-       virtual safe_ptr<basic_frame> receive(int flags) = 0;\r
-       virtual safe_ptr<core::basic_frame> last_frame() const = 0;\r
+       virtual safe_ptr<class basic_frame> receive(int flags) = 0;\r
+       virtual safe_ptr<class basic_frame> last_frame() const = 0;\r
 \r
        static const safe_ptr<frame_producer>& empty(); // nothrow\r
 };\r
 \r
-safe_ptr<basic_frame> receive_and_follow(safe_ptr<frame_producer>& producer, int flags);\r
+safe_ptr<class basic_frame> receive_and_follow(safe_ptr<frame_producer>& producer, int flags);\r
 \r
-typedef std::function<safe_ptr<core::frame_producer>(const safe_ptr<frame_factory>&, const std::vector<std::wstring>&)> producer_factory_t;\r
+typedef std::function<safe_ptr<core::frame_producer>(const safe_ptr<struct frame_factory>&, const std::vector<std::wstring>&)> producer_factory_t;\r
 void register_producer_factory(const producer_factory_t& factory); // Not thread-safe.\r
 safe_ptr<core::frame_producer> create_producer(const safe_ptr<frame_factory>&, const std::vector<std::wstring>& params);\r
 safe_ptr<core::frame_producer> create_producer(const safe_ptr<frame_factory>&, const std::wstring& params);\r
index 530b8cf862f0a42589780b9b4b46f2afac57fb6d..3f68876961ea9de8f60d7c07723a7661c9a33bd1 100644 (file)
@@ -28,7 +28,7 @@
 #include "frame/frame_transform.h"\r
 \r
 #include <boost/optional.hpp>\r
-#include <boost/property_tree/ptree.hpp>\r
+#include <boost/thread/future.hpp>\r
 \r
 namespace caspar { namespace core {\r
 \r
@@ -70,7 +70,7 @@ public:
                if(preview) // Play the first frame and pause.\r
                {                       \r
                        play();\r
-                       receive(frame_producer::NO_FLAG);\r
+                       receive(frame_producer::flags::none);\r
                        pause();\r
                }\r
        }\r
index 3ce23bd09bd7a5a6277154e99ec438f9b05beb57..32c206b27b395b94b9f35ec2e9ec8dc9306b7ea4 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/forward.h>\r
 #include <common/memory/safe_ptr.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
-#include <boost/thread/future.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
 #include <string>\r
 \r
-namespace caspar { namespace core {\r
-\r
-struct frame_producer;\r
-class basic_frame;\r
+FORWARD1(boost, template<typename T> class unique_future);\r
+FORWARD1(boost, template<typename T> class optional);\r
 \r
-class layer sealed : boost::noncopyable\r
+namespace caspar { namespace core {\r
+       \r
+class layer sealed\r
 {\r
 public:\r
        layer(); // nothrow\r
@@ -45,7 +44,7 @@ public:
 \r
        void swap(layer& other); // nothrow \r
                \r
-       void load(const safe_ptr<frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr); // nothrow\r
+       void load(const safe_ptr<struct frame_producer>& producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr); // nothrow\r
        void play(); // nothrow\r
        void pause(); // nothrow\r
        void stop(); // nothrow\r
@@ -56,10 +55,10 @@ public:
        \r
        bool empty() const;\r
 \r
-       safe_ptr<frame_producer> foreground() const; // nothrow\r
-       safe_ptr<frame_producer> background() const; // nothrow\r
+       safe_ptr<struct frame_producer> foreground() const; // nothrow\r
+       safe_ptr<struct frame_producer> background() const; // nothrow\r
 \r
-       safe_ptr<basic_frame> receive(int flags); // nothrow\r
+       safe_ptr<class basic_frame> receive(int flags); // nothrow\r
 \r
        boost::property_tree::wptree info() const;\r
 private:\r
index 0f0499fdd3223e3227954411a34266e5e463ed2e..b03d39d6d08be6bda7c87f2ca5de7cf50d079e97 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/memory/safe_ptr.h>\r
+\r
 #include <string>\r
-#include <memory>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
-       \r
-struct frame_factory;\r
-struct frame_producer;\r
-       \r
-safe_ptr<frame_producer> create_playlist_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
+               \r
+safe_ptr<struct frame_producer> create_playlist_producer(const safe_ptr<struct frame_factory>& frame_factory, const std::vector<std::wstring>& params);\r
 \r
 }}
\ No newline at end of file
index 9845849d807bfdc94663acbc79bbe8d458c8bb97..8562693e5f415978060bd7a3ddc7682de1bd3f64 100644 (file)
 #include "../frame_producer.h"\r
 #include "../frame/basic_frame.h"\r
 \r
+#include <common/no_copy.h>\r
+\r
 #include <tbb/parallel_invoke.h>\r
 \r
 namespace caspar { namespace core {    \r
 \r
 struct separated_producer : public frame_producer\r
 {              \r
+       CASPAR_NO_COPY(separated_producer);\r
+\r
        safe_ptr<frame_producer>        fill_producer_;\r
        safe_ptr<frame_producer>        key_producer_;\r
        safe_ptr<basic_frame>           fill_;\r
@@ -60,7 +64,7 @@ struct separated_producer : public frame_producer
                [&]\r
                {\r
                        if(key_ == core::basic_frame::late())\r
-                               key_ = receive_and_follow(key_producer_, flags | ALPHA_ONLY_FLAG);\r
+                               key_ = receive_and_follow(key_producer_, flags | frame_producer::flags::alpha_only);\r
                });\r
 \r
                if(fill_ == basic_frame::eof() || key_ == basic_frame::eof())\r
index bc25895d7cf4bb513e4d8e055de8f265ae4d9239..c515f72bea21c2c11fd69841e903b73825052d2a 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/memory/safe_ptr.h>\r
+\r
 #include <string>\r
-#include <memory>\r
 \r
 namespace caspar { namespace core {\r
-\r
-struct frame_producer;\r
-\r
-safe_ptr<frame_producer> create_separated_producer(const safe_ptr<frame_producer>& fill, const safe_ptr<frame_producer>& key);\r
+       \r
+safe_ptr<struct frame_producer> create_separated_producer(const safe_ptr<struct frame_producer>& fill, const safe_ptr<struct frame_producer>& key);\r
 \r
 }}
\ No newline at end of file
index 3cf0d892b4b045dd1e331de93e461e2543daad7a..896138d78a18c3a8e631e88a66a4720e3b022eac 100644 (file)
@@ -29,6 +29,7 @@
 #include "frame/frame_factory.h"\r
 \r
 #include <common/concurrency/executor.h>\r
+#include <common/diagnostics/graph.h>\r
 \r
 #include <core/producer/frame/frame_transform.h>\r
 \r
@@ -124,15 +125,15 @@ public:
                        {\r
                                auto transform = transforms_[layer.first].fetch_and_tick(1);\r
 \r
-                               int flags = frame_producer::NO_FLAG;\r
+                               int flags = frame_producer::flags::none;\r
                                if(format_desc_.field_mode != field_mode::progressive)\r
                                {\r
-                                       flags |= std::abs(transform.fill_scale[1]  - 1.0) > 0.0001 ? frame_producer::DEINTERLACE_FLAG : frame_producer::NO_FLAG;\r
-                                       flags |= std::abs(transform.fill_translation[1])  > 0.0001 ? frame_producer::DEINTERLACE_FLAG : frame_producer::NO_FLAG;\r
+                                       flags |= std::abs(transform.fill_scale[1]  - 1.0) > 0.0001 ? frame_producer::flags::deinterlace : frame_producer::flags::none;\r
+                                       flags |= std::abs(transform.fill_translation[1])  > 0.0001 ? frame_producer::flags::deinterlace : frame_producer::flags::none;\r
                                }\r
 \r
                                if(transform.is_key)\r
-                                       flags |= frame_producer::ALPHA_ONLY_FLAG;\r
+                                       flags |= frame_producer::flags::alpha_only;\r
 \r
                                auto frame = layer.second.receive(flags);       \r
                                \r
@@ -347,7 +348,7 @@ public:
        }\r
 };\r
 \r
-stage::stage(const safe_ptr<stage::target_t>& target,const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc) : impl_(new impl(target, graph, format_desc)){}\r
+stage::stage(const safe_ptr<stage::target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc) : impl_(new impl(target, graph, format_desc)){}\r
 void stage::set_frame_transform(int index, const core::frame_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform(index, transform, mix_duration, tween);}\r
 void stage::apply_frame_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::clear_transforms(int index){impl_->clear_transforms(index);}\r
index 107a413c2811f1a5c3ed7bf8585ba4206a1d1189..02ac971f36824e7ecf5b28905c21b352a26c0e2e 100644 (file)
 \r
 #include "frame_producer.h"\r
 \r
+#include <common/no_copy.h>\r
+#include <common/forward.h>\r
 #include <common/memory/safe_ptr.h>\r
 #include <common/concurrency/target.h>\r
-#include <common/diagnostics/graph.h>\r
 \r
-#include <boost/noncopyable.hpp>\r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 #include <boost/thread/future.hpp>\r
 \r
 #include <functional>\r
 \r
-namespace caspar { namespace core {\r
-\r
-struct video_format_desc;\r
-struct frame_transform;\r
+FORWARD2(caspar, diagnostics, class graph);\r
 \r
-class stage sealed : boost::noncopyable\r
+namespace caspar { namespace core {\r
+       \r
+class stage sealed\r
 {\r
+       CASPAR_NO_COPY(stage);\r
 public:\r
-       typedef target<std::pair<std::map<int, safe_ptr<basic_frame>>, std::shared_ptr<void>>> target_t;\r
+       typedef target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>> target_t;\r
 \r
-       explicit stage(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const video_format_desc& format_desc);\r
+       stage(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc);\r
        \r
        // stage\r
        \r
-       void set_frame_transform(int index, const frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
-       void apply_frame_transform(int index, const std::function<frame_transform(frame_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void set_frame_transform(int index, const struct frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
+       void apply_frame_transform(int index, const std::function<struct frame_transform(struct frame_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
        void clear_transforms(int index);\r
        void clear_transforms();\r
 \r
        void spawn_token();\r
                        \r
-       void load(int index, const safe_ptr<frame_producer>& producer, bool preview = false, int auto_play_delta = -1);\r
+       void load(int index, const safe_ptr<struct frame_producer>& producer, bool preview = false, int auto_play_delta = -1);\r
        void pause(int index);\r
        void play(int index);\r
        void stop(int index);\r
@@ -64,14 +64,14 @@ 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<frame_producer>>  foreground(int index);\r
-       boost::unique_future<safe_ptr<frame_producer>>  background(int index);\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
        \r
-       void set_video_format_desc(const video_format_desc& format_desc);\r
+       void set_video_format_desc(const struct video_format_desc& format_desc);\r
 \r
 private:\r
        struct impl;\r
index ad0fe32633700a4a7d05d2a76f6d66900b70e390..4f1028b088f86f8817352f1828f7d42e53b01ba2 100644 (file)
@@ -27,6 +27,8 @@
 #include "../frame/basic_frame.h"\r
 #include "../frame/frame_transform.h"\r
 \r
+#include <common/no_copy.h>\r
+\r
 #include <tbb/parallel_invoke.h>\r
 \r
 #include <boost/assign.hpp>\r
@@ -37,7 +39,9 @@ namespace caspar { namespace core {
 \r
 struct transition_producer : public frame_producer\r
 {      \r
-       const field_mode::type          mode_;\r
+       CASPAR_NO_COPY(transition_producer);\r
+\r
+       const field_mode                mode_;\r
        unsigned int                            current_frame_;\r
        \r
        const transition_info           info_;\r
@@ -47,7 +51,7 @@ struct transition_producer : public frame_producer
 \r
        safe_ptr<basic_frame>           last_frame_;\r
                \r
-       explicit transition_producer(const field_mode::type& mode, const safe_ptr<frame_producer>& dest, const transition_info& info) \r
+       explicit transition_producer(const field_mode& mode, const safe_ptr<frame_producer>& dest, const transition_info& info) \r
                : mode_(mode)\r
                , current_frame_(0)\r
                , info_(info)\r
@@ -182,7 +186,7 @@ struct transition_producer : public frame_producer
        }\r
 };\r
 \r
-safe_ptr<frame_producer> create_transition_producer(const field_mode::type& mode, const safe_ptr<frame_producer>& destination, const transition_info& info)\r
+safe_ptr<frame_producer> create_transition_producer(const field_mode& mode, const safe_ptr<frame_producer>& destination, const transition_info& info)\r
 {\r
        return create_producer_print_proxy(\r
                        make_safe<transition_producer>(mode, destination, info));\r
index 11ef6df6bdaef3743935540d5b72e402a4eac59f..dadca9a7360e25c161ac43550c4adcd7d47be4d0 100644 (file)
 \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
 \r
 #include <string>\r
-#include <memory>\r
 \r
 namespace caspar { namespace core {\r
-\r
-struct frame_producer;\r
-\r
-struct transition\r
+       \r
+CASPAR_BEGIN_ENUM_CLASS\r
 {\r
-       enum type\r
-       {\r
-\r
-               cut = 1,\r
-               mix,\r
-               push,\r
-               slide,\r
-               wipe\r
-       };\r
-};\r
-\r
-struct transition_direction\r
+       cut,    \r
+       mix,    \r
+       push,    \r
+       slide,  \r
+       wipe,\r
+       count\r
+}\r
+CASPAR_END_ENUM_CLASS(transition)\r
+       \r
+CASPAR_BEGIN_ENUM_CLASS\r
 {\r
-       enum type\r
-       {\r
-               from_left = 1,\r
-               from_right\r
-       };\r
-};\r
-\r
+       from_left,\r
+       from_right,\r
+       count\r
+}\r
+CASPAR_END_ENUM_CLASS(transition_direction)\r
+       \r
 struct transition_info\r
 {\r
        transition_info() \r
@@ -62,12 +58,12 @@ struct transition_info
                , direction(transition_direction::from_left)\r
                , tweener(get_tweener(L"linear")){}\r
                \r
-       size_t                                          duration;\r
-       transition_direction::type      direction;\r
-       transition::type                        type;\r
-       tweener_t                                       tweener;\r
+       size_t                                  duration;\r
+       transition_direction    direction;\r
+       transition                              type;\r
+       tweener_t                               tweener;\r
 };\r
 \r
-safe_ptr<frame_producer> create_transition_producer(const field_mode::type& mode, const safe_ptr<frame_producer>& destination, const transition_info& info);\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
 \r
 }}
\ No newline at end of file
index 265d8d8d9fc53e2c903cd18694b26b6288375873..2e36cc3a4dd5c86a037decdf55aff289eaf80fdd 100644 (file)
@@ -30,6 +30,7 @@
 #include "mixer/gpu/ogl_device.h"\r
 #include "mixer/write_frame.h"\r
 #include "producer/stage.h"\r
+#include "producer/frame/frame_factory.h"\r
 \r
 #include <common/diagnostics/graph.h>\r
 #include <common/env.h>\r
index 474f7198f5cac0a82ff9871d199a9d3a3d158494..cff53843bc6a2ee1125c5bea11fdba4e0ef7f425 100644 (file)
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
-\r
-#include <boost/noncopyable.hpp>\r
+#include <common/no_copy.h>\r
 \r
 #include <boost/property_tree/ptree_fwd.hpp>\r
 \r
 namespace caspar { namespace core {\r
        \r
-class stage;\r
-class mixer;\r
-class output;\r
-class ogl_device;\r
-struct frame_factory;\r
-struct video_format_desc;\r
-\r
-class video_channel sealed : boost::noncopyable\r
+class video_channel sealed\r
 {\r
+       CASPAR_NO_COPY(video_channel);\r
 public:\r
-       explicit video_channel(int index, const video_format_desc& format_desc, const safe_ptr<ogl_device>& ogl);\r
+       explicit video_channel(int index, const struct video_format_desc& format_desc, const safe_ptr<class ogl_device>& ogl);\r
 \r
-       safe_ptr<stage>                 stage();\r
-       safe_ptr<mixer>                 mixer();\r
-       safe_ptr<output>                output();\r
-       safe_ptr<frame_factory> frame_factory();\r
+       safe_ptr<class stage>                   stage();\r
+       safe_ptr<class mixer>                   mixer();\r
+       safe_ptr<class output>                  output();\r
+       safe_ptr<struct frame_factory>  frame_factory();\r
        \r
-       video_format_desc get_video_format_desc() const;\r
-       void set_video_format_desc(const video_format_desc& format_desc);\r
+       struct video_format_desc get_video_format_desc() const;\r
+       void set_video_format_desc(const struct video_format_desc& format_desc);\r
        \r
        boost::property_tree::wptree info() const;\r
 \r
index a06d94b78c824c486e6c2fd0fc3de94571e768d8..43a2275feb5f5b18feed04e584e876f1d93dea67 100644 (file)
@@ -47,12 +47,12 @@ const std::vector<video_format_desc> format_descs = boost::assign::list_of
        (video_format_desc(video_format::x1080p5000,    1920, 1080, 1920, 1080, field_mode::progressive,           50,     1, L"1080p5000",     boost::assign::list_of<int>(1920)                                               ))\r
        (video_format_desc(video_format::invalid,                  0,    0,    0,        0, field_mode::progressive,        1,     1, L"invalid",       boost::assign::list_of<int>(1)                                                  ));\r
 \r
-video_format_desc::video_format_desc(video_format::type format,\r
+video_format_desc::video_format_desc(video_format format,\r
                                        int width,\r
                                        int height,\r
                                        int square_width,\r
                                        int square_height,\r
-                                       field_mode::type field_mode,\r
+                                       core::field_mode field_mode,\r
                                        int time_scale,\r
                                        int duration,\r
                                        const std::wstring& name,\r
@@ -75,12 +75,16 @@ video_format_desc::video_format_desc(video_format::type format,
 {\r
 }\r
 \r
-video_format_desc::video_format_desc(video_format::type format)\r
+video_format_desc::video_format_desc(video_format format)\r
+       : format(video_format::invalid)\r
+       , field_mode(field_mode::empty)\r
 {\r
-       *this = format_descs[format];\r
+       *this = format_descs.at(format.value());\r
 }\r
 \r
 video_format_desc::video_format_desc(const std::wstring& name)\r
+       : format(video_format::invalid)\r
+       , field_mode(field_mode::empty)\r
 {      \r
        *this = video_format_desc(video_format::invalid);\r
        for(auto it = std::begin(format_descs); it != std::end(format_descs)-1; ++it)\r
index 75bf4c2055cc7dc7e22d6a428524b5d0691b8f58..62cd6932e39758d868f347e013d10449c0715e6b 100644 (file)
 \r
 #pragma once\r
 \r
+#include <common/enum_class.h>\r
+\r
 #include <vector>\r
 #include <string>\r
 \r
 namespace caspar { namespace core {\r
        \r
-struct video_format \r
-{ \r
-       enum type\r
-       {\r
-               pal = 0,\r
-               ntsc,\r
-               x576p2500,\r
-               x720p2500,\r
-               x720p5000,\r
-               x720p5994,\r
-               x720p6000,\r
-               x1080p2397,\r
-               x1080p2400,\r
-               x1080i5000,\r
-               x1080i5994,\r
-               x1080i6000,\r
-               x1080p2500,\r
-               x1080p2997,\r
-               x1080p3000,\r
-               x1080p5000,\r
-               invalid,\r
-               count\r
-       };\r
-};\r
-\r
-struct field_mode \r
-{ \r
-       enum type\r
-       {\r
-               empty           = 0,\r
-               lower           = 1,\r
-               upper           = 2,\r
-               progressive = 3 // NOTE: progressive == lower | upper;\r
-       };\r
+CASPAR_BEGIN_ENUM_CLASS\r
+{\r
+       pal,            \r
+       ntsc,           \r
+       x576p2500,      \r
+       x720p2500,      \r
+       x720p5000,      \r
+       x720p5994,      \r
+       x720p6000,      \r
+       x1080p2397,     \r
+       x1080p2400,     \r
+       x1080i5000,     \r
+       x1080i5994,     \r
+       x1080i6000,     \r
+       x1080p2500,     \r
+       x1080p2997,     \r
+       x1080p3000,     \r
+       x1080p5000,     \r
+       invalid,\r
+       count\r
+}\r
+CASPAR_END_ENUM_CLASS(video_format);\r
 \r
-       static std::wstring print(field_mode::type value)\r
-       {\r
-               switch(value)\r
-               {\r
-                       case progressive:\r
-                               return L"progressive"; \r
-                       case lower:\r
-                               return L"lower";\r
-                       case upper:\r
-                               return L"upper";\r
-                       default:\r
-                               return L"invalid";\r
-               }\r
-       }\r
-};\r
+CASPAR_BEGIN_ENUM_CLASS\r
+{\r
+       empty           = 0,\r
+       lower           = 1,\r
+       upper           = 2,\r
+       progressive = 3, // NOTE: progressive == lower | upper;\r
+}\r
+CASPAR_END_ENUM_CLASS(field_mode);\r
 \r
 struct video_format_desc sealed\r
 {\r
-       video_format::type      format;         // video output format\r
+       video_format            format;         // video output format\r
 \r
        int                                     width;          // output frame width\r
        int                                     height;         // output frame height\r
        int                                     square_width;\r
        int                                     square_height;\r
-       field_mode::type        field_mode;     // progressive, interlaced upper field first, interlaced lower field first\r
+       field_mode                      field_mode;     // progressive, interlaced upper field first, interlaced lower field first\r
        double                          fps;            // actual framerate, e.g. i50 = 25 fps, p50 = 50 fps\r
        int                                     time_scale;\r
        int                                     duration;\r
@@ -97,12 +80,12 @@ struct video_format_desc sealed
        int                                     audio_channels;\r
        std::vector<int>        audio_cadence;\r
 \r
-       video_format_desc(video_format::type format,\r
+       video_format_desc(video_format format,\r
                                          int width,\r
                                          int height,\r
                                          int square_width,\r
                                          int square_height,\r
-                                         field_mode::type field_mode,\r
+                                         core::field_mode field_mode,\r
                                          int time_scale,\r
                                          int duration,\r
                                          const std::wstring& name,\r
@@ -110,7 +93,7 @@ struct video_format_desc sealed
 \r
        video_format_desc& operator=(const video_format_desc& other);\r
        \r
-       video_format_desc(video_format::type format = video_format::invalid);\r
+       video_format_desc(video_format format = video_format::invalid);\r
        video_format_desc(const std::wstring& name);\r
 };\r
 \r
index fdc866f4a51abac1b9b517153c69c8f605c07535..46453c4bb4feb8d20fe7d7bec20f2fe18d158820 100644 (file)
 #include <string>\r
 #include <math.h>\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 #include <common/memory/safe_ptr.h>\r
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
-#include <common/log/Log.h>\r
+#include <common/log.h>\r
 #include <common/exception/exceptions.h>\r
 \r
 #include <assert.h>\r
index b499d995b6de8266e776493afae97b807e1cb60b..27290aebe34fb01c85bb2e72551c639f0852522a 100644 (file)
@@ -27,8 +27,8 @@
 \r
 #include "util/blue_velvet.h"\r
 \r
-#include <common/log/log.h>\r
-#include <common/utility/string.h>\r
+#include <common/log.h>\r
+#include <common/utf.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 \r
index cfd1c90d856f3dbf2cdbfd2492edfed217decc67..131199755867dd6f01a8638cffad1054307732bf 100644 (file)
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/memory/memshfl.h>\r
-#include <common/utility/timer.h>\r
-#include <common/utility/assert.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 #include <core/mixer/audio/audio_util.h>\r
 \r
 #include <tbb/concurrent_queue.h>\r
 \r
+#include <boost/assert.hpp>\r
+#include <boost/lexical_cast.hpp>\r
 #include <boost/timer.hpp>\r
 #include <boost/range/algorithm.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
@@ -330,7 +330,7 @@ public:
        \r
        virtual bool send(const safe_ptr<core::read_frame>& frame) override\r
        {\r
-               CASPAR_VERIFY(audio_cadence_.front() == static_cast<size_t>(frame->audio_data().size()));\r
+               BOOST_VERIFY(audio_cadence_.front() == static_cast<size_t>(frame->audio_data().size()));\r
                boost::range::rotate(audio_cadence_, std::begin(audio_cadence_)+1);\r
 \r
                consumer_->send(frame);\r
@@ -368,7 +368,7 @@ safe_ptr<core::frame_consumer> create_consumer(const std::vector<std::wstring>&
        if(params.size() < 1 || params[0] != L"BLUEFISH")\r
                return core::frame_consumer::empty();\r
                \r
-       const auto device_index = params.size() > 1 ? lexical_cast_or_default<int>(params[1], 1) : 1;\r
+       const auto device_index = params.size() > 1 ? boost::lexical_cast<int>(params[1]) : 1;\r
 \r
        const auto embedded_audio = std::find(params.begin(), params.end(), L"EMBEDDED_AUDIO") != params.end();\r
        const auto key_only               = std::find(params.begin(), params.end(), L"KEY_ONLY")           != params.end();\r
index 940b8314b3bc4d368ecdf2a3e10b91d81279110d..438bfd9645c897e7044e15d2619ad39aeb1123ce 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "blue_velvet.h"\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #include <core/video_format.h>\r
 \r
@@ -82,9 +82,9 @@ void blue_initialize()
        blue_velvet_initialize();\r
 }\r
 \r
-EVideoMode vid_fmt_from_video_format(const core::video_format::type& fmt) \r
+EVideoMode vid_fmt_from_video_format(const core::video_format& fmt) \r
 {\r
-       switch(fmt)\r
+       switch(fmt.value())\r
        {\r
        case core::video_format::pal:                   return VID_FMT_PAL;\r
        case core::video_format::ntsc:                  return VID_FMT_NTSC;\r
index a4bcb77a5ac94642cb15d2ff8ef2b5b85ce3e136..c2278fff883fbc1910a2166d121ada8161d5c51f 100644 (file)
@@ -26,6 +26,7 @@
 #endif\r
 \r
 #define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN\r
 \r
 #include <Windows.h>\r
 \r
@@ -80,7 +81,7 @@ extern "C"
 \r
 \r
 #include "../common/memory/safe_ptr.h"\r
-#include "../common/utility/string.h"\r
+#include "../common/utf.h"\r
 #include "../common/exception/exceptions.h"\r
 #include "../common/exception/win32_exception.h"\r
-#include "../common/log/Log.h"\r
+#include "../common/log.h"\r
index 803763bb54b558426ab7f129a8854a46b3b72421..e265d4e03f48d2c6af706d9e9b389a3efe235f6b 100644 (file)
 #include <common/diagnostics/graph.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/memory/memshfl.h>\r
-#include <common/utility/assert.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 \r
 #include <tbb/concurrent_queue.h>\r
 #include <tbb/cache_aligned_allocator.h>\r
 \r
+#include <boost/assert.hpp>\r
+#include <boost/lexical_cast.hpp>\r
 #include <boost/circular_buffer.hpp>\r
 #include <boost/timer.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
@@ -499,7 +500,7 @@ public:
        \r
        virtual bool send(const safe_ptr<core::read_frame>& frame) override\r
        {\r
-               CASPAR_VERIFY(audio_cadence_.front() == static_cast<int>(frame->audio_data().size()));\r
+               BOOST_VERIFY(audio_cadence_.front() == static_cast<int>(frame->audio_data().size()));\r
                boost::range::rotate(audio_cadence_, std::begin(audio_cadence_)+1);\r
 \r
                consumer_->send(frame);\r
@@ -543,7 +544,7 @@ safe_ptr<core::frame_consumer> create_consumer(const std::vector<std::wstring>&
        configuration config;\r
                \r
        if(params.size() > 1)\r
-               config.device_index = lexical_cast_or_default<int>(params[1], config.device_index);\r
+               config.device_index = boost::lexical_cast<int>(params[1]);\r
        \r
        config.internal_key             = std::find(params.begin(), params.end(), L"INTERNAL_KEY")       != params.end();\r
        config.low_latency              = std::find(params.begin(), params.end(), L"LOW_LATENCY")        != params.end();\r
index 0b78a3b4480d3803cff3951c8e6b0eacc2ee0b50..5516e3f79136ff0efacb188df4832c124eb0ab3e 100644 (file)
@@ -34,7 +34,7 @@
 #include <common/concurrency/com_context.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/utility/param.h>\r
 \r
 #include <core/mixer/write_frame.h>\r
index 504d46d2dd399a309d6502c7c73cc8de4bd40e95..4b6f3254e18fcebdae6f996f3a411767da4e7428 100644 (file)
@@ -22,7 +22,7 @@
 #pragma once\r
 \r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <core/video_format.h>\r
 \r
 #include "../interop/DeckLinkAPI_h.h"\r
@@ -35,9 +35,9 @@
 \r
 namespace caspar { namespace decklink {\r
        \r
-static BMDDisplayMode get_decklink_video_format(core::video_format::type fmt) \r
+static BMDDisplayMode get_decklink_video_format(core::video_format fmt) \r
 {\r
-       switch(fmt)\r
+       switch(fmt.value())\r
        {\r
        case core::video_format::pal:                   return bmdModePAL;\r
        case core::video_format::ntsc:                  return bmdModeNTSC;\r
@@ -59,7 +59,7 @@ static BMDDisplayMode get_decklink_video_format(core::video_format::type fmt)
        }\r
 }\r
 \r
-static core::video_format::type get_caspar_video_format(BMDDisplayMode fmt) \r
+static core::video_format get_caspar_video_format(BMDDisplayMode fmt) \r
 {\r
        switch(fmt)\r
        {\r
@@ -112,7 +112,7 @@ BMDDisplayMode get_display_mode(const T& device, BMDDisplayMode format, BMDPixel
 }\r
 \r
 template<typename T, typename F>\r
-static BMDDisplayMode get_display_mode(const T& device, core::video_format::type fmt, BMDPixelFormat pix_fmt, F flag)\r
+static BMDDisplayMode get_display_mode(const T& device, core::video_format fmt, BMDPixelFormat pix_fmt, F flag)\r
 {      \r
        return get_display_mode(device, get_decklink_video_format(fmt), pix_fmt, flag);\r
 }\r
index 5ecbe80f1cf1f7a2ec4767b4d456317995abacf5..65af252198b506ae543c1c7e4c5a09e1e1ec2646 100644 (file)
@@ -26,6 +26,7 @@
 #endif\r
 \r
 #define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN\r
 \r
 #include <algorithm>\r
 #include <array>\r
index ba0f42283e6845c63ecc1e5cdbb10ab1b1a0c9f8..d791a9e3b9227f8af2ba7d08b9cafc499ccb5f03 100644 (file)
@@ -34,7 +34,7 @@
 #include <common/concurrency/executor.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 #include <common/utility/param.h>\r
 \r
 #include <boost/algorithm/string.hpp>\r
index 6c8dd5a825ea78d17488f052bf4fe1d2b6305ad9..d676c011862719aa94b7dd150552dbfacc8f6fcd 100644 (file)
@@ -24,7 +24,7 @@
 #include "consumer/ffmpeg_consumer.h"\r
 #include "producer/ffmpeg_producer.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 #include <core/producer/frame_producer.h>\r
index 7c01ded151bc9dd2532b8617c6b322c9515fc9de..a5b70330a88d95b28c56ef84fd497ace16c2e5e1 100644 (file)
@@ -22,7 +22,7 @@
 */\r
 #include "ffmpeg_error.h"\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #pragma warning(disable: 4146)\r
 \r
index d2f040a368d85117cde3b1dcd667157a559910f5..ebabf751cba43cfe4295d4ea6e296dc171518217 100644 (file)
@@ -30,7 +30,7 @@
 \r
 #include <core/video_format.h>\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #include <tbb/cache_aligned_allocator.h>\r
 \r
index 0a44c8769b083f84ab8b71a1b77b1f3a8d9038f9..b4cb395a52bbd8ed1e011be9b0b8699d4f5c56bf 100644 (file)
@@ -24,7 +24,7 @@
 #include "audio_resampler.h"\r
 \r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (push)\r
index 232bb3098fffcd9a22b2c9eca2014a0f9f6ef6cb..10e08d10ad3a141e4c126ca2d5a548c433f03819 100644 (file)
@@ -32,7 +32,7 @@
 #include "video/video_decoder.h"\r
 \r
 #include <common/env.h>\r
-#include <common/utility/assert.h>\r
+#include <common/log.h>\r
 #include <common/utility/param.h>\r
 #include <common/diagnostics/graph.h>\r
 \r
@@ -43,6 +43,7 @@
 #include <core/producer/frame/frame_transform.h>\r
 \r
 #include <boost/algorithm/string.hpp>\r
+#include <boost/assert.hpp>\r
 #include <boost/assign.hpp>\r
 #include <boost/timer.hpp>\r
 #include <boost/foreach.hpp>\r
@@ -51,6 +52,7 @@
 #include <boost/range/algorithm/find.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/regex.hpp>\r
+#include <boost/thread/future.hpp>\r
 \r
 #include <tbb/parallel_invoke.h>\r
 \r
index b6388424aa1b2ee0f835a59f9c0486a3dd3d3807..ffafc6784575fa189563dafe5e97390f68dd7098 100644 (file)
@@ -23,7 +23,7 @@
 \r
 #include "parallel_yadif.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (push)\r
index a1a334df6a17782fb38fa1515e63d1c9c6a5e223..4fa36e2587fb08455b92a03ec5da69b6545d89ba 100644 (file)
@@ -30,7 +30,7 @@
 #include <common/concurrency/executor.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/exception/win32_exception.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #include <core/video_format.h>\r
 \r
index 201074d81b325c0d645e20eea0aa93f8ebb96d6e..7d3eaa83e7420a49f4974f6c10d8613e7cc81666 100644 (file)
 \r
 #include <core/video_format.h>\r
 \r
+#include <ostream>\r
+\r
 namespace caspar { namespace ffmpeg {\r
        \r
-struct display_mode\r
+enum display_mode\r
 {\r
-       enum type\r
-       {\r
-               simple,\r
-               duplicate,\r
-               half,\r
-               interlace,\r
-               deinterlace_bob,\r
-               deinterlace_bob_reinterlace,\r
-               deinterlace,\r
-               count,\r
-               invalid\r
-       };\r
+       simple,\r
+       duplicate,\r
+       half,\r
+       interlace,\r
+       deinterlace_bob,\r
+       deinterlace_bob_reinterlace,\r
+       deinterlace,\r
+       count,\r
+       invalid\r
+};\r
 \r
-       static std::wstring print(display_mode::type value)\r
+template< typename CharT, typename TraitsT >\r
+std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream<CharT, TraitsT>& o, display_mode value)\r
+{      \r
+       switch(value)\r
        {\r
-               switch(value)\r
-               {\r
-                       case simple:                                            return L"simple";\r
-                       case duplicate:                                         return L"duplicate";\r
-                       case half:                                                      return L"half";\r
-                       case interlace:                                         return L"interlace";\r
-                       case deinterlace_bob:                           return L"deinterlace_bob";\r
-                       case deinterlace_bob_reinterlace:       return L"deinterlace_bob_reinterlace";\r
-                       case deinterlace:                                       return L"deinterlace";\r
-                       default:                                                        return L"invalid";\r
-               }\r
+               case simple:                                            o << L"simple";\r
+               case duplicate:                                         o << L"duplicate";\r
+               case half:                                                      o << L"half";\r
+               case interlace:                                         o << L"interlace";\r
+               case deinterlace_bob:                           o << L"deinterlace_bob";\r
+               case deinterlace_bob_reinterlace:       o << L"deinterlace_bob_reinterlace";\r
+               case deinterlace:                                       o << L"deinterlace";\r
+               default:                                                        o << L"invalid";\r
        }\r
-};\r
+       return o;\r
+}\r
+\r
 \r
-static display_mode::type get_display_mode(const core::field_mode::type in_mode, double in_fps, const core::field_mode::type out_mode, double out_fps)\r
+static display_mode get_display_mode(const core::field_mode in_mode, double in_fps, const core::field_mode out_mode, double out_fps)\r
 {              \r
        static const auto epsilon = 2.0;\r
 \r
index 22887f0f32d2e163ab1ec16e10923ad1b70f71ab..3050dfd0ffce8ae22323cbb0e8a87be0415d9e61 100644 (file)
@@ -35,8 +35,7 @@
 \r
 #include <common/env.h>\r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
-#include <common/utility/assert.h>\r
+#include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (push)\r
@@ -53,6 +52,7 @@ extern "C"
 #pragma warning (pop)\r
 #endif\r
 \r
+#include <boost/assert.hpp>\r
 #include <boost/foreach.hpp>\r
 #include <boost/range/algorithm_ext/push_back.hpp>\r
 #include <boost/algorithm/string/predicate.hpp>\r
@@ -70,7 +70,7 @@ struct frame_muxer::impl : boost::noncopyable
        std::queue<std::queue<safe_ptr<write_frame>>>   video_streams_;\r
        std::queue<core::audio_buffer>                                  audio_streams_;\r
        std::queue<safe_ptr<basic_frame>>                               frame_buffer_;\r
-       display_mode::type                                                              display_mode_;\r
+       display_mode                                                            display_mode_;\r
        const double                                                                    in_fps_;\r
        const video_format_desc                                                 format_desc_;\r
        bool                                                                                    auto_transcode_;\r
@@ -119,7 +119,7 @@ struct frame_muxer::impl : boost::noncopyable
                }\r
                else\r
                {\r
-                       bool DEINTERLACE_FLAG = (flags & core::frame_producer::DEINTERLACE_FLAG) != 0;\r
+                       bool DEINTERLACE_FLAG = (flags & core::frame_producer::flags::deinterlace) != 0;\r
                \r
                        if(auto_deinterlace_ && force_deinterlacing_ != DEINTERLACE_FLAG)\r
                        {\r
@@ -130,7 +130,7 @@ struct frame_muxer::impl : boost::noncopyable
                        if(display_mode_ == display_mode::invalid)\r
                                update_display_mode(video_frame, force_deinterlacing_);\r
                                \r
-                       if(flags & core::frame_producer::ALPHA_ONLY_FLAG)\r
+                       if(flags & core::frame_producer::flags::alpha_only)\r
                                video_frame->format = make_alpha_format(video_frame->format);\r
                \r
                        auto format = video_frame->format;\r
@@ -278,7 +278,7 @@ struct frame_muxer::impl : boost::noncopyable
 \r
        core::audio_buffer pop_audio()\r
        {\r
-               CASPAR_VERIFY(audio_streams_.front().size() >= static_cast<size_t>(audio_cadence_.front()));\r
+               BOOST_VERIFY(audio_streams_.front().size() >= static_cast<size_t>(audio_cadence_.front()));\r
 \r
                auto begin = audio_streams_.front().begin();\r
                auto end   = begin + audio_cadence_.front();\r
@@ -347,7 +347,7 @@ struct frame_muxer::impl : boost::noncopyable
                                        video_streams_.back().push(make_write_frame(this, make_safe_ptr(av_frame), frame_factory_, 0));\r
                        }\r
                        filter_ = filter(filter_str);\r
-                       CASPAR_LOG(info) << L"[frame_muxer] " << display_mode::print(display_mode_) << L" " << print_mode(frame->width, frame->height, in_fps_, frame->interlaced_frame > 0);\r
+                       CASPAR_LOG(info) << L"[frame_muxer] " << display_mode_ << L" " << print_mode(frame->width, frame->height, in_fps_, frame->interlaced_frame > 0);\r
                }\r
        }\r
        \r
index 739478faec652fc333abe0dc848a911aa6b92c1e..33144c8bdfca7fa767742d6b30a2412e87295be0 100644 (file)
@@ -23,9 +23,8 @@
 \r
 #include "tbb_avcodec.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/env.h>\r
-#include <common/utility/assert.h>\r
 \r
 #include <tbb/atomic.h>\r
 #include <tbb/parallel_for.h>\r
@@ -64,7 +63,7 @@ int thread_execute2(AVCodecContext* s, int (*func)(AVCodecContext* c2, void* arg
        tbb::atomic<int> counter;   \r
     counter = 0;   \r
 \r
-       CASPAR_VERIFY(tbb::tbb_thread::hardware_concurrency() < 16);\r
+       BOOST_VERIFY(tbb::tbb_thread::hardware_concurrency() < 16);\r
        // Note: this will probably only work when tbb::task_scheduler_init::num_threads() < 16.\r
     tbb::parallel_for(tbb::blocked_range<int>(0, count, 2), [&](const tbb::blocked_range<int> &r)    \r
     {   \r
index 70df483ee80cce7232f81db935a14866a8f22201..8ca1a81821654cae51147d3f3a5d94c4d8de4e87 100644 (file)
@@ -24,7 +24,7 @@
 #include "flv.h"\r
 \r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #include <boost/filesystem.hpp>\r
 \r
index 1d5d1f324f8079ee9a1ffaa56fd6e656a216bcd9..447783215618a3f71a1f3461321b2fb0063a5a19 100644 (file)
 #include <core/mixer/write_frame.h>\r
 \r
 #include <common/exception/exceptions.h>\r
-#include <common/utility/assert.h>\r
 \r
 #include <tbb/parallel_for.h>\r
 \r
+#include <boost/assert.hpp>\r
 #include <boost/filesystem.hpp>\r
 #include <boost/lexical_cast.hpp>\r
 \r
@@ -86,7 +86,7 @@ std::shared_ptr<AVFrame>                      empty_video()
        return video;\r
 }\r
 \r
-core::field_mode::type get_mode(const AVFrame& frame)\r
+core::field_mode get_mode(const AVFrame& frame)\r
 {\r
        if(!frame.interlaced_frame)\r
                return core::field_mode::progressive;\r
@@ -94,7 +94,7 @@ core::field_mode::type get_mode(const AVFrame& frame)
        return frame.top_field_first ? core::field_mode::upper : core::field_mode::lower;\r
 }\r
 \r
-core::pixel_format::type get_pixel_format(PixelFormat pix_fmt)\r
+core::pixel_format get_pixel_format(PixelFormat pix_fmt)\r
 {\r
        switch(pix_fmt)\r
        {\r
@@ -123,7 +123,7 @@ core::pixel_format_desc get_pixel_format_desc(PixelFormat pix_fmt, int width, in
        core::pixel_format_desc desc;\r
        desc.pix_fmt = get_pixel_format(pix_fmt);\r
                \r
-       switch(desc.pix_fmt)\r
+       switch(desc.pix_fmt.value())\r
        {\r
        case core::pixel_format::gray:\r
        case core::pixel_format::luma:\r
@@ -162,7 +162,7 @@ core::pixel_format_desc get_pixel_format_desc(PixelFormat pix_fmt, int width, in
 \r
 int make_alpha_format(int format)\r
 {\r
-       switch(get_pixel_format(static_cast<PixelFormat>(format)))\r
+       switch(get_pixel_format(static_cast<PixelFormat>(format)).value())\r
        {\r
        case core::pixel_format::ycbcr:\r
        case core::pixel_format::ycbcra:\r
@@ -183,7 +183,7 @@ safe_ptr<core::write_frame> make_write_frame(const void* tag, const safe_ptr<AVF
        const auto height = decoded_frame->height;\r
        auto desc                 = get_pixel_format_desc(static_cast<PixelFormat>(decoded_frame->format), width, height);\r
        \r
-       if(flags & core::frame_producer::ALPHA_ONLY_FLAG)\r
+       if(flags & core::frame_producer::flags::alpha_only)\r
                desc = get_pixel_format_desc(static_cast<PixelFormat>(make_alpha_format(decoded_frame->format)), width, height);\r
 \r
        std::shared_ptr<core::write_frame> write;\r
@@ -236,7 +236,7 @@ safe_ptr<core::write_frame> make_write_frame(const void* tag, const safe_ptr<AVF
                if(target_pix_fmt == PIX_FMT_BGRA)\r
                {\r
                        auto size = avpicture_fill(reinterpret_cast<AVPicture*>(av_frame.get()), write->image_data().begin(), PIX_FMT_BGRA, width, height);\r
-                       CASPAR_VERIFY(size == write->image_data().size()); \r
+                       BOOST_VERIFY(size == write->image_data().size()); \r
                }\r
                else\r
                {\r
@@ -266,8 +266,8 @@ safe_ptr<core::write_frame> make_write_frame(const void* tag, const safe_ptr<AVF
                        auto decoded          = decoded_frame->data[n];\r
                        auto decoded_linesize = decoded_frame->linesize[n];\r
                        \r
-                       CASPAR_ASSERT(decoded);\r
-                       CASPAR_ASSERT(write->image_data(n).begin());\r
+                       BOOST_ASSERT(decoded);\r
+                       BOOST_ASSERT(write->image_data(n).begin());\r
 \r
                        // Copy line by line since ffmpeg sometimes pads each line.\r
                        tbb::affinity_partitioner ap;\r
@@ -368,7 +368,7 @@ double read_fps(AVFormatContext& context, double fail_value)
                double closest_fps = 0.0;\r
                for(int n = 0; n < core::video_format::count; ++n)\r
                {\r
-                       auto format = core::video_format_desc(static_cast<core::video_format::type>(n));\r
+                       auto format = core::video_format_desc(core::video_format(n));\r
 \r
                        double diff1 = std::abs(format.fps - fps);\r
                        double diff2 = std::abs(closest_fps - fps);\r
index 63e21c2ef4ea553f45294fb35ccf15dfedeaf4a2..11393946cea8eb2e022882714e3cdb8ed9d9e1fc 100644 (file)
@@ -55,7 +55,7 @@ std::shared_ptr<AVFrame>                      empty_video();
 \r
 static const int CASPAR_PIX_FMT_LUMA = 10; // Just hijack some unual pixel format.\r
 \r
-core::field_mode::type         get_mode(const AVFrame& frame);\r
+core::field_mode               get_mode(const AVFrame& frame);\r
 int                                                    make_alpha_format(int format); // NOTE: Be careful about CASPAR_PIX_FMT_LUMA, change it to PIX_FMT_GRAY8 if you want to use the frame inside some ffmpeg function.\r
 safe_ptr<core::write_frame> make_write_frame(const void* tag, const safe_ptr<AVFrame>& decoded_frame, const safe_ptr<core::frame_factory>& frame_factory, int flags);\r
 \r
index 4036c4232b05d2d7c5097ca0b8d0f19df2e85667..bd4db1b1869f0fb6c5e943e761d96e2e9c83a043 100644 (file)
@@ -27,7 +27,7 @@
 \r
 #include "../../ffmpeg_error.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <core/producer/frame/frame_transform.h>\r
 #include <core/producer/frame/frame_factory.h>\r
 \r
index 66089ebdefa4f832006f8bf3780ffea2e557ac69..d619ca0688634497852daf27b70ff3288d95ebfb 100644 (file)
@@ -21,6 +21,9 @@
 \r
 #pragma once\r
 \r
+#define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN\r
+\r
 #include "../common/compiler/vs/disable_silly_warnings.h"\r
 \r
 #ifdef _DEBUG\r
 #include <boost/regex.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
 \r
-#include "../common/utility/string.h"\r
+#include "../common/utf.h"\r
 #include "../common/memory/safe_ptr.h"\r
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
-#include "../common/log/Log.h"\r
+#include "../common/log.h"\r
 #include "../common/exception/exceptions.h"\r
 #include "../common/exception/win32_exception.h"\r
index 25ab53cad1dba3fcdd5e0a71f4565205666c3ad8..4a974e4a8d49d921b8247842fc29692119041bfc 100644 (file)
@@ -24,7 +24,7 @@
 #include "FlashAxContainer.h"\r
 #include "../interop/TimerHelper.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (push, 2) // TODO\r
index 745a9141f8fbe11e1487f4a583063fcd1ac900a8..9a78c68d58a64d017df5debbd351cb754c2314bb 100644 (file)
@@ -53,7 +53,7 @@ public:
                if(boost::filesystem::wpath(filename).extension() == L"")\r
                        filename += L".ft";\r
                \r
-               auto str = (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
+               auto str = (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?L"<true/>":L"<false/>") % label % data).str();\r
 \r
                CASPAR_LOG(info) << flash_producer_->print() << " Invoking add-command: " << str;\r
                return flash_producer_->call(str);\r
index ce0674d3630455bdfeaf8189db45650d9c536af2..8b2796b98fff042e27c36314890eb72140997acd 100644 (file)
@@ -50,7 +50,7 @@ public:
 \r
        //cg_producer\r
 \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 add(int layer, const std::wstring& template_name,  bool play_on_load, const std::wstring& start_from_label = L"", const std::wstring& data = L"");\r
        void remove(int layer);\r
        void play(int layer);\r
        void stop(int layer, unsigned int mix_out_duration);\r
index e0c9d5330493501c96e7e90e4b7172c349667443..e2bd3ec8f40fa941e10419d2b14d18c8675e5e84 100644 (file)
@@ -40,7 +40,7 @@
 #include <common/concurrency/executor.h>\r
 #include <common/concurrency/lock.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/utility/timer.h>\r
+#include <common/prec_timer.h>\r
 \r
 #include <boost/filesystem.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
@@ -157,7 +157,7 @@ class flash_renderer
        boost::timer frame_timer_;\r
        boost::timer tick_timer_;\r
 \r
-       high_prec_timer timer_;\r
+       prec_timer timer_;\r
 \r
        const int width_;\r
        const int height_;\r
index b0bfae429dbd24b1d7ef70be01749c45a5ce39bc..0dc3ac0ea169f34529a71a9c790de77b5a7d5d2a 100644 (file)
@@ -23,8 +23,8 @@
 \r
 #include <common/exception/exceptions.h>\r
 #include <common/env.h>\r
-#include <common/log/log.h>\r
-#include <common/utility/string.h>\r
+#include <common/log.h>\r
+#include <common/utf.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 #include <core/video_format.h>\r
index 5239119706a3d39915863912b10aa6fed87c5daf..7115e270a5504674e8455ccbd5284067eb4d59f7 100644 (file)
@@ -28,7 +28,7 @@
 #include <core/producer/frame_producer.h>\r
 #include <core/consumer/frame_consumer.h>\r
 \r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #include <FreeImage.h>\r
 \r
index df635fdfb7c66b8c42c9d507fa1cd6b0dae79b45..d987640b48b167fda3a34f2dcd78a60ca068aa4d 100644 (file)
@@ -31,7 +31,7 @@
 #include <core/mixer/write_frame.h>\r
 \r
 #include <common/env.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 \r
 #include <boost/assign.hpp>\r
 #include <boost/filesystem.hpp>\r
index 3fa65bbbb36c30c37dc8383a96dfd6047cfac9d4..8e30eccfe5685815a3a44777876540b68a3aebe7 100644 (file)
@@ -32,7 +32,7 @@
 #include <core/mixer/write_frame.h>\r
 \r
 #include <common/env.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/exception/exceptions.h>\r
 \r
 #include <boost/assign.hpp>\r
index 61fb8843d5675199eec61153da8433330043506e..e64fd04df3311f30fbe622b9d66ce8e4f7986ee7 100644 (file)
@@ -22,7 +22,7 @@
 #include "image_loader.h"\r
 \r
 #include <common/exception/Exceptions.h>\r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #if defined(_MSC_VER)\r
 #pragma warning (disable : 4714) // marked as __forceinline not inlined\r
index bb4c90982e6a7148064d5f3266af9d494733da0e..6a649357c089f23d0b9e6bf90bb1bfa53833e70f 100644 (file)
@@ -23,9 +23,8 @@
 \r
 #include <common/exception/exceptions.h>\r
 #include <common/diagnostics/graph.h>\r
-#include <common/log/log.h>\r
-#include <common/utility/timer.h>\r
-#include <common/utility/string.h>\r
+#include <common/log.h>\r
+#include <common/utf.h>\r
 \r
 #include <core/consumer/frame_consumer.h>\r
 #include <core/mixer/audio/audio_util.h>\r
index bc20382ef3bba397f80d9291469d81623f2a003f..472a22d29a8a795f01f5ac740faa4243a6a43444 100644 (file)
 \r
 #include <common/diagnostics/graph.h>\r
 #include <common/gl/gl_check.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/memory/safe_ptr.h>\r
 #include <common/memory/memshfl.h>\r
-#include <common/utility/timer.h>\r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #include <ffmpeg/producer/filter/filter.h>\r
 \r
index 67b6ccabcefb6b3dcc4a7838edb6fafc6ecb71e7..a67685882162d53b5a06628cc5c0adea461ab092 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once\r
 \r
 #define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN\r
 \r
 #if defined(_MSC_VER)\r
 #      ifndef _SCL_SECURE_NO_WARNINGS\r
 #include <boost/foreach.hpp>\r
 #include <boost/range/algorithm.hpp>\r
 \r
-#include "../common/utility/string.h"\r
+#include "../common/utf.h"\r
 #include "../common/memory/safe_ptr.h"\r
 //#include "../common/concurrency/executor.h" // Can't include this due to MSVC lambda bug\r
 \r
-#include "../common/log/Log.h"\r
+#include "../common/log.h"\r
 #include "../common/exception/exceptions.h"\r
 #include "../common/exception/win32_exception.h"\r
 \r
index 17f45226213f25742a44455a4b32a4ef748f8e9d..22a375f9c5ed8e4e370c6528e446ab42fad9cd3c 100644 (file)
@@ -30,7 +30,7 @@
 \r
 #include <common/env.h>\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/diagnostics/graph.h>\r
 #include <common/os/windows/current_version.h>\r
 #include <common/os/windows/system_info.h>\r
@@ -324,7 +324,7 @@ bool MixerCommand::DoExecute()
        {       \r
                if(_parameters[0] == L"KEYER" || _parameters[0] == L"IS_KEY")\r
                {\r
-                       bool value = lexical_cast_or_default(_parameters.at(1), false);\r
+                       bool value = boost::lexical_cast<int>(_parameters.at(1));\r
                        auto transform = [=](frame_transform transform) -> frame_transform\r
                        {\r
                                transform.is_key = value;\r
@@ -336,7 +336,7 @@ bool MixerCommand::DoExecute()
                }\r
                else if(_parameters[0] == L"OPACITY")\r
                {\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
 \r
                        double value = boost::lexical_cast<double>(_parameters.at(1));\r
@@ -352,7 +352,7 @@ bool MixerCommand::DoExecute()
                }\r
                else if(_parameters[0] == L"FILL" || _parameters[0] == L"FILL_RECT")\r
                {\r
-                       int duration = _parameters.size() > 5 ? lexical_cast_or_default(_parameters[5], 0) : 0;\r
+                       int duration = _parameters.size() > 5 ? boost::lexical_cast<int>(_parameters[5]) : 0;\r
                        std::wstring tween = _parameters.size() > 6 ? _parameters[6] : L"linear";\r
                        double x        = boost::lexical_cast<double>(_parameters.at(1));\r
                        double y        = boost::lexical_cast<double>(_parameters.at(2));\r
@@ -377,7 +377,7 @@ bool MixerCommand::DoExecute()
                }\r
                else if(_parameters[0] == L"CLIP" || _parameters[0] == L"CLIP_RECT")\r
                {\r
-                       int duration = _parameters.size() > 5 ? lexical_cast_or_default(_parameters[5], 0) : 0;\r
+                       int duration = _parameters.size() > 5 ? boost::lexical_cast<int>(_parameters[5]) : 0;\r
                        std::wstring tween = _parameters.size() > 6 ? _parameters[6] : L"linear";\r
                        double x        = boost::lexical_cast<double>(_parameters.at(1));\r
                        double y        = boost::lexical_cast<double>(_parameters.at(2));\r
@@ -398,7 +398,7 @@ bool MixerCommand::DoExecute()
                }\r
                else if(_parameters[0] == L"GRID")\r
                {\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
                        int n = boost::lexical_cast<int>(_parameters.at(1));\r
                        double delta = 1.0/static_cast<double>(n);\r
@@ -432,7 +432,7 @@ bool MixerCommand::DoExecute()
                else if(_parameters[0] == L"BRIGHTNESS")\r
                {\r
                        auto value = boost::lexical_cast<double>(_parameters.at(1));\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
                        auto transform = [=](frame_transform transform) -> frame_transform\r
                        {\r
@@ -446,7 +446,7 @@ bool MixerCommand::DoExecute()
                else if(_parameters[0] == L"SATURATION")\r
                {\r
                        auto value = boost::lexical_cast<double>(_parameters.at(1));\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
                        auto transform = [=](frame_transform transform) -> frame_transform\r
                        {\r
@@ -460,7 +460,7 @@ bool MixerCommand::DoExecute()
                else if(_parameters[0] == L"CONTRAST")\r
                {\r
                        auto value = boost::lexical_cast<double>(_parameters.at(1));\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
                        auto transform = [=](frame_transform transform) -> frame_transform\r
                        {\r
@@ -479,7 +479,7 @@ bool MixerCommand::DoExecute()
                        value.gamma              = boost::lexical_cast<double>(_parameters.at(3));\r
                        value.min_output = boost::lexical_cast<double>(_parameters.at(4));\r
                        value.max_output = boost::lexical_cast<double>(_parameters.at(5));\r
-                       int duration = _parameters.size() > 6 ? lexical_cast_or_default(_parameters[6], 0) : 0;\r
+                       int duration = _parameters.size() > 6 ? boost::lexical_cast<int>(_parameters[6]) : 0;\r
                        std::wstring tween = _parameters.size() > 7 ? _parameters[7] : L"linear";\r
 \r
                        auto transform = [=](frame_transform transform) -> frame_transform\r
@@ -493,7 +493,7 @@ bool MixerCommand::DoExecute()
                }\r
                else if(_parameters[0] == L"VOLUME")\r
                {\r
-                       int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
+                       int duration = _parameters.size() > 2 ? boost::lexical_cast<int>(_parameters[2]) : 0;\r
                        std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
                        double value = boost::lexical_cast<double>(_parameters[1]);\r
 \r
@@ -718,7 +718,7 @@ bool LoadbgCommand::DoExecute()
        if(boost::regex_match(message, what, expr))\r
        {\r
                auto transition = what["TRANSITION"].str();\r
-               transitionInfo.duration = lexical_cast_or_default<size_t>(what["DURATION"].str());\r
+               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
index 4298877bc6773cceca4b8ff7b30ac00cfd972535..89a4f93ad797fb74bf3b9266e4546df70399f9ae 100644 (file)
@@ -29,7 +29,7 @@
 #include "AsyncEventServer.h"\r
 #include "SocketInfo.h"\r
 \r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <string>\r
 #include <algorithm>\r
 #include <boost/algorithm/string/replace.hpp>\r
index a04a777b18534eed8299144ea2648d2ee42a2e5f..97a5894663ad58b25891245f613350403048b92d 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <configuration>\r
   <paths>\r
-    <media-path>D:\casparcg\_media\</media-path>\r
-    <log-path>D:\casparcg\_log\</log-path>\r
-    <data-path>D:\casparcg\_data\</data-path>\r
-    <template-path>D:\casparcg\_templates\</template-path>\r
+    <media-path>M:\caspar\_media\</media-path>\r
+    <log-path>M:\caspar\_log\</log-path>\r
+    <data-path>M:\caspar\_data\</data-path>\r
+    <template-path>M:\caspar\_templates\</template-path>\r
   </paths>\r
   <log-level>trace</log-level>\r
   <channel-grid>true</channel-grid>\r
index 0f2a71522d99c1fce67133145411fa2b06a6fff4..33acae2aac81d789a89c36d199a4de21133062ce 100644 (file)
@@ -23,6 +23,8 @@
 // Replace the standard memory allocation routines in Microsoft* C/C++ RTL \r
 // (malloc/free, global new/delete, etc.) with the TBB memory allocator. \r
 \r
+#include "stdafx.h"\r
+\r
 #ifdef _DEBUG\r
        #define _CRTDBG_MAP_ALLOC\r
        #include <stdlib.h>\r
@@ -35,9 +37,6 @@
 \r
 #include "server.h"\r
 \r
-#define NOMINMAX\r
-#define WIN32_LEAN_AND_MEAN\r
-\r
 #include <windows.h>\r
 #include <winnt.h>\r
 #include <mmsystem.h>\r
@@ -54,7 +53,7 @@
 #include <common/env.h>\r
 #include <common/exception/win32_exception.h>\r
 #include <common/exception/exceptions.h>\r
-#include <common/log/log.h>\r
+#include <common/log.h>\r
 #include <common/gl/gl_check.h>\r
 #include <common/os/windows/current_version.h>\r
 #include <common/os/windows/system_info.h>\r
index 407a12f5d6a650184d76fe19917e88d4e51744dc..d9579052f34a30db7fe1485a0cbcf113ccdffbe8 100644 (file)
 *\r
 * Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+#include "stdafx.h"\r
+\r
 #include "server.h"\r
 \r
 #include <common/env.h>\r
 #include <common/exception/exceptions.h>\r
-#include <common/utility/string.h>\r
+#include <common/utf.h>\r
 \r
 #include <core/mixer/gpu/ogl_device.h>\r
 #include <core/video_channel.h>\r
index a076ad3672e99296cb95e0d145435d616d472574..31135a3d1cd206ccf74ef45132764d1c94fb057f 100644 (file)
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="server.cpp">\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Use</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>\r
     </ClCompile>\r
     <ClCompile Include="main.cpp">\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Use</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>\r
+    </ClCompile>\r
+    <ClCompile Include="stdafx.cpp">\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>\r
     </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
@@ -61,6 +65,7 @@
   <ItemGroup>\r
     <ClInclude Include="server.h" />\r
     <ClInclude Include="resource.h" />\r
+    <ClInclude Include="stdafx.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="shell.rc" />\r
index 9208de209c6ee3e73b66d040029d07beb555b078..30fdc61e0b7b0d86779725121a9cbe3671492363 100644 (file)
@@ -7,6 +7,9 @@
     <ClCompile Include="server.cpp">\r
       <Filter>source</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="stdafx.cpp">\r
+      <Filter>stdafx</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <None Include="casparcg.config" />\r
     <ClInclude Include="resource.h">\r
       <Filter>source</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="stdafx.h">\r
+      <Filter>stdafx</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="source">\r
       <UniqueIdentifier>{39e46848-dfec-441d-b0c0-f131380cdc6e}</UniqueIdentifier>\r
     </Filter>\r
+    <Filter Include="stdafx">\r
+      <UniqueIdentifier>{d8384077-3b1f-45df-93e3-26aa9d97bdb3}</UniqueIdentifier>\r
+    </Filter>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="shell.rc">\r
diff --git a/shell/stdafx.cpp b/shell/stdafx.cpp
new file mode 100644 (file)
index 0000000..1577c4e
--- /dev/null
@@ -0,0 +1 @@
+#include "stdafx.h"
\ No newline at end of file
diff --git a/shell/stdafx.h b/shell/stdafx.h
new file mode 100644 (file)
index 0000000..5dcf2cc
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once\r
+\r
+#define NOMINMAX\r
+#define WIN32_LEAN_AND_MEAN
\ No newline at end of file