From: Helge Norberg Date: Fri, 13 Feb 2015 14:14:56 +0000 (+0100) Subject: Refactored to use initializer lists and uniform initialization in appropriate places. X-Git-Tag: 2.1.0_Beta1~396 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=de5b6c0f75961f39927449ca45e7c0045c996204;p=casparcg Refactored to use initializer lists and uniform initialization in appropriate places. --- diff --git a/accelerator/StdAfx.h b/accelerator/StdAfx.h index 31ea7b858..f8594c470 100644 --- a/accelerator/StdAfx.h +++ b/accelerator/StdAfx.h @@ -44,7 +44,6 @@ #include #include -#include #include #include #include diff --git a/accelerator/cpu/image/image_mixer.cpp b/accelerator/cpu/image/image_mixer.cpp index 298ac77af..e64223ca5 100644 --- a/accelerator/cpu/image/image_mixer.cpp +++ b/accelerator/cpu/image/image_mixer.cpp @@ -46,7 +46,6 @@ #include #include -#include #include #include #include @@ -55,6 +54,7 @@ #include #include #include +#include #if defined(_MSC_VER) #pragma warning (push) @@ -291,7 +291,7 @@ private: dest_items[n].data.assign(0); dest_items[n].data[0] = dest_frame->data(); dest_items[n].pix_desc = core::pixel_format_desc(core::pixel_format::bgra); - dest_items[n].pix_desc.planes = boost::assign::list_of(core::pixel_format_desc::plane(width, height, 4)); + dest_items[n].pix_desc.planes = { core::pixel_format_desc::plane(width, height, 4) }; dest_items[n].transform = source_items[n].transform; } } diff --git a/accelerator/ogl/image/image_mixer.cpp b/accelerator/ogl/image/image_mixer.cpp index 48505198f..cb510a88b 100644 --- a/accelerator/ogl/image/image_mixer.cpp +++ b/accelerator/ogl/image/image_mixer.cpp @@ -49,8 +49,6 @@ #include #include -using namespace boost::assign; - namespace caspar { namespace accelerator { namespace ogl { typedef std::shared_future> future_texture; @@ -273,8 +271,8 @@ private: draw_params draw_params; draw_params.pix_desc.format = core::pixel_format::bgra; - draw_params.pix_desc.planes = list_of(core::pixel_format_desc::plane(source_buffer->width(), source_buffer->height(), 4)); - draw_params.textures = list_of(source_buffer); + draw_params.pix_desc.planes = { core::pixel_format_desc::plane(source_buffer->width(), source_buffer->height(), 4) }; + draw_params.textures = { spl::make_shared_ptr(source_buffer) }; draw_params.transform = core::image_transform(); draw_params.blend_mode = blend_mode; draw_params.background = target_texture; diff --git a/common/executor.h b/common/executor.h index 369e90267..ff69125d6 100644 --- a/common/executor.h +++ b/common/executor.h @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -69,13 +68,14 @@ class executor /* final */ public: executor(const std::wstring& name) : name_(name) - , execution_queue_(512, boost::assign::list_of - (task_priority::lowest_priority) - (task_priority::lower_priority) - (task_priority::low_priority) - (task_priority::normal_priority) - (task_priority::high_priority) - (task_priority::higher_priority)) + , execution_queue_(512, std::vector { + task_priority::lowest_priority, + task_priority::lower_priority, + task_priority::low_priority, + task_priority::normal_priority, + task_priority::high_priority, + task_priority::higher_priority + }) { is_running_ = true; thread_ = boost::thread([this]{run();}); diff --git a/common/tweener.cpp b/common/tweener.cpp index 872ebfd77..d19ba7f04 100644 --- a/common/tweener.cpp +++ b/common/tweener.cpp @@ -44,7 +44,6 @@ #include "except.h" -#include #include #include #include @@ -385,50 +384,51 @@ typedef std::function& get_tweens() { - static const std::unordered_map tweens = boost::assign::map_list_of - (L"", ease_none ) - (L"linear", ease_none ) - (L"easenone", ease_none ) - (L"easeinquad", ease_in_quad ) - (L"easeoutquad", ease_out_quad ) - (L"easeinoutquad", ease_in_out_quad ) - (L"easeoutinquad", ease_out_in_quad ) - (L"easeincubic", ease_in_cubic ) - (L"easeoutcubic", ease_out_cubic ) - (L"easeinoutcubic", ease_in_out_cubic ) - (L"easeoutincubic", ease_out_in_cubic ) - (L"easeinquart", ease_in_quart ) - (L"easeoutquart", ease_out_quart ) - (L"easeinoutquart", ease_in_out_quart ) - (L"easeoutinquart", ease_out_in_quart ) - (L"easeinquint", ease_in_quint ) - (L"easeoutquint", ease_out_quint ) - (L"easeinoutquint", ease_in_out_quint ) - (L"easeoutinquint", ease_out_in_quint ) - (L"easeinsine", ease_in_sine ) - (L"easeoutsine", ease_out_sine ) - (L"easeinoutsine", ease_in_out_sine ) - (L"easeoutinsine", ease_out_in_sine ) - (L"easeinexpo", ease_in_expo ) - (L"easeoutexpo", ease_out_expo ) - (L"easeinoutexpo", ease_in_out_expo ) - (L"easeoutinexpo", ease_out_in_expo ) - (L"easeincirc", ease_in_circ ) - (L"easeoutcirc", ease_out_circ ) - (L"easeinoutcirc", ease_in_out_circ ) - (L"easeoutincirc", ease_out_in_circ ) - (L"easeinelastic", ease_in_elastic ) - (L"easeoutelastic", ease_out_elastic ) - (L"easeinoutelastic", ease_in_out_elastic) - (L"easeoutinelastic", ease_out_in_elastic) - (L"easeinback", ease_in_back ) - (L"easeoutback", ease_out_back ) - (L"easeinoutback", ease_in_out_back ) - (L"easeoutintback", ease_out_int_back ) - (L"easeoutbounce", ease_out_bounce ) - (L"easeinbounce", ease_in_bounce ) - (L"easeinoutbounce", ease_in_out_bounce ) - (L"easeoutinbounce", ease_out_in_bounce ); + static const std::unordered_map tweens = { + {L"", ease_none }, + {L"linear", ease_none }, + {L"easenone", ease_none }, + {L"easeinquad", ease_in_quad }, + {L"easeoutquad", ease_out_quad }, + {L"easeinoutquad", ease_in_out_quad }, + {L"easeoutinquad", ease_out_in_quad }, + {L"easeincubic", ease_in_cubic }, + {L"easeoutcubic", ease_out_cubic }, + {L"easeinoutcubic", ease_in_out_cubic }, + {L"easeoutincubic", ease_out_in_cubic }, + {L"easeinquart", ease_in_quart }, + {L"easeoutquart", ease_out_quart }, + {L"easeinoutquart", ease_in_out_quart }, + {L"easeoutinquart", ease_out_in_quart }, + {L"easeinquint", ease_in_quint }, + {L"easeoutquint", ease_out_quint }, + {L"easeinoutquint", ease_in_out_quint }, + {L"easeoutinquint", ease_out_in_quint }, + {L"easeinsine", ease_in_sine }, + {L"easeoutsine", ease_out_sine }, + {L"easeinoutsine", ease_in_out_sine }, + {L"easeoutinsine", ease_out_in_sine }, + {L"easeinexpo", ease_in_expo }, + {L"easeoutexpo", ease_out_expo }, + {L"easeinoutexpo", ease_in_out_expo }, + {L"easeoutinexpo", ease_out_in_expo }, + {L"easeincirc", ease_in_circ }, + {L"easeoutcirc", ease_out_circ }, + {L"easeinoutcirc", ease_in_out_circ }, + {L"easeoutincirc", ease_out_in_circ }, + {L"easeinelastic", ease_in_elastic }, + {L"easeoutelastic", ease_out_elastic }, + {L"easeinoutelastic", ease_in_out_elastic }, + {L"easeoutinelastic", ease_out_in_elastic }, + {L"easeinback", ease_in_back }, + {L"easeoutback", ease_out_back }, + {L"easeinoutback", ease_in_out_back }, + {L"easeoutintback", ease_out_int_back }, + {L"easeoutbounce", ease_out_bounce }, + {L"easeinbounce", ease_in_bounce }, + {L"easeinoutbounce", ease_in_out_bounce }, + {L"easeoutinbounce", ease_out_in_bounce } + }; return tweens; } diff --git a/core/StdAfx.h b/core/StdAfx.h index 2eb6f3dcc..cffcc2eb3 100644 --- a/core/StdAfx.h +++ b/core/StdAfx.h @@ -39,12 +39,12 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/core/producer/text/text_producer.cpp b/core/producer/text/text_producer.cpp index 0df96ed02..c4c0cba7f 100644 --- a/core/producer/text/text_producer.cpp +++ b/core/producer/text/text_producer.cpp @@ -241,12 +241,12 @@ public: const std::vector& get_variables() const { - static std::vector vars = - boost::assign::list_of - (L"text") - (L"tracking") - (L"current_bearing_y") - (L"current_protrude_under_y"); + static const std::vector vars = { + L"text", + L"tracking", + L"current_bearing_y", + L"current_protrude_under_y" + }; return vars; } diff --git a/core/video_format.cpp b/core/video_format.cpp index 23e1420a9..f0c6b04af 100644 --- a/core/video_format.cpp +++ b/core/video_format.cpp @@ -24,53 +24,54 @@ #include "video_format.h" #include -#include namespace caspar { namespace core { -const std::vector format_descs = boost::assign::list_of - (video_format_desc(video_format::pal, 720, 576, 1024, 576, field_mode::upper, 25, 1, L"PAL", boost::assign::list_of(1920) )) - (video_format_desc(video_format::ntsc, 720, 486, 720, 540, field_mode::lower, 30000, 1001, L"NTSC", boost::assign::list_of(1602)(1601)(1602)(1601)(1602))) - (video_format_desc(video_format::x576p2500, 720, 576, 1024, 576, field_mode::progressive, 25, 1, L"576p2500", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x720p2398, 1280, 720, 1280, 720, field_mode::progressive, 24000, 1001, L"720p2398", boost::assign::list_of(2002) )) - (video_format_desc(video_format::x720p2400, 1280, 720, 1280, 720, field_mode::progressive, 24, 1, L"720p2400", boost::assign::list_of(2000) )) - (video_format_desc(video_format::x720p2500, 1280, 720, 1280, 720, field_mode::progressive, 25, 1, L"720p2500", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x720p5000, 1280, 720, 1280, 720, field_mode::progressive, 50, 1, L"720p5000", boost::assign::list_of(960) )) - (video_format_desc(video_format::x720p2997, 1280, 720, 1280, 720, field_mode::progressive, 30000, 1001, L"720p2997", boost::assign::list_of(1602)(1601)(1602)(1601)(1602))) - (video_format_desc(video_format::x720p5994, 1280, 720, 1280, 720, field_mode::progressive, 60000, 1001, L"720p5994", boost::assign::list_of(801) (800) (801) (801) (801) )) - (video_format_desc(video_format::x720p3000, 1280, 720, 1280, 720, field_mode::progressive, 30, 1, L"720p3000", boost::assign::list_of(1600) )) - (video_format_desc(video_format::x720p6000, 1280, 720, 1280, 720, field_mode::progressive, 60, 1, L"720p6000", boost::assign::list_of(800) )) - (video_format_desc(video_format::x1080p2398, 1920, 1080, 1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398", boost::assign::list_of(2002) )) - (video_format_desc(video_format::x1080p2400, 1920, 1080, 1920, 1080, field_mode::progressive, 24, 1, L"1080p2400", boost::assign::list_of(2000) )) - (video_format_desc(video_format::x1080i5000, 1920, 1080, 1920, 1080, field_mode::upper, 25, 1, L"1080i5000", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x1080i5994, 1920, 1080, 1920, 1080, field_mode::upper, 30000, 1001, L"1080i5994", boost::assign::list_of(1602)(1601)(1602)(1601)(1602))) - (video_format_desc(video_format::x1080i6000, 1920, 1080, 1920, 1080, field_mode::upper, 30, 1, L"1080i6000", boost::assign::list_of(1600) )) - (video_format_desc(video_format::x1080p2500, 1920, 1080, 1920, 1080, field_mode::progressive, 25, 1, L"1080p2500", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x1080p2997, 1920, 1080, 1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997", boost::assign::list_of(1602)(1601)(1602)(1601)(1602))) - (video_format_desc(video_format::x1080p3000, 1920, 1080, 1920, 1080, field_mode::progressive, 30, 1, L"1080p3000", boost::assign::list_of(1600) )) - (video_format_desc(video_format::x1080p5000, 1920, 1080, 1920, 1080, field_mode::progressive, 50, 1, L"1080p5000", boost::assign::list_of(960) )) - (video_format_desc(video_format::x1080p5994, 1920, 1080, 1920, 1080, field_mode::progressive, 60000, 1001, L"1080p5994", boost::assign::list_of(801) (800) (801) (801) (801) )) - (video_format_desc(video_format::x1080p6000, 1920, 1080, 1920, 1080, field_mode::progressive, 60, 1, L"1080p6000", boost::assign::list_of(800) )) - (video_format_desc(video_format::x2k2398, 2048, 1556, 2048, 1556, field_mode::progressive, 24000, 1001, L"2k2398", boost::assign::list_of(2002) )) - (video_format_desc(video_format::x2k2400, 2048, 1556, 2048, 1556, field_mode::progressive, 24, 1, L"2k2400", boost::assign::list_of(2000) )) - (video_format_desc(video_format::x2k2500, 2048, 1556, 2048, 1556, field_mode::progressive, 25, 1, L"2k2500", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x4k2398, 3840, 2160, 3840, 2160, field_mode::progressive, 24000, 1001, L"4k2398", boost::assign::list_of(2002) )) - (video_format_desc(video_format::x4k2400, 3840, 2160, 3840, 2160, field_mode::progressive, 24, 1, L"4k2400", boost::assign::list_of(2000) )) - (video_format_desc(video_format::x4k2500, 3840, 2160, 3840, 2160, field_mode::progressive, 25, 1, L"4k2500", boost::assign::list_of(1920) )) - (video_format_desc(video_format::x4k2997, 3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1001, L"4k2398", boost::assign::list_of(1602)(1601)(1602)(1601)(1602))) - (video_format_desc(video_format::x4k3000, 3840, 2160, 3840, 2160, field_mode::progressive, 30, 1, L"4k3000", boost::assign::list_of(1600) )) - (video_format_desc(video_format::invalid, 0, 0, 0, 0, field_mode::progressive, 1, 1, L"invalid", boost::assign::list_of(1) )); + const std::vector format_descs = { + { video_format::pal, 720, 576, 1024, 576, field_mode::upper, 25, 1, L"PAL", { 1920 } }, + { video_format::ntsc, 720, 486, 720, 540, field_mode::lower, 30000, 1001, L"NTSC", { 1602, 1601, 1602, 1601, 1602 } }, + { video_format::x576p2500, 720, 576, 1024, 576, field_mode::progressive, 25, 1, L"576p2500", { 1920 } }, + { video_format::x720p2398, 1280, 720, 1280, 720, field_mode::progressive, 24000, 1001, L"720p2398", { 2002 } }, + { video_format::x720p2400, 1280, 720, 1280, 720, field_mode::progressive, 24, 1, L"720p2400", { 2000 } }, + { video_format::x720p2500, 1280, 720, 1280, 720, field_mode::progressive, 25, 1, L"720p2500", { 1920 } }, + { video_format::x720p5000, 1280, 720, 1280, 720, field_mode::progressive, 50, 1, L"720p5000", { 960 } }, + { video_format::x720p2997, 1280, 720, 1280, 720, field_mode::progressive, 30000, 1001, L"720p2997", { 1602, 1601, 1602, 1601, 1602 } }, + { video_format::x720p5994, 1280, 720, 1280, 720, field_mode::progressive, 60000, 1001, L"720p5994", { 801, 800, 801, 801, 801 } }, + { video_format::x720p3000, 1280, 720, 1280, 720, field_mode::progressive, 30, 1, L"720p3000", { 1600 } }, + { video_format::x720p6000, 1280, 720, 1280, 720, field_mode::progressive, 60, 1, L"720p6000", { 800 } }, + { video_format::x1080p2398, 1920, 1080, 1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398", { 2002 } }, + { video_format::x1080p2400, 1920, 1080, 1920, 1080, field_mode::progressive, 24, 1, L"1080p2400", { 2000 } }, + { video_format::x1080i5000, 1920, 1080, 1920, 1080, field_mode::upper, 25, 1, L"1080i5000", { 1920 } }, + { video_format::x1080i5994, 1920, 1080, 1920, 1080, field_mode::upper, 30000, 1001, L"1080i5994", { 1602, 1601, 1602, 1601, 1602 } }, + { video_format::x1080i6000, 1920, 1080, 1920, 1080, field_mode::upper, 30, 1, L"1080i6000", { 1600 } }, + { video_format::x1080p2500, 1920, 1080, 1920, 1080, field_mode::progressive, 25, 1, L"1080p2500", { 1920 } }, + { video_format::x1080p2997, 1920, 1080, 1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997", { 1602, 1601, 1602, 1601, 1602 } }, + { video_format::x1080p3000, 1920, 1080, 1920, 1080, field_mode::progressive, 30, 1, L"1080p3000", { 1600 } }, + { video_format::x1080p5000, 1920, 1080, 1920, 1080, field_mode::progressive, 50, 1, L"1080p5000", { 960 } }, + { video_format::x1080p5994, 1920, 1080, 1920, 1080, field_mode::progressive, 60000, 1001, L"1080p5994", { 801, 800, 801, 801, 801 } }, + { video_format::x1080p6000, 1920, 1080, 1920, 1080, field_mode::progressive, 60, 1, L"1080p6000", { 800 } }, + { video_format::x2k2398, 2048, 1556, 2048, 1556, field_mode::progressive, 24000, 1001, L"2k2398", { 2002 } }, + { video_format::x2k2400, 2048, 1556, 2048, 1556, field_mode::progressive, 24, 1, L"2k2400", { 2000 } }, + { video_format::x2k2500, 2048, 1556, 2048, 1556, field_mode::progressive, 25, 1, L"2k2500", { 1920 } }, + { video_format::x4k2398, 3840, 2160, 3840, 2160, field_mode::progressive, 24000, 1001, L"4k2398", { 2002 } }, + { video_format::x4k2400, 3840, 2160, 3840, 2160, field_mode::progressive, 24, 1, L"4k2400", { 2000 } }, + { video_format::x4k2500, 3840, 2160, 3840, 2160, field_mode::progressive, 25, 1, L"4k2500", { 1920 } }, + { video_format::x4k2997, 3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1001, L"4k2398", { 1602, 1601, 1602, 1601, 1602 } }, + { video_format::x4k3000, 3840, 2160, 3840, 2160, field_mode::progressive, 30, 1, L"4k3000", { 1600 } }, + { video_format::invalid, 0, 0, 0, 0, field_mode::progressive, 1, 1, L"invalid", { 1 } } + }; -video_format_desc::video_format_desc(video_format format, - int width, - int height, - int square_width, - int square_height, - core::field_mode field_mode, - int time_scale, - int duration, - const std::wstring& name, - const std::vector& audio_cadence) +video_format_desc::video_format_desc( + video_format format, + int width, + int height, + int square_width, + int square_height, + core::field_mode field_mode, + int time_scale, + int duration, + const std::wstring& name, + const std::vector& audio_cadence) : format(format) , width(width) , height(height) diff --git a/modules/decklink/StdAfx.h b/modules/decklink/StdAfx.h index 4bbb43219..94a128626 100644 --- a/modules/decklink/StdAfx.h +++ b/modules/decklink/StdAfx.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/modules/ffmpeg/StdAfx.h b/modules/ffmpeg/StdAfx.h index 229ba3ef1..055d5ff12 100644 --- a/modules/ffmpeg/StdAfx.h +++ b/modules/ffmpeg/StdAfx.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/modules/ffmpeg/producer/ffmpeg_producer.cpp b/modules/ffmpeg/producer/ffmpeg_producer.cpp index f8e0913da..b696a723a 100644 --- a/modules/ffmpeg/producer/ffmpeg_producer.cpp +++ b/modules/ffmpeg/producer/ffmpeg_producer.cpp @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/modules/ffmpeg/producer/filter/filter.cpp b/modules/ffmpeg/producer/filter/filter.cpp index aa0770019..f6ad8655d 100644 --- a/modules/ffmpeg/producer/filter/filter.cpp +++ b/modules/ffmpeg/producer/filter/filter.cpp @@ -28,10 +28,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -84,17 +82,18 @@ struct filter::implementation { if(out_pix_fmts.empty()) { - out_pix_fmts = boost::assign::list_of - (AV_PIX_FMT_YUVA420P) - (AV_PIX_FMT_YUV444P) - (AV_PIX_FMT_YUV422P) - (AV_PIX_FMT_YUV420P) - (AV_PIX_FMT_YUV411P) - (AV_PIX_FMT_BGRA) - (AV_PIX_FMT_ARGB) - (AV_PIX_FMT_RGBA) - (AV_PIX_FMT_ABGR) - (AV_PIX_FMT_GRAY8); + out_pix_fmts = { + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_BGRA, + AV_PIX_FMT_ARGB, + AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, + AV_PIX_FMT_GRAY8 + }; } out_pix_fmts.push_back(AV_PIX_FMT_NONE); diff --git a/modules/ffmpeg/producer/util/util.cpp b/modules/ffmpeg/producer/util/util.cpp index 4943394fe..23e7a0007 100644 --- a/modules/ffmpeg/producer/util/util.cpp +++ b/modules/ffmpeg/producer/util/util.cpp @@ -493,8 +493,35 @@ std::wstring print_mode(int width, int height, double fps, bool interlaced) bool is_valid_file(const std::wstring& filename) { - static const std::vector invalid_exts = boost::assign::list_of(L".png")(L".tga")(L".bmp")(L".jpg")(L".jpeg")(L".gif")(L".tiff")(L".tif")(L".jp2")(L".jpx")(L".j2k")(L".j2c")(L".swf")(L".ct"); - static std::vector valid_exts = boost::assign::list_of(L".m2t")(L".mov")(L".mp4")(L".dv")(L".flv")(L".mpg")(L".wav")(L".mp3")(L".dnxhd")(L".h264")(L".prores"); + static const auto invalid_exts = { + L".png", + L".tga", + L".bmp", + L".jpg", + L".jpeg", + L".gif", + L".tiff", + L".tif", + L".jp2", + L".jpx", + L".j2k", + L".j2c", + L".swf", + L".ct" + }; + static const auto valid_exts = { + L".m2t", + L".mov", + L".mp4", + L".dv", + L".flv", + L".mpg", + L".wav", + L".mp3", + L".dnxhd", + L".h264", + L".prores" + }; auto ext = boost::to_lower_copy(boost::filesystem::path(filename).extension().wstring()); diff --git a/modules/flash/StdAfx.h b/modules/flash/StdAfx.h index f913689ec..a099e0578 100644 --- a/modules/flash/StdAfx.h +++ b/modules/flash/StdAfx.h @@ -44,7 +44,6 @@ #include #include -#include #include #include #include diff --git a/modules/flash/producer/cg_proxy.cpp b/modules/flash/producer/cg_proxy.cpp index 7698d1a03..f21892610 100644 --- a/modules/flash/producer/cg_proxy.cpp +++ b/modules/flash/producer/cg_proxy.cpp @@ -173,7 +173,7 @@ cg_proxy create_cg_proxy(const spl::shared_ptr& video_chann { if(flash_producer->name() != L"flash") { - flash_producer = flash::create_producer(video_channel->frame_factory(), video_channel->video_format_desc(), boost::assign::list_of()); + flash_producer = flash::create_producer(video_channel->frame_factory(), video_channel->video_format_desc(), { }); video_channel->stage().load(render_layer, flash_producer); video_channel->stage().play(render_layer); } @@ -200,7 +200,7 @@ spl::shared_ptr create_cg_producer_and_autoplay_file( path = boost::filesystem::complete(path); auto filename2 = path.wstring(); - auto flash_producer = flash::create_producer(frame_factory, format_desc, boost::assign::list_of()); + auto flash_producer = flash::create_producer(frame_factory, format_desc, {}); auto producer = flash_producer; cg_proxy(producer).add(0, filename2, 1); diff --git a/modules/image/producer/image_producer.cpp b/modules/image/producer/image_producer.cpp index ed64be1c6..539590dd5 100644 --- a/modules/image/producer/image_producer.cpp +++ b/modules/image/producer/image_producer.cpp @@ -38,14 +38,13 @@ #include #include -#include #include #include #include +#include #include - -using namespace boost::assign; +#include namespace caspar { namespace image { @@ -174,7 +173,20 @@ public: spl::shared_ptr create_producer(const spl::shared_ptr& frame_factory, const core::video_format_desc& format_desc, const std::vector& params) { - static const std::vector extensions = list_of(L".png")(L".tga")(L".bmp")(L".jpg")(L".jpeg")(L".gif")(L".tiff")(L".tif")(L".jp2")(L".jpx")(L".j2k")(L".j2c"); + static const auto extensions = { + L".png", + L".tga", + L".bmp", + L".jpg", + L".jpeg", + L".gif", + L".tiff", + L".tif", + L".jp2", + L".jpx", + L".j2k", + L".j2c" + }; if (boost::iequals(params[0], L"[IMG_SEQUENCE]")) { diff --git a/modules/image/producer/image_scroll_producer.cpp b/modules/image/producer/image_scroll_producer.cpp index f92a6a28f..93025faf0 100644 --- a/modules/image/producer/image_scroll_producer.cpp +++ b/modules/image/producer/image_scroll_producer.cpp @@ -42,7 +42,6 @@ #include #include -#include #include #include #include @@ -52,8 +51,6 @@ #include #include -using namespace boost::assign; - namespace caspar { namespace image { struct image_scroll_producer : public core::frame_producer_base @@ -402,7 +399,20 @@ struct image_scroll_producer : public core::frame_producer_base spl::shared_ptr create_scroll_producer(const spl::shared_ptr& frame_factory, const core::video_format_desc& format_desc, const std::vector& params) { - static const std::vector extensions = list_of(L".png")(L".tga")(L".bmp")(L".jpg")(L".jpeg")(L".gif")(L".tiff")(L".tif")(L".jp2")(L".jpx")(L".j2k")(L".j2c"); + static const auto extensions = { + L".png", + L".tga", + L".bmp", + L".jpg", + L".jpeg", + L".gif", + L".tiff", + L".tif", + L".jp2", + L".jpx", + L".j2k", + L".j2c" + }; std::wstring filename = env::media_folder() + L"\\" + params[0]; auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool diff --git a/modules/screen/consumer/screen_consumer.cpp b/modules/screen/consumer/screen_consumer.cpp index 78ddc7adf..809ab498f 100644 --- a/modules/screen/consumer/screen_consumer.cpp +++ b/modules/screen/consumer/screen_consumer.cpp @@ -53,8 +53,6 @@ #include #include -#include - #include #include @@ -184,7 +182,7 @@ public: boost::rational(format_desc.time_scale, format_desc.duration), sample_aspect_ratio, AV_PIX_FMT_BGRA, - boost::assign::list_of(AV_PIX_FMT_BGRA), + { AV_PIX_FMT_BGRA }, format_desc.field_mode == core::field_mode::progressive || !config.auto_deinterlace ? "" : "YADIF=1:-1"); }()) { diff --git a/protocol/StdAfx.h b/protocol/StdAfx.h index ac2b26ec8..50bdda111 100644 --- a/protocol/StdAfx.h +++ b/protocol/StdAfx.h @@ -48,9 +48,9 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/protocol/amcp/AMCPCommandsImpl.cpp b/protocol/amcp/AMCPCommandsImpl.cpp index d52ed7ed3..6c796b524 100644 --- a/protocol/amcp/AMCPCommandsImpl.cpp +++ b/protocol/amcp/AMCPCommandsImpl.cpp @@ -953,7 +953,7 @@ bool ClearCommand::DoExecute() bool PrintCommand::DoExecute() { - channel()->output().add(create_consumer(boost::assign::list_of(L"IMAGE"))); + channel()->output().add(create_consumer({ L"IMAGE" })); SetReplyString(TEXT("202 PRINT OK\r\n")); diff --git a/protocol/cii/CIIProtocolStrategy.cpp b/protocol/cii/CIIProtocolStrategy.cpp index 5be2b7a95..34a28f723 100644 --- a/protocol/cii/CIIProtocolStrategy.cpp +++ b/protocol/cii/CIIProtocolStrategy.cpp @@ -161,7 +161,7 @@ void CIIProtocolStrategy::WriteTemplateData(const std::wstring& templateName, co return; } - auto producer = flash::create_producer(this->GetChannel()->frame_factory(), this->GetChannel()->video_format_desc(), boost::assign::list_of(env::template_folder()+TEXT("CG.fth"))); + auto producer = flash::create_producer(this->GetChannel()->frame_factory(), this->GetChannel()->video_format_desc(), { env::template_folder() + TEXT("CG.fth") }); std::wstringstream flashParam; flashParam << TEXT("1") << currentProfile_ << '/' << templateName << TEXT("0 "); diff --git a/unit-test/base64_test.cpp b/unit-test/base64_test.cpp index 4667215f6..ae8313265 100644 --- a/unit-test/base64_test.cpp +++ b/unit-test/base64_test.cpp @@ -25,8 +25,8 @@ #include -#include #include +#include #include #include diff --git a/unit-test/image_mixer_test.cpp b/unit-test/image_mixer_test.cpp index 6bd8942d2..1ea0be469 100644 --- a/unit-test/image_mixer_test.cpp +++ b/unit-test/image_mixer_test.cpp @@ -33,6 +33,8 @@ #include +#include + namespace caspar { namespace core { spl::shared_ptr ogl_device() diff --git a/unit-test/param_test.cpp b/unit-test/param_test.cpp index 03c0247db..f4cc514fe 100644 --- a/unit-test/param_test.cpp +++ b/unit-test/param_test.cpp @@ -23,14 +23,12 @@ #include -#include - #include namespace { - static auto params = boost::assign::list_of - (L"param1")(L"1") - (L"param2")(L"string value"); + static auto params = { + L"param1", L"1", + L"param2", L"string value" }; } namespace caspar {