]> git.sesse.net Git - casparcg/commitdiff
Refactored to use initializer lists and uniform initialization in appropriate places.
authorHelge Norberg <helge.norberg@svt.se>
Fri, 13 Feb 2015 14:14:56 +0000 (15:14 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Fri, 13 Feb 2015 14:14:56 +0000 (15:14 +0100)
24 files changed:
accelerator/StdAfx.h
accelerator/cpu/image/image_mixer.cpp
accelerator/ogl/image/image_mixer.cpp
common/executor.h
common/tweener.cpp
core/StdAfx.h
core/producer/text/text_producer.cpp
core/video_format.cpp
modules/decklink/StdAfx.h
modules/ffmpeg/StdAfx.h
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/filter/filter.cpp
modules/ffmpeg/producer/util/util.cpp
modules/flash/StdAfx.h
modules/flash/producer/cg_proxy.cpp
modules/image/producer/image_producer.cpp
modules/image/producer/image_scroll_producer.cpp
modules/screen/consumer/screen_consumer.cpp
protocol/StdAfx.h
protocol/amcp/AMCPCommandsImpl.cpp
protocol/cii/CIIProtocolStrategy.cpp
unit-test/base64_test.cpp
unit-test/image_mixer_test.cpp
unit-test/param_test.cpp

index 31ea7b85850a7217a9f1c3d1038f4aa4287e0563..f8594c47094d55891d3d0dab42f667f68ded7560 100644 (file)
@@ -44,7 +44,6 @@
 #include <tbb/concurrent_queue.h>
 #include <tbb/concurrent_unordered_map.h>
 
-#include <boost/assign.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/timer.hpp>
 #include <boost/filesystem.hpp>
index 298ac77af14856305cc480ac6fdbeed1f5b177e0..e64223ca5fa871cc240e7afe8fa6a82aa9cccb07 100644 (file)
@@ -46,7 +46,6 @@
 #include <tbb/parallel_for_each.h>
 #include <tbb/concurrent_queue.h>
 
-#include <boost/assign.hpp>
 #include <boost/foreach.hpp>
 #include <boost/range.hpp>
 #include <boost/range/algorithm_ext/erase.hpp>
@@ -55,6 +54,7 @@
 #include <algorithm>
 #include <cstdint>
 #include <vector>
+#include <set>
 
 #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;
                                }
                        }
index 48505198fff012c3fbd2df1c22c86913a7251ddd..cb510a88b60533c3400ed33bb74a8bb673a33cbe 100644 (file)
@@ -49,8 +49,6 @@
 #include <algorithm>
 #include <vector>
 
