--- /dev/null
+/*\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
+*\r
+* This file is part of CasparCG (www.casparcg.com).\r
+*\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
+*\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
+*\r
+* Author: Robert Nagy, ronag89@gmail.com\r
+*/\r
+\r
+#pragma once\r
+\r
+#include "log.h"\r
+\r
+#ifdef _MSC_VER\r
+#define _CASPAR_DBG_BREAK _CrtDbgBreak()\r
+#else\r
+#define _CASPAR_DBG_BREAK\r
+#endif\r
+\r
+#define CASPAR_VERIFY_EXPR_STR(str) #str\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
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\;..\common;..\dependencies64\bluefish\include\;..\dependencies64\boost\;..\dependencies64\tbb\include\;..\dependencies64\sfml\include\;..\dependencies64\glew\include\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\;..\common;..\dependencies64\bluefish\include\;..\dependencies64\boost\;..\dependencies64\tbb\include\;..\dependencies64\sfml\include\;..\dependencies64\glew\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\dependencies64\bluefish\include\;..\dependencies64\boost\;..\dependencies64\tbb\include\;..\dependencies64\sfml\include\;..\dependencies64\glew\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\dependencies64\bluefish\include\;..\dependencies64\boost\;..\dependencies64\tbb\include\;..\dependencies64\sfml\include\;..\dependencies64\glew\include\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
</Lib>\r
</ItemDefinitionGroup>\r
<ItemGroup>\r
+ <ClInclude Include="assert.h" />\r
<ClInclude Include="compiler\vs\disable_silly_warnings.h" />\r
<ClInclude Include="concurrency\com_context.h" />\r
<ClInclude Include="concurrency\executor.h" />\r
<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="forward.h">\r
<Filter>source</Filter>\r
</ClInclude>\r
- <ClInclude Include="no_copy.h">\r
+ <ClInclude Include="enum_class.h">\r
<Filter>source</Filter>\r
</ClInclude>\r
- <ClInclude Include="enum_class.h">\r
+ <ClInclude Include="assert.h">\r
<Filter>source</Filter>\r
</ClInclude>\r
</ItemGroup>\r
#pragma once\r
\r
#include "../memory/safe_ptr.h"\r
-#include "../no_copy.h"\r
\r
#include <string>\r
#include <tuple>\r
\r
+#include <boost/noncopyable.hpp>\r
+\r
namespace caspar { namespace diagnostics {\r
\r
int color(float r, float g, float b, float a = 1.0f);\r
std::tuple<float, float, float, float> color(int code);\r
\r
-class graph\r
+class graph : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(graph);\r
-\r
friend void register_graph(const safe_ptr<graph>& graph);\r
public:\r
graph();\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
void check_is_configured()\r
{\r
if(pt.empty())\r
- BOOST_THROW_EXCEPTION(invalid_operation() << wmsg_info(L"Enviroment properties has not been configured"));\r
+ BOOST_THROW_EXCEPTION(invalid_operation() << msg_info(L"Enviroment properties has not been configured"));\r
}\r
\r
void configure(const std::wstring& filename)\r
\r
namespace caspar {\r
\r
-typedef boost::error_info<struct tag_arg_name_info, std::string> arg_name_info;\r
-typedef boost::error_info<struct tag_arg_value_info, std::string> arg_value_info;\r
-typedef boost::error_info<struct tag_msg_info, std::string> msg_info;\r
-typedef boost::error_info<struct tag_source_info, std::string> source_info;\r
-typedef boost::error_info<struct tag_errorstr_info, std::string> errstr_info;\r
-typedef boost::error_info<struct tag_errinfo_file_name, std::string> err_file_name_info;\r
-\r
-inline arg_name_info warg_name_info(const std::wstring& str) {return arg_name_info(u8(str));}\r
-inline arg_value_info warg_value_info(const std::wstring& str) {return arg_value_info(u8(str));}\r
-inline msg_info wmsg_info(const std::wstring& str) {return msg_info(u8(str));}\r
-inline source_info wsource_info(const std::wstring& str) {return source_info(u8(str));}\r
-inline err_file_name_info werr_file_name_info(const std::wstring& str){return err_file_name_info(u8(str));}\r
-\r
-typedef boost::error_info<struct tag_line_info, size_t> line_info;\r
-typedef boost::error_info<struct errinfo_nested_exception_, std::exception_ptr> errinfo_nested_exception;\r
+typedef boost::error_info<struct tag_arg_name_info, std::string> arg_name_info_t;\r
+typedef boost::error_info<struct tag_arg_value_info, std::string> arg_value_info_t;\r
+typedef boost::error_info<struct tag_msg_info, std::string> msg_info_t;\r
+typedef boost::error_info<struct tag_msg_info, std::string> error_info_t;\r
+typedef boost::error_info<struct tag_source_info, std::string> source_info_t;\r
+typedef boost::error_info<struct tag_file_name_info, std::string> file_name_info_t;\r
+\r
+template<typename T>\r
+inline arg_name_info_t arg_name_info(const T& str) {return arg_name_info_t(u8(str));}\r
+template<typename T>\r
+inline arg_value_info_t arg_value_info(const T& str) {return arg_value_info_t(u8(str));}\r
+template<typename T>\r
+inline msg_info_t msg_info(const T& str) {return msg_info_t(u8(str));}\r
+template<typename T>\r
+inline error_info_t error_info(const T& str) {return error_info_t(u8(str));}\r
+template<typename T>\r
+inline source_info_t source_info(const T& str) {return source_info_t(u8(str));}\r
+template<typename T>\r
+inline file_name_info_t file_name_info(const T& str) {return file_name_info_t(u8(str));}\r
+\r
+typedef boost::error_info<struct tag_line_info, size_t> line_info;\r
+typedef boost::error_info<struct tag_nested_exception_, std::exception_ptr> nested_exception;\r
\r
struct caspar_exception : virtual boost::exception, virtual std::exception \r
{\r
\r
#include "exceptions.h"\r
\r
-#include "../no_copy.h"\r
-\r
struct _EXCEPTION_RECORD;\r
struct _EXCEPTION_POINTERS;\r
\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
\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
case GL_INVALID_ENUM :\r
BOOST_THROW_EXCEPTION(ogl_invalid_enum()\r
<< msg_info("an unacceptable value has been specified for an enumerated argument")\r
- << errstr_info("GL_INVALID_ENUM")\r
+ << error_info("GL_INVALID_ENUM")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_INVALID_VALUE :\r
BOOST_THROW_EXCEPTION(ogl_invalid_value()\r
<< msg_info("a numeric argument is out of range")\r
- << errstr_info("GL_INVALID_VALUE")\r
+ << error_info("GL_INVALID_VALUE")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_INVALID_OPERATION :\r
BOOST_THROW_EXCEPTION(ogl_invalid_operation()\r
<< msg_info("the specified operation is not allowed in the current state")\r
- << errstr_info("GL_INVALID_OPERATION")\r
+ << error_info("GL_INVALID_OPERATION")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_STACK_OVERFLOW :\r
BOOST_THROW_EXCEPTION(ogl_stack_overflow()\r
<< msg_info("this command would cause a stack overflow")\r
- << errstr_info("GL_STACK_OVERFLOW")\r
+ << error_info("GL_STACK_OVERFLOW")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_STACK_UNDERFLOW :\r
BOOST_THROW_EXCEPTION(ogl_stack_underflow()\r
<< msg_info("this command would cause a stack underflow")\r
- << errstr_info("GL_STACK_UNDERFLOW")\r
+ << error_info("GL_STACK_UNDERFLOW")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_OUT_OF_MEMORY :\r
BOOST_THROW_EXCEPTION(ogl_out_of_memory()\r
<< msg_info("there is not enough memory left to execute the command")\r
- << errstr_info("GL_OUT_OF_MEMORY")\r
+ << error_info("GL_OUT_OF_MEMORY")\r
<< line_info(line)\r
<< source_info(file));\r
\r
case GL_INVALID_FRAMEBUFFER_OPERATION_EXT :\r
BOOST_THROW_EXCEPTION(ogl_stack_underflow()\r
<< msg_info("the object bound to FRAMEBUFFER_BINDING_EXT is not \"framebuffer complete\"")\r
- << errstr_info("GL_INVALID_FRAMEBUFFER_OPERATION_EXT")\r
+ << error_info("GL_INVALID_FRAMEBUFFER_OPERATION_EXT")\r
<< line_info(line)\r
<< source_info(file));\r
}\r
+++ /dev/null
-#pragma once\r
-\r
-#define CASPAR_NO_COPY(TypeName) \\r
- TypeName(const TypeName&); \\r
- void operator=(const TypeName&)\r
#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/assert.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
#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
-struct frame_consumer\r
+struct frame_consumer : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(frame_consumer);\r
-\r
frame_consumer(){}\r
virtual ~frame_consumer() {}\r
\r
#include <common/memory/memshfl.h>\r
#include <common/env.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/circular_buffer.hpp>\r
#include <boost/timer.hpp>\r
#include <boost/range/algorithm.hpp>\r
#pragma once\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
\r
+#include <boost/noncopyable.hpp>\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
FORWARD1(boost, template<typename> class unique_future)\r
namespace caspar { namespace core {\r
\r
class output sealed : public target<std::pair<safe_ptr<class read_frame>, std::shared_ptr<void>>>\r
+ , boost::noncopyable\r
{\r
- CASPAR_NO_COPY(output);\r
public:\r
explicit output(const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc, int channel_index);\r
\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
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
\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 device_buffer\r
+class device_buffer : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(device_buffer);\r
public: \r
int stride() const; \r
int width() const;\r
\r
#include <memory>\r
\r
+#include <boost/noncopyable.hpp>\r
+\r
namespace caspar { namespace core {\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
-class fence\r
+class fence : boost::noncopyable\r
{\r
public:\r
fence();\r
\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 host_buffer\r
+class host_buffer : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(host_buffer);\r
public:\r
enum usage_t\r
{\r
#include <common/exception/exceptions.h>\r
#include <common/gl/gl_check.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/foreach.hpp>\r
\r
#include <gl/glew.h>\r
\r
safe_ptr<device_buffer> ogl_device::create_device_buffer(int width, int height, int stride)\r
{\r
- BOOST_VERIFY(stride > 0 && stride < 5);\r
- BOOST_VERIFY(width > 0 && height > 0);\r
+ CASPAR_VERIFY(stride > 0 && stride < 5);\r
+ CASPAR_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
\r
safe_ptr<host_buffer> ogl_device::create_host_buffer(int size, host_buffer::usage_t usage)\r
{\r
- BOOST_VERIFY(usage == host_buffer::write_only || usage == host_buffer::read_only);\r
- BOOST_VERIFY(size > 0);\r
+ CASPAR_VERIFY(usage == host_buffer::write_only || usage == host_buffer::read_only);\r
+ CASPAR_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
#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
+\r
#include <array>\r
#include <unordered_map>\r
\r
class shader;\r
\r
template<typename T>\r
-struct buffer_pool\r
+struct buffer_pool : boost::noncopyable\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
};\r
\r
class ogl_device : public std::enable_shared_from_this<ogl_device>\r
+ , boost::noncopyable\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
\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
\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 <string>\r
\r
namespace caspar { namespace core {\r
\r
-class shader\r
+class shader : boost::noncopyable\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
\r
namespace caspar { namespace core {\r
\r
-CASPAR_BEGIN_ENUM_CLASS\r
+struct blend_mode_def\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
+ 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
+typedef enum_class<blend_mode_def> blend_mode;\r
\r
blend_mode get_blend_mode(const std::wstring& str);\r
\r
#include <core/producer/frame/pixel_format.h>\r
#include <core/producer/frame/frame_transform.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <boost/noncopyable.hpp>\r
+#include <common/assert.h>\r
\r
namespace caspar { namespace core {\r
\r
\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
{\r
static const double epsilon = 0.001;\r
\r
- BOOST_ASSERT(params.pix_desc.planes.size() == params.textures.size());\r
+ CASPAR_ASSERT(params.pix_desc.planes.size() == params.textures.size());\r
\r
if(params.textures.empty() || !params.background)\r
return;\r
\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
-CASPAR_BEGIN_ENUM_CLASS\r
+struct keyer_def\r
{\r
- linear = 0,\r
- additive\r
-}\r
-CASPAR_END_ENUM_CLASS(keyer)\r
+ enum type\r
+ {\r
+ linear = 0,\r
+ additive,\r
+ };\r
+};\r
+typedef enum_class<keyer_def> keyer;\r
\r
struct draw_params sealed\r
{\r
}\r
};\r
\r
-class image_kernel sealed\r
+class image_kernel sealed : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(image_kernel);\r
public:\r
image_kernel(const safe_ptr<class ogl_device>& ogl);\r
void draw(draw_params&& params);\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
class image_mixer sealed : public frame_visitor\r
{\r
- CASPAR_NO_COPY(image_mixer);\r
public:\r
image_mixer(const safe_ptr<class ogl_device>& ogl);\r
\r
#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
\r
struct mixer::impl : boost::noncopyable\r
{ \r
- CASPAR_NO_COPY(impl);\r
+ safe_ptr<mixer::target_t> target_;\r
\r
- safe_ptr<mixer::target_t> target_;\r
+ safe_ptr<diagnostics::graph> graph_;\r
+ boost::timer mix_timer_; \r
\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> blend_modes_;\r
\r
\r
#include "image/blend_modes.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
\r
+#include <boost/noncopyable.hpp>\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
#include <map>\r
namespace caspar { namespace core {\r
\r
class mixer sealed : public target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>>\r
+ , boost::noncopyable\r
{\r
- CASPAR_NO_COPY(mixer);\r
public: \r
typedef target<std::pair<safe_ptr<class read_frame>, std::shared_ptr<void>>> target_t;\r
\r
\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
// auto height = 720;\r
// auto width4 = frame->image_data().size()/height;\r
//\r
-// BOOST_ASSERT(frame->image_data().size() % height == 0);\r
+// CASPAR_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
\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 <stdint.h>\r
\r
namespace caspar { namespace core {\r
\r
-class read_frame sealed\r
+class read_frame sealed : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(read_frame);\r
public:\r
read_frame();\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
#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
\r
namespace caspar { namespace core {\r
\r
-struct write_frame::impl\r
+struct write_frame::impl : boost::noncopyable\r
{ \r
std::shared_ptr<ogl_device> ogl_;\r
std::vector<std::shared_ptr<host_buffer>> buffers_;\r
write_frame::write_frame(const void* tag) : impl_(new impl(tag)){}\r
write_frame::write_frame(const safe_ptr<ogl_device>& ogl, const void* tag, const core::pixel_format_desc& desc) \r
: impl_(new impl(ogl, tag, desc)){}\r
-write_frame::write_frame(const write_frame& other) : impl_(new impl(*other.impl_)){}\r
write_frame::write_frame(write_frame&& other) : impl_(std::move(other.impl_)){}\r
-write_frame& write_frame::operator=(const write_frame& other)\r
-{\r
- basic_frame temp(other);\r
- temp.swap(*this);\r
- return *this;\r
-}\r
write_frame& write_frame::operator=(write_frame&& other)\r
{\r
write_frame temp(std::move(other));\r
return *this;\r
}\r
void write_frame::swap(write_frame& other){impl_.swap(other.impl_);}\r
-\r
boost::iterator_range<uint8_t*> write_frame::image_data(int index){return impl_->image_data(index);}\r
audio_buffer& write_frame::audio_data() { return impl_->audio_data_; }\r
const void* write_frame::tag() const {return impl_->tag_;}\r
explicit write_frame(const void* tag);\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
-\r
- write_frame& operator=(const write_frame& other);\r
write_frame& operator=(write_frame&& other);\r
\r
// basic_frame\r
#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
\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
\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
#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
\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
{\r
auto color2 = get_hex_color(color);\r
if(color2.length() != 9 || color2[0] != '#')\r
- BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << warg_value_info(color2) << msg_info("Invalid color."));\r
+ BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << arg_value_info(color2) << msg_info("Invalid color."));\r
\r
core::pixel_format_desc desc;\r
desc.pix_fmt = pixel_format::bgra;\r
auto& value = *reinterpret_cast<uint32_t*>(frame->image_data().begin());\r
std::wstringstream str(color2.substr(1));\r
if(!(str >> std::hex >> value) || !str.eof())\r
- BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << warg_value_info(color2) << msg_info("Invalid color."));\r
+ BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info("color") << arg_value_info(color2) << msg_info("Invalid color."));\r
\r
frame->commit();\r
\r
basic_frame::basic_frame(const safe_ptr<basic_frame>& frame) : impl_(new impl(frame)){}\r
basic_frame::basic_frame(safe_ptr<basic_frame>&& frame) : impl_(new impl(std::move(frame))){}\r
basic_frame::basic_frame(basic_frame&& other) : impl_(std::move(other.impl_)){}\r
-basic_frame& basic_frame::operator=(const basic_frame& other)\r
+basic_frame& basic_frame::operator=(basic_frame other)\r
{\r
- basic_frame temp(other);\r
- temp.swap(*this);\r
- return *this;\r
-}\r
-basic_frame& basic_frame::operator=(basic_frame&& other)\r
-{\r
- basic_frame temp(std::move(other));\r
- temp.swap(*this);\r
+ other.swap(*this);\r
return *this;\r
}\r
void basic_frame::swap(basic_frame& other){impl_.swap(other.impl_);}\r
basic_frame(const basic_frame& other);\r
basic_frame(basic_frame&& other);\r
\r
- basic_frame& operator=(const basic_frame& other);\r
- basic_frame& operator=(basic_frame&& other);\r
+ basic_frame& operator=(basic_frame other);\r
\r
void swap(basic_frame& other);\r
\r
\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
-struct frame_factory\r
+struct frame_factory : boost::noncopyable\r
{\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
\r
#pragma once\r
\r
+#include <boost/noncopyable.hpp>\r
+\r
namespace caspar { namespace core {\r
\r
-struct frame_visitor\r
+struct frame_visitor : boost::noncopyable\r
{\r
virtual void begin(class basic_frame& frame) = 0;\r
virtual void end() = 0;\r
\r
namespace caspar { namespace core {\r
\r
-CASPAR_BEGIN_ENUM_CLASS\r
+struct pixel_format_def\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
+ 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
+typedef enum_class<pixel_format_def> pixel_format;\r
\r
struct pixel_format_desc sealed\r
{\r
\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/enum_class.h>\r
#include <string>\r
#include <vector>\r
\r
+#include <boost/noncopyable.hpp>\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
FORWARD1(caspar, class executor);\r
\r
namespace caspar { namespace core {\r
\r
-struct frame_producer\r
+struct frame_producer : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(frame_producer);\r
public:\r
- CASPAR_BEGIN_ENUM_CLASS\r
+ struct flags_def\r
{\r
- none = 0,\r
- alpha_only = 2,\r
- deinterlace = 4, \r
- }\r
- CASPAR_END_ENUM_CLASS(flags)\r
+ enum type\r
+ {\r
+ none = 0,\r
+ alpha_only = 2,\r
+ deinterlace = 4,\r
+ };\r
+ };\r
+ typedef enum_class<flags_def> flags;\r
\r
frame_producer(){}\r
virtual ~frame_producer(){} \r
#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
\r
#include <boost/foreach.hpp>\r
#include <boost/timer.hpp>\r
-\r
-#include <tbb/parallel_for_each.h>\r
-\r
#include <boost/property_tree/ptree.hpp>\r
#include <boost/range/algorithm_ext.hpp>\r
\r
+#include <tbb/parallel_for_each.h>\r
+\r
#include <map>\r
#include <vector>\r
\r
graph_->set_color("produce-time", diagnostics::color(0.0f, 1.0f, 0.0f));\r
}\r
\r
- void spawn_token()\r
+ void start(int tokens)\r
{\r
std::weak_ptr<impl> self = shared_from_this();\r
- executor_.begin_invoke([=]{tick(self);});\r
+ for(int n = 0; n < tokens; ++n)\r
+ executor_.begin_invoke([=]{tick(self);});\r
}\r
\r
void tick(const std::weak_ptr<impl>& self)\r
};\r
\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::start(int tokens){impl_->start(tokens);}\r
void stage::apply_transforms(const std::vector<stage::transform_tuple_t>& transforms){impl_->apply_transforms(transforms);}\r
void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
void stage::clear_transforms(int index){impl_->clear_transforms(index);}\r
void stage::clear_transforms(){impl_->clear_transforms();}\r
-void stage::spawn_token(){impl_->spawn_token();}\r
void stage::load(int index, const safe_ptr<frame_producer>& producer, bool preview, int auto_play_delta){impl_->load(index, producer, preview, auto_play_delta);}\r
void stage::pause(int index){impl_->pause(index);}\r
void stage::play(int index){impl_->play(index);}\r
\r
#include "frame_producer.h"\r
\r
-#include <common/no_copy.h>\r
+#include <common/concurrency/target.h>\r
#include <common/forward.h>\r
#include <common/memory/safe_ptr.h>\r
-#include <common/concurrency/target.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 stage sealed\r
+class stage sealed : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(stage);\r
public: \r
typedef std::function<struct frame_transform(struct frame_transform)> transform_func_t;\r
typedef std::tuple<int, transform_func_t, unsigned int, std::wstring> transform_tuple_t;\r
typedef target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>> target_t;\r
\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
+ explicit stage(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc);\r
+ \r
+ void start(int tokens);\r
+\r
void apply_transforms(const std::vector<transform_tuple_t>& transforms);\r
void apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
void clear_transforms(int index);\r
void clear_transforms();\r
-\r
- void spawn_token();\r
- \r
+ \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
boost::unique_future<boost::property_tree::wptree> info(int layer) const;\r
\r
void set_video_format_desc(const struct video_format_desc& format_desc);\r
-\r
private:\r
struct impl;\r
safe_ptr<impl> impl_;\r
#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
-\r
-using namespace boost::assign;\r
-\r
namespace caspar { namespace core { \r
\r
struct transition_producer : public frame_producer\r
{ \r
- CASPAR_NO_COPY(transition_producer);\r
-\r
const field_mode mode_;\r
unsigned int current_frame_;\r
\r
\r
safe_ptr<basic_frame> compose(const safe_ptr<basic_frame>& dest_frame, const safe_ptr<basic_frame>& src_frame) \r
{ \r
- if(info_.type == transition::cut) \r
+ if(info_.type == transition_type::cut) \r
return src_frame;\r
\r
const double delta1 = info_.tweener(current_frame_*2-1, 0.0, 1.0, static_cast<double>(info_.duration*2));\r
d_frame1->get_frame_transform().volume = 0.0;\r
d_frame2->get_frame_transform().volume = delta2;\r
\r
- if(info_.type == transition::mix)\r
+ if(info_.type == transition_type::mix)\r
{\r
d_frame1->get_frame_transform().opacity = delta1; \r
d_frame1->get_frame_transform().is_mix = true;\r
s_frame2->get_frame_transform().opacity = 1.0-delta2; \r
s_frame2->get_frame_transform().is_mix = true;\r
}\r
- if(info_.type == transition::slide)\r
+ if(info_.type == transition_type::slide)\r
{\r
d_frame1->get_frame_transform().fill_translation[0] = (-1.0+delta1)*dir; \r
d_frame2->get_frame_transform().fill_translation[0] = (-1.0+delta2)*dir; \r
}\r
- else if(info_.type == transition::push)\r
+ else if(info_.type == transition_type::push)\r
{\r
d_frame1->get_frame_transform().fill_translation[0] = (-1.0+delta1)*dir;\r
d_frame2->get_frame_transform().fill_translation[0] = (-1.0+delta2)*dir;\r
s_frame1->get_frame_transform().fill_translation[0] = (0.0+delta1)*dir; \r
s_frame2->get_frame_transform().fill_translation[0] = (0.0+delta2)*dir; \r
}\r
- else if(info_.type == transition::wipe) \r
+ else if(info_.type == transition_type::wipe) \r
{\r
d_frame1->get_frame_transform().clip_scale[0] = delta1; \r
d_frame2->get_frame_transform().clip_scale[0] = delta2; \r
\r
namespace caspar { namespace core {\r
\r
-CASPAR_BEGIN_ENUM_CLASS\r
+struct transition_type_def\r
{\r
- cut, \r
- mix, \r
- push, \r
- slide, \r
- wipe,\r
- count\r
-}\r
-CASPAR_END_ENUM_CLASS(transition)\r
+ enum type\r
+ {\r
+ cut, \r
+ mix, \r
+ push, \r
+ slide, \r
+ wipe,\r
+ count\r
+ };\r
+};\r
+typedef enum_class<transition_type_def> transition_type;\r
\r
-CASPAR_BEGIN_ENUM_CLASS\r
+struct transition_direction_def\r
{\r
- from_left,\r
- from_right,\r
- count\r
-}\r
-CASPAR_END_ENUM_CLASS(transition_direction)\r
- \r
+ enum type\r
+ {\r
+ from_left,\r
+ from_right,\r
+ count\r
+ };\r
+};\r
+typedef enum_class<transition_direction_def> transition_direction;\r
+\r
struct transition_info\r
{\r
transition_info() \r
- : type(transition::cut)\r
+ : type(transition_type::cut)\r
, duration(0)\r
, direction(transition_direction::from_left)\r
, tweener(get_tweener(L"linear")){}\r
\r
size_t duration;\r
transition_direction direction;\r
- transition type;\r
+ transition_type type;\r
tweener_t tweener;\r
};\r
\r
\r
const safe_ptr<caspar::core::output> output_;\r
const safe_ptr<caspar::core::mixer> mixer_;\r
- const safe_ptr<caspar::core::stage> stage_;\r
- \r
+ const safe_ptr<caspar::core::stage> stage_; \r
public:\r
impl(int index, const video_format_desc& format_desc, const safe_ptr<ogl_device>& ogl) \r
: index_(index)\r
graph_->set_text(print());\r
diagnostics::register_graph(graph_);\r
\r
- for(int n = 0; n < std::max(1, env::properties().get(L"configuration.pipeline-tokens", 2)); ++n)\r
- stage_->spawn_token();\r
+ stage_->start(std::max(1, env::properties().get(L"configuration.pipeline-tokens", 2)));\r
\r
CASPAR_LOG(info) << print() << " Successfully Initialized.";\r
}\r
video_format_desc video_channel::get_video_format_desc() const{return impl_->format_desc_;}\r
void video_channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
boost::property_tree::wptree video_channel::info() const{return impl_->info();}\r
-int video_channel::index() const {return impl_->index_;}\r
\r
}}
\ No newline at end of file
#pragma once\r
\r
#include <common/memory/safe_ptr.h>\r
-#include <common/no_copy.h>\r
\r
+#include <boost/noncopyable.hpp>\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
namespace caspar { namespace core {\r
\r
-class video_channel sealed\r
+class video_channel sealed : boost::noncopyable\r
{\r
- CASPAR_NO_COPY(video_channel);\r
public:\r
explicit video_channel(int index, const struct video_format_desc& format_desc, const safe_ptr<class ogl_device>& ogl);\r
\r
\r
boost::property_tree::wptree info() const;\r
\r
- int index() const;\r
-\r
+ //int index() const;\r
private:\r
struct impl;\r
safe_ptr<impl> impl_;\r
\r
namespace caspar { namespace core {\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
+struct video_format_def \r
+{ \r
+ enum type \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
+};\r
+typedef enum_class<video_format_def> video_format;\r
\r
-CASPAR_BEGIN_ENUM_CLASS\r
+struct field_mode_def\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
+ enum type \r
+ {\r
+ empty = 0,\r
+ lower = 1,\r
+ upper = 2,\r
+ progressive = 3, // NOTE: progressive == lower | upper;\r
+ };\r
+};\r
+typedef enum_class<field_mode_def> field_mode;\r
\r
struct video_format_desc sealed\r
{\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\asmlib;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\asmlib;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\asmlib;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\asmlib;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
\r
#include <tbb/concurrent_queue.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/lexical_cast.hpp>\r
#include <boost/timer.hpp>\r
#include <boost/range/algorithm.hpp>\r
\r
//Setting output Video mode\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_MODE, vid_fmt_))) \r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to set videomode."));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set videomode."));\r
\r
//Select Update Mode for output\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_UPDATE_TYPE, UPD_FMT_FRAME))) \r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to set update type."));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set update type."));\r
\r
disable_video_output();\r
\r
//Enable dual link output\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_DUAL_LINK_OUTPUT, 1)))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to enable dual link."));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to enable dual link."));\r
\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE, Signal_FormatType_4224)))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to set dual link format type to 4:2:2:4."));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set dual link format type to 4:2:2:4."));\r
\r
//Select output memory format\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_MEMORY_FORMAT, MEM_FMT_ARGB_PC))) \r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to set memory format."));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set memory format."));\r
\r
//Select image orientation\r
if(BLUE_FAIL(set_card_property(blue_, VIDEO_IMAGE_ORIENTATION, ImageOrientation_Normal)))\r
\r
virtual bool send(const safe_ptr<core::read_frame>& frame) override\r
{\r
- BOOST_VERIFY(audio_cadence_.front() == static_cast<size_t>(frame->audio_data().size()));\r
+ CASPAR_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
vid_fmt = videoMode; \r
}\r
if(vid_fmt == VID_FMT_INVALID)\r
- BOOST_THROW_EXCEPTION(caspar_exception() << msg_info("video-mode not supported.") << warg_value_info(format_desc.name));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info("video-mode not supported.") << arg_value_info(format_desc.name));\r
\r
return vid_fmt;\r
}\r
#include <tbb/concurrent_queue.h>\r
#include <tbb/cache_aligned_allocator.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/lexical_cast.hpp>\r
#include <boost/circular_buffer.hpp>\r
#include <boost/timer.hpp>\r
\r
virtual bool send(const safe_ptr<core::read_frame>& frame) override\r
{\r
- BOOST_VERIFY(audio_cadence_.front() == static_cast<int>(frame->audio_data().size()));\r
+ CASPAR_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
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
// NOTE: bmdFormat8BitARGB is currently not supported by any decklink card. (2011-05-08)\r
if(FAILED(input_->EnableVideoInput(display_mode, bmdFormat8BitYUV, 0))) \r
BOOST_THROW_EXCEPTION(caspar_exception() \r
- << wmsg_info(print() + L" Could not enable video input.")\r
+ << msg_info(print() + L" Could not enable video input.")\r
<< boost::errinfo_api_function("EnableVideoInput"));\r
\r
if(FAILED(input_->EnableAudioInput(bmdAudioSampleRate48kHz, bmdAudioSampleType32bitInteger, format_desc_.audio_channels))) \r
BOOST_THROW_EXCEPTION(caspar_exception() \r
- << wmsg_info(print() + L" Could not enable audio input.")\r
+ << msg_info(print() + L" Could not enable audio input.")\r
<< boost::errinfo_api_function("EnableAudioInput"));\r
\r
if (FAILED(input_->SetCallback(this)) != S_OK)\r
BOOST_THROW_EXCEPTION(caspar_exception() \r
- << wmsg_info(print() + L" Failed to set input callback.")\r
+ << msg_info(print() + L" Failed to set input callback.")\r
<< boost::errinfo_api_function("SetCallback"));\r
\r
if(FAILED(input_->StartStreams()))\r
BOOST_THROW_EXCEPTION(caspar_exception() \r
- << wmsg_info(print() + L" Failed to start input stream.")\r
+ << msg_info(print() + L" Failed to start input stream.")\r
<< boost::errinfo_api_function("StartStreams"));\r
}\r
\r
\r
auto video_codec = avcodec_find_encoder_by_name(u8(codec).c_str());\r
if(video_codec == nullptr)\r
- BOOST_THROW_EXCEPTION(invalid_argument() << warg_name_info(codec));\r
+ BOOST_THROW_EXCEPTION(invalid_argument() << arg_name_info(codec));\r
\r
// Add the audio and video streams using the default format codecs and initialize the codecs .\r
video_st_ = add_video_stream(video_codec->id, u8(options));\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
#include <core/producer/frame/frame_transform.h>\r
\r
#include <boost/algorithm/string.hpp>\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/assign.hpp>\r
#include <boost/timer.hpp>\r
#include <boost/foreach.hpp>\r
#pragma warning (pop)\r
#endif\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/foreach.hpp>\r
#include <boost/range/algorithm_ext/push_back.hpp>\r
#include <boost/algorithm/string/predicate.hpp>\r
\r
core::audio_buffer pop_audio()\r
{\r
- BOOST_VERIFY(audio_streams_.front().size() >= static_cast<size_t>(audio_cadence_.front()));\r
+ CASPAR_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
\r
#include "tbb_avcodec.h"\r
\r
+#include <common/assert.h>\r
#include <common/log.h>\r
#include <common/env.h>\r
\r
tbb::atomic<int> counter; \r
counter = 0; \r
\r
- BOOST_VERIFY(tbb::tbb_thread::hardware_concurrency() < 16);\r
+ CASPAR_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
\r
#include <tbb/parallel_for.h>\r
\r
-#include <boost/assert.hpp>\r
+#include <common/assert.h>\r
#include <boost/filesystem.hpp>\r
#include <boost/lexical_cast.hpp>\r
\r
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
- BOOST_VERIFY(size == write->image_data().size()); \r
+ CASPAR_VERIFY(size == write->image_data().size()); \r
}\r
else\r
{\r
auto decoded = decoded_frame->data[n];\r
auto decoded_linesize = decoded_frame->linesize[n];\r
\r
- BOOST_ASSERT(decoded);\r
- BOOST_ASSERT(write->image_data(n).begin());\r
+ CASPAR_ASSERT(decoded);\r
+ CASPAR_ASSERT(write->image_data(n).begin());\r
\r
// Copy line by line since ffmpeg sometimes pads each line.\r
tbb::affinity_partitioner ap;\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
graph_->set_color("skip-sync", diagnostics::color(0.8f, 0.3f, 0.2f)); \r
\r
if(FAILED(CComObject<caspar::flash::FlashAxContainer>::CreateInstance(&ax_)))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to create FlashAxContainer"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to create FlashAxContainer"));\r
\r
ax_->set_print([this]{return print();});\r
\r
if(FAILED(ax_->CreateAxControl()))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to Create FlashAxControl"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to Create FlashAxControl"));\r
\r
CComPtr<IShockwaveFlash> spFlash;\r
if(FAILED(ax_->QueryControl(&spFlash)))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to Query FlashAxControl"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to Query FlashAxControl"));\r
\r
if(FAILED(spFlash->put_Playing(true)) )\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to start playing Flash"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to start playing Flash"));\r
\r
if(FAILED(spFlash->put_Movie(CComBSTR(filename.c_str()))))\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to Load Template Host"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to Load Template Host"));\r
\r
if(FAILED(spFlash->put_ScaleMode(2))) //Exact fit. Scale without respect to the aspect ratio.\r
- BOOST_THROW_EXCEPTION(caspar_exception() << wmsg_info(print() + L" Failed to Set Scale Mode"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to Set Scale Mode"));\r
\r
ax_->SetSize(width_, height_); \r
\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\freeimage\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\sfml\include\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\sfml\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\sfml\include\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\sfml\include\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
<PropertyGroup>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)tmp\$(Configuration)\</IntDir>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\glew\include\;..\..\dependencies64\sfml\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\common;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\glew\include\;..\..\dependencies64\sfml\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\glew\include\;..\..\dependencies64\sfml\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\;..\..\dependencies64\bluefish\include\;..\..\dependencies64\boost\;..\..\dependencies64\tbb\include\;..\..\dependencies64\glew\include\;..\..\dependencies64\sfml\include\;..\..\dependencies64\ffmpeg\include\;..\..\dependencies64\asmlib\;$(IncludePath)</IncludePath>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)bin\$(Configuration)\</OutDir>\r
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>\r
transitionInfo.tweener = get_tweener(tween); \r
\r
if(transition == TEXT("CUT"))\r
- transitionInfo.type = transition::cut;\r
+ transitionInfo.type = transition_type::cut;\r
else if(transition == TEXT("MIX"))\r
- transitionInfo.type = transition::mix;\r
+ transitionInfo.type = transition_type::mix;\r
else if(transition == TEXT("PUSH"))\r
- transitionInfo.type = transition::push;\r
+ transitionInfo.type = transition_type::push;\r
else if(transition == TEXT("SLIDE"))\r
- transitionInfo.type = transition::slide;\r
+ transitionInfo.type = transition_type::slide;\r
else if(transition == TEXT("WIPE"))\r
- transitionInfo.type = transition::wipe;\r
+ transitionInfo.type = transition_type::wipe;\r
\r
if(direction == TEXT("FROMLEFT"))\r
transitionInfo.direction = transition_direction::from_left;\r
_parameters[0] = _parameters[0];\r
auto pFP = create_producer(GetChannel()->frame_factory(), _parameters);\r
if(pFP == frame_producer::empty())\r
- BOOST_THROW_EXCEPTION(file_not_found() << wmsg_info(_parameters.size() > 0 ? _parameters[0] : L""));\r
+ BOOST_THROW_EXCEPTION(file_not_found() << msg_info(_parameters.size() > 0 ? _parameters[0] : L""));\r
\r
bool auto_play = std::find(_parameters.begin(), _parameters.end(), L"AUTO") != _parameters.end();\r
\r
void CIIProtocolStrategy::DisplayMediaFile(const std::wstring& filename) \r
{\r
transition_info transition;\r
- transition.type = transition::mix;\r
+ transition.type = transition_type::mix;\r
transition.duration = 12;\r
\r
auto pFP = create_producer(GetChannel()->frame_factory(), filename);\r
<channel-grid>true</channel-grid>\r
<channels>\r
<channel>\r
- <video-mode>PAL</video-mode>\r
+ <video-mode>720p5000</video-mode>\r
<consumers>\r
<screen>\r
<device>1</device>\r
- <aspect-ratio></aspect-ratio>\r
</screen>\r
</consumers>\r
</channel>\r
L"PLAY 2-2 " + file + L" LOOP\r\n" \r
L"PLAY 2-3 " + file + L" LOOP\r\n";\r
}\r
+ else if(wcmd.substr(0, 1) == L"7")\r
+ {\r
+ wcmd = L"";\r
+ wcmd += L"CLEAR 1\r\n";\r
+ wcmd += L"MIXER 1 CLEAR\r\n";\r
+ wcmd += L"PLAY 1-0 GREEN\r\n";\r
+ wcmd += L"PLAY 1-1 BLUE\r\n";\r
+ wcmd += L"CG 1-2 ADD 1 ECS_TEST 1\r\n";\r
+ wcmd += L"MIXER 1-2 FILL 0 -1 1 2\r\n";\r
+ }\r
+ else if(wcmd.substr(0, 1) == L"8")\r
+ {\r
+ wcmd = L"";\r
+ wcmd += L"MIXER 1-1 FILL 0.0 0.5 1.0 1.0 500 linear DEFER\r\n";\r
+ wcmd += L"MIXER 1-2 FILL 0.0 0.0 1.0 1.0 500 linear DEFER\r\n";\r
+ wcmd += L"MIXER 1 COMMIT\r\n";\r
+ }\r
else if(wcmd.substr(0, 1) == L"X")\r
{\r
int num = 0;\r
else if(boost::iequals(name, L"CLOCK"))\r
return make_safe<CLK::CLKProtocolStrategy>(channels_);\r
\r
- BOOST_THROW_EXCEPTION(caspar_exception() << warg_name_info(L"name") << warg_value_info(name) << wmsg_info(L"Invalid protocol"));\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << arg_name_info(L"name") << arg_value_info(name) << msg_info(L"Invalid protocol"));\r
}\r
};\r
\r