-using namespace boost::assign;
-
 namespace caspar { namespace accelerator { namespace ogl {
                
 typedef std::shared_future<std::shared_ptr<texture>> 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;
index 369e902675cf35d6ca92a8d04cad5429d3d54126..ff69125d646bb86267ba483793176fee86dfc4fc 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <boost/thread.hpp>
 #include <boost/optional.hpp>
-#include <boost/assign/list_of.hpp>
 
 #include <functional>
 #include <future>
@@ -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> {
+                       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();});
index 872ebfd772292acaf037d1adbbc523c1fec5f299..d19ba7f0435a95d9a21748ef035a6b8451bcbff3 100644 (file)
@@ -44,7 +44,6 @@
 
 #include "except.h"
 
-#include <boost/assign/list_of.hpp>
 #include <boost/regex.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/range/adaptor/map.hpp>
@@ -385,50 +384,51 @@ typedef std::function<double(double, double, double, double, const std::vector<d
 
 const std::unordered_map<std::wstring, tween_t>& get_tweens()
 {
-       static const std::unordered_map<std::wstring, tween_t> 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<std::wstring, tween_t> 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;
 }
index 2eb6f3dcc7e5f95786356e55688cfd325aef7657..cffcc2eb3b6c7a0a2ef9ceee9019143c56524b1e 100644 (file)
 #include <queue>
 #include <string>
 #include <vector>
+#include <set>
 
 #include <tbb/atomic.h>
 #include <tbb/concurrent_queue.h>
 #include <tbb/concurrent_unordered_map.h>
 
-#include <boost/assign.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/timer.hpp>
 #include <boost/filesystem.hpp>
index 0df96ed02a797c8b426826c6827fd2fd201376f3..c4c0cba7f3d59ac2d4236ae5abb427a213fcea93 100644 (file)
@@ -241,12 +241,12 @@ public:
 
        const std::vector<std::wstring>& get_variables() const
        {
-               static std::vector<std::wstring> vars =
-                               boost::assign::list_of<std::wstring>
-                                               (L"text")
-                                               (L"tracking")
-                                               (L"current_bearing_y")
-                                               (L"current_protrude_under_y");
+               static const std::vector<std::wstring> vars = {
+                       L"text",
+                       L"tracking",
+                       L"current_bearing_y",
+                       L"current_protrude_under_y"
+               };
 
                return vars;
        }
index 23e1420a98563ca83978a0220754258ddf32f96f..f0c6b04af80ecd59167049bfea56a0598f044c46 100644 (file)
 #include "video_format.h"
 
 #include <boost/algorithm/string.hpp>
-#include <boost/assign.hpp>
 
 namespace caspar { namespace core {
        
-const std::vector<video_format_desc> 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<int>(1920)                        ))
-       (video_format_desc(video_format::ntsc,                   720,  486,  720, 540,  field_mode::lower,                      30000,  1001, L"NTSC",          boost::assign::list_of<int>(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<int>(1920)                        ))
-       (video_format_desc(video_format::x720p2398,             1280,  720, 1280, 720,  field_mode::progressive,        24000,  1001, L"720p2398",      boost::assign::list_of<int>(2002)                        ))
-       (video_format_desc(video_format::x720p2400,             1280,  720, 1280, 720,  field_mode::progressive,           24,     1, L"720p2400",      boost::assign::list_of<int>(2000)                        ))
-       (video_format_desc(video_format::x720p2500,             1280,  720, 1280, 720,  field_mode::progressive,           25,     1, L"720p2500",      boost::assign::list_of<int>(1920)                        ))
-       (video_format_desc(video_format::x720p5000,             1280,  720, 1280, 720,  field_mode::progressive,           50,     1, L"720p5000",      boost::assign::list_of<int>(960)                         ))
-       (video_format_desc(video_format::x720p2997,             1280,  720, 1280, 720,  field_mode::progressive,        30000,  1001, L"720p2997",      boost::assign::list_of<int>(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<int>(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<int>(1600)                        ))
-       (video_format_desc(video_format::x720p6000,             1280,  720, 1280, 720,  field_mode::progressive,           60,     1, L"720p6000",      boost::assign::list_of<int>(800)                         ))
-       (video_format_desc(video_format::x1080p2398,    1920, 1080, 1920, 1080, field_mode::progressive,        24000,  1001, L"1080p2398",     boost::assign::list_of<int>(2002)                        ))
-       (video_format_desc(video_format::x1080p2400,    1920, 1080, 1920, 1080, field_mode::progressive,           24,     1, L"1080p2400",     boost::assign::list_of<int>(2000)                        ))
-       (video_format_desc(video_format::x1080i5000,    1920, 1080, 1920, 1080, field_mode::upper,                         25,     1, L"1080i5000",     boost::assign::list_of<int>(1920)                        ))
-       (video_format_desc(video_format::x1080i5994,    1920, 1080, 1920, 1080, field_mode::upper,                      30000,  1001, L"1080i5994",     boost::assign::list_of<int>(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<int>(1600)                        ))
-       (video_format_desc(video_format::x1080p2500,    1920, 1080, 1920, 1080, field_mode::progressive,           25,     1, L"1080p2500",     boost::assign::list_of<int>(1920)                        ))
-       (video_format_desc(video_format::x1080p2997,    1920, 1080, 1920, 1080, field_mode::progressive,        30000,  1001, L"1080p2997",     boost::assign::list_of<int>(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<int>(1600)                        ))
-       (video_format_desc(video_format::x1080p5000,    1920, 1080, 1920, 1080, field_mode::progressive,           50,     1, L"1080p5000",     boost::assign::list_of<int>(960)                         ))
-       (video_format_desc(video_format::x1080p5994,    1920, 1080, 1920, 1080, field_mode::progressive,        60000,  1001, L"1080p5994",     boost::assign::list_of<int>(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<int>(800)                         ))
-       (video_format_desc(video_format::x2k2398,               2048, 1556, 2048, 1556, field_mode::progressive,    24000,  1001, L"2k2398",    boost::assign::list_of<int>(2002)                                                ))
-       (video_format_desc(video_format::x2k2400,               2048, 1556, 2048, 1556, field_mode::progressive,           24,     1, L"2k2400",        boost::assign::list_of<int>(2000)                                                ))
-       (video_format_desc(video_format::x2k2500,               2048, 1556, 2048, 1556, field_mode::progressive,       25,     1, L"2k2500",    boost::assign::list_of<int>(1920)                                                ))
-       (video_format_desc(video_format::x4k2398,               3840, 2160, 3840, 2160, field_mode::progressive,   24000,   1001, L"4k2398",    boost::assign::list_of<int>(2002)                                    ))
-       (video_format_desc(video_format::x4k2400,               3840, 2160, 3840, 2160, field_mode::progressive,      24,      1, L"4k2400",    boost::assign::list_of<int>(2000)                                                ))
-       (video_format_desc(video_format::x4k2500,               3840, 2160, 3840, 2160, field_mode::progressive,      25,      1, L"4k2500",    boost::assign::list_of<int>(1920)                                                ))
-       (video_format_desc(video_format::x4k2997,               3840, 2160, 3840, 2160, field_mode::progressive,   30000,   1001, L"4k2398",    boost::assign::list_of<int>(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<int>(1600)                                                ))
-       (video_format_desc(video_format::invalid,                  0,    0,    0,        0, field_mode::progressive,       1,      1, L"invalid",       boost::assign::list_of<int>(1)                           ));
+       const std::vector<video_format_desc> 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<int>& 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<int>& audio_cadence)
        : format(format)
        , width(width)
        , height(height)
index 4bbb43219ced951be84a6584fe6f026b1d4b55a7..94a128626546f9b5e8b45cc9d5d31f4c7222a5de 100644 (file)
@@ -43,7 +43,6 @@
 #include <tbb/atomic.h>
 #include <tbb/concurrent_queue.h>
 #include <tbb/cache_aligned_allocator.h>
-#include <boost/assign.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/timer.hpp>
 #include <boost/filesystem.hpp>
index 229ba3ef192db4cfe51011561ed68cd03c68310a..055d5ff12e76db561d873d1a8cd06c1e3392bc45 100644 (file)
@@ -34,7 +34,6 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/predicate.hpp>
-#include <boost/assign.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
index f8e0913da2ee66a5dd16826f6662be6852baefa1..b696a723a6097ac8eca70c7f1c29af57a22805b5 100644 (file)
@@ -46,7 +46,6 @@
 
 #include <boost/algorithm/string.hpp>
 #include <common/assert.h>
-#include <boost/assign.hpp>
 #include <boost/timer.hpp>
 #include <boost/foreach.hpp>
 #include <boost/filesystem.hpp>
index aa0770019375736be4164583a3f76b3733aecbe6..f6ad8655d5ca4bce2716381b8e178caef0fa892f 100644 (file)
 #include <common/assert.h>
 #include <common/except.h>
 
-#include <boost/assign.hpp>
 #include <boost/range/iterator_range.hpp>
 #include <boost/range/adaptors.hpp>
-#include <boost/assign.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/foreach.hpp>
 #include <boost/thread.hpp>
@@ -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);
index 4943394fee5493367fc9a966257170395f094f81..23e7a0007e4c1a0484ef3aad9f9da5fa6af270ab 100644 (file)
@@ -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<std::wstring> 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<std::wstring>           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());
                
index f913689ec56841ee578942dd91860c0e8b653668..a099e057802892f57a966c61227aede2d13e97ac 100644 (file)
@@ -44,7 +44,6 @@
 #include <tbb/atomic.h>
 #include <tbb/concurrent_queue.h>
 
-#include <boost/assign.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <boost/range/algorithm.hpp>
index 7698d1a0399231f5cd25d65d59dd5283b3700384..f21892610e54dbf49e024ea9b2d1f98b4f7cf8c8 100644 (file)
@@ -173,7 +173,7 @@ cg_proxy create_cg_proxy(const spl::shared_ptr<core::video_channel>& 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<std::wstring>());    
+                       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<core::frame_producer> 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<std::wstring>());       
+       auto flash_producer = flash::create_producer(frame_factory, format_desc, {});
        auto producer = flash_producer;
        cg_proxy(producer).add(0, filename2, 1);
 
index ed64be1c62c7c181d7416beb7640a58714c0bc47..539590dd5e29b7d883c1043c15a96b88e1c6b060 100644 (file)
 #include <common/array.h>
 #include <common/base64.h>
 
-#include <boost/assign.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/algorithm/string.hpp>
+#include <boost/foreach.hpp>
 
 #include <algorithm>
-
-using namespace boost::assign;
+#include <set>
 
 namespace caspar { namespace image {
 
@@ -174,7 +173,20 @@ public:
 
 spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const core::video_format_desc& format_desc, const std::vector<std::wstring>& params)
 {
-       static const std::vector<std::wstring> 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]"))
        {
index f92a6a28f6d0d2a38990a8cee356f90a0b4efda5..93025faf06196412c443dffbc42efa56752ca47b 100644 (file)
@@ -42,7 +42,6 @@
 #include <common/tweener.h>
 #include <common/param.h>
 
-#include <boost/assign.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
@@ -52,8 +51,6 @@
 #include <algorithm>
 #include <array>
 
-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<core::frame_producer> create_scroll_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const core::video_format_desc& format_desc, const std::vector<std::wstring>& params)
 {
-       static const std::vector<std::wstring> 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
index 78ddc7adfcc728b43f3cecfd85bbc19f46be620a..809ab498f6dc42aeb9ce79d0e5e551a9746d5494 100644 (file)
@@ -53,8 +53,6 @@
 #include <tbb/concurrent_queue.h>
 #include <tbb/parallel_for.h>
 
-#include <boost/assign.hpp>
-
 #include <asmlib.h>
 
 #include <algorithm>
@@ -184,7 +182,7 @@ public:
                                boost::rational<int>(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");
                }())
        {               
index ac2b26ec8b9defdffdddd28dc925e6e04daf22dd..50bdda111325b9fe6e2177b686953862cd4f257d 100644 (file)
@@ -48,9 +48,9 @@
 #include <deque>
 #include <queue>
 #include <string>
+#include <set>
 #include <math.h>
 
-#include <boost/assign.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <boost/range/algorithm.hpp>
index d52ed7ed3ecd405c2f1efdc39f67fe1b8b0d167e..6c796b524ec60d22b3448054887cf95b9185adbc 100644 (file)
@@ -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"));
 
index 5be2b7a954b128219b9392123d0bb534414126f4..34a28f723bfd3ceee93f5050f4289a0b4d46e505 100644 (file)
@@ -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("<invoke name=\"Add\" returntype=\"xml\"><arguments><number>1</number><string>") << currentProfile_ << '/' <<  templateName << TEXT("</string><number>0</number><true/><string> </string><string><![CDATA[ ") << xmlData << TEXT(" ]]></string></arguments></invoke>");
index 4667215f6fb3466bc7c4dda92b64e8886e2eac60..ae8313265eeb3d46fae266c3c85332cdeaf6a665 100644 (file)
@@ -25,8 +25,8 @@
 
 #include <set>
 
-#include <boost/foreach.hpp>
 #include <boost/assign.hpp>
+#include <boost/foreach.hpp>
 
 #include <common/base64.h>
 #include <common/except.h>
index 6bd8942d298fe7aafec0de19cf0429933890a515..1ea0be4694ccfb31bf49fbc585e96240bb9fcd66 100644 (file)
@@ -33,6 +33,8 @@
 
 #include <accelerator/cpu/image/image_mixer.h>
 
+#include <boost/assign.hpp>
+
 namespace caspar { namespace core {
 
 spl::shared_ptr<accelerator::ogl::device> ogl_device()
index 03c0247db3891a3d298a4faa4b763c181a2f1d9e..f4cc514fe3965913eb7a58839957c4560aba5d17 100644 (file)
 
 #include <gtest/gtest.h>
 
-#include <boost/assign.hpp>
-
 #include <common/param.h>
 
 namespace {
-       static auto params = boost::assign::list_of<std::wstring>
-                       (L"param1")(L"1")
-                       (L"param2")(L"string value");
+       static auto params = {
+               L"param1", L"1",
+               L"param2", L"string value" };
 }
 
 namespace caspar {