* Removed some workarounds previously required for Visual Studio 2013 but not for 2015.
* win32_exception is now a caspar_exception to allow complete stack trace information to be attached.
* streaming_consumer.cpp is now more backwards compatible with ffmpeg_consumer.cpp. Will hopefully be able to completely replace it.
* Fixed race condition in io_service shutdown.
* tbb_malloc does not work on vc14 yet. Disabled for now.
add_definitions( -DUNICODE )
add_definitions( -D_UNICODE )
add_definitions( -DGLEW_NO_GLU )
+add_definitions( "-DBOOST_ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept(true)" ) # Workaround macro redefinition in boost
if (MSVC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /Zi /W4 /WX /MP /fp:fast /FIcommon/compiler/vs/disable_silly_warnings.h")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /Zi /W4 /WX /MP /fp:fast /Zm192 /FIcommon/compiler/vs/disable_silly_warnings.h")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D TBB_USE_ASSERT=1 /D TBB_USE_DEBUG /bigobj")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /Ot /Gy /bigobj")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi /Ot /Gy /bigobj /Ob2")
{
using namespace xmm;
- if(reinterpret_cast<long>(dest) % 16 != 0 || reinterpret_cast<long>(source) % 16 != 0)
+ if(reinterpret_cast<std::uint64_t>(dest) % 16 != 0 || reinterpret_cast<std::uint64_t>(source) % 16 != 0)
kernel<temporal_tag, unaligned_tag>(dest, source, count);
else
kernel<temporal_tag, aligned_tag>(dest, source, count);
casparcg_add_runtime_dependency("${GLEW_BIN_PATH}/glew32.dll")
casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbb.dll")
casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbb_debug.dll")
- casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc.dll")
- casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_debug.dll")
- casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy.dll")
- casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy_debug.dll")
+
+ # Reenable when tbb gets official support for vc14
+ # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc.dll")
+ # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_debug.dll")
+ # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy.dll")
+ # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy_debug.dll")
else()
casparcg_add_runtime_dependency("${GLEW_BIN_PATH}/libGLEW.so.1.12")
casparcg_add_runtime_dependency("${TBB_BIN_PATH}/libtbb.so.2")
// If VC7 and later, then use the shipped 'dbghelp.h'-file
#pragma pack(push,8)
#if _MSC_VER >= 1300
+#pragma warning(disable:4091)
#include <dbghelp.h>
#else
// inline the important dbghelp.h-declarations...
CHAR loadedImageName[STACKWALK_MAX_NAMELEN];
} CallstackEntry;
- typedef enum CallstackEntryType {firstEntry, nextEntry, lastEntry};
+ enum CallstackEntryType {firstEntry, nextEntry, lastEntry};
virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName);
virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion);
#include "win32_exception.h"
#include <boost/thread.hpp>
+#include <boost/lexical_cast.hpp>
#include "../../thread_info.h"
#include "windows.h"
}
}
-void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo) {
- switch(errorCode)
+msg_info_t generate_message(const EXCEPTION_RECORD& info)
+{
+ switch (info.ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
- throw win32_access_violation(*(pInfo->ExceptionRecord));
- break;
+ {
+ bool is_write = info.ExceptionInformation[0] == 1;
+ auto bad_address = reinterpret_cast<const void*>(info.ExceptionInformation[1]);
+ auto location = info.ExceptionAddress;
+ return "Access violation at " + boost::lexical_cast<std::string>(location) + " trying to " + (is_write ? "write " : "read ") + boost::lexical_cast<std::string>(bad_address);
+ }
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+ return "Divide by zero";
default:
- throw win32_exception(*(pInfo->ExceptionRecord));
+ return "Win32 exception";
}
}
-win32_exception::win32_exception(const EXCEPTION_RECORD& info) : message_("Win32 exception"), location_(info.ExceptionAddress), errorCode_(info.ExceptionCode)
-{
- switch(info.ExceptionCode)
+void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo) {
+ switch(errorCode)
{
case EXCEPTION_ACCESS_VIOLATION:
- message_ = "Access violation";
- break;
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- message_ = "Divide by zero";
- break;
+ CASPAR_THROW_EXCEPTION(win32_access_violation() << generate_message(*(pInfo->ExceptionRecord)));
+ default:
+ CASPAR_THROW_EXCEPTION(win32_exception() << generate_message(*(pInfo->ExceptionRecord)));
}
}
-win32_access_violation::win32_access_violation(const EXCEPTION_RECORD& info) : win32_exception(info), isWrite_(false), badAddress_(0)
-{
- isWrite_ = info.ExceptionInformation[0] == 1;
- badAddress_ = reinterpret_cast<win32_exception::address>(info.ExceptionInformation[1]);
-}
-
-const char* win32_access_violation::what() const
-{
- sprintf_s<>(messageBuffer_, "Access violation at %p, trying to %s %p", location(), isWrite_?"write":"read", badAddress_);
-
- return messageBuffer_;
-}
-
}
namespace caspar {
-class win32_exception : public std::exception
+struct win32_exception : virtual caspar_exception
{
-public:
- typedef const void* address;
-
- address location() const { return location_; }
- unsigned int error_code() const { return errorCode_; }
- virtual const char* what() const throw() override { return message_; }
static void Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);
-
-protected:
- win32_exception(const EXCEPTION_RECORD& info);
-
-private:
- const char* message_;
-
- address location_;
- unsigned int errorCode_;
};
-class win32_access_violation : public win32_exception
-{
- mutable char messageBuffer_[256];
-
-public:
- bool is_write() const { return isWrite_; }
- address bad_address() const { return badAddress_;}
- virtual const char* what() const throw() override;
-
-protected:
- win32_access_violation(const EXCEPTION_RECORD& info);
- friend void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo);
-
-private:
- bool isWrite_;
- address badAddress_;
-};
+struct win32_access_violation : virtual win32_exception { };
}
catch(...)
{
if(!std::uncaught_exception())
+#pragma warning(push)
+#pragma warning(disable: 4297)
throw;
+#pragma warning(pop)
else
CASPAR_LOG_CURRENT_EXCEPTION();
}
for (auto it = enumerable_.begin(); it != enumerable_.end();)
{
- auto lock = it->second.lock();
+ auto strong = it->second.lock();
- if (lock)
+ if (strong)
{
- result.push_back(spl::make_shared_ptr(lock));
+ result.push_back(spl::make_shared_ptr(strong));
++it;
}
else
static const auto result = []
{
- std::vector<std::wstring> result;
+ std::vector<std::wstring> tweens;
for (auto& tween : get_tweens())
- result.push_back(tween.first);
+ tweens.push_back(tween.first);
- return result;
+ return tweens;
}();
//static const std::vector<std::wstring> result;
mixer/image/blend_modes.cpp
mixer/mixer.cpp
- monitor/monitor.cpp
-
producer/color/color_producer.cpp
producer/draw/freehand_producer.cpp
auto c = caspar::diagnostics::color(color);
return {
- (color >> 24) & 255,
- (color >> 16) & 255,
- (color >> 8) & 255,
- (color >> 0) & 255
+ static_cast<sf::Uint8>((color >> 24) & 255),
+ static_cast<sf::Uint8>((color >> 16) & 255),
+ static_cast<sf::Uint8>((color >> 8) & 255),
+ static_cast<sf::Uint8>((color >> 0) & 255)
};
}
+++ /dev/null
-/*
-* Copyright 2013 Sveriges Television AB http://casparcg.com/
-*
-* This file is part of CasparCG (www.casparcg.com).
-*
-* CasparCG is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* CasparCG is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
-*
-* Author: Robert Nagy, ronag89@gmail.com
-*/
-#include "../StdAfx.h"
-
-#include "monitor.h"
-
-namespace caspar { namespace core { namespace monitor {
-
-/*class in_callers_thread_schedule_group : public Concurrency::ScheduleGroup
-{
- virtual void ScheduleTask(Concurrency::TaskProc proc, void* data) override
- {
- proc(data);
- }
-
- virtual unsigned int Id() const override
- {
- return 1;
- }
-
- virtual unsigned int Reference() override
- {
- return 1;
- }
-
- virtual unsigned int Release() override
- {
- return 1;
- }
-};
-
-Concurrency::ScheduleGroup& get_in_callers_thread_schedule_group()
-{
- static in_callers_thread_schedule_group group;
-
- return group;
-}*/
-
-}}}
#include <common/memory.h>
#include <boost/property_tree/ptree_fwd.hpp>
+#include <boost/optional.hpp>
#include <string>
-FORWARD1(boost, template<typename T> class optional);
-
namespace caspar { namespace core {
class layer final : public interaction_sink
void swap(layer& other);
- void load(spl::shared_ptr<frame_producer> producer, bool preview, const boost::optional<int32_t>& auto_play_delta = nullptr);
+ void load(spl::shared_ptr<frame_producer> producer, bool preview, const boost::optional<int32_t>& auto_play_delta = boost::optional<int32_t>());
void play();
void pause();
void resume();
+ u16(expr.type().name())));
}
-#if defined(_MSC_VER)
-template<>
-static binding<std::wstring> parse_expression(
- const std::wstring& str, const variable_repository& var_repo)
-#else
template<>
binding<std::wstring> parse_expression(
const std::wstring& str, const variable_repository& var_repo)
-#endif
{
auto cursor = str.cbegin();
auto expr = parse_expression(cursor, str, var_repo);
std::future<void> clear_transforms(int index);
std::future<void> clear_transforms();
std::future<frame_transform> get_current_transform(int index);
- std::future<void> load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = nullptr);
+ std::future<void> load(int index, const spl::shared_ptr<frame_producer>& producer, bool preview = false, const boost::optional<int32_t>& auto_play_delta = boost::optional<int32_t>());
std::future<void> pause(int index);
std::future<void> resume(int index);
std::future<void> play(int index);
using namespace boost::filesystem;
-std::map<std::wstring, std::wstring> fonts;
+std::map<std::wstring, std::wstring> g_fonts;
std::map<std::wstring, std::wstring> enumerate_fonts()
{
void init(module_dependencies dependencies)
{
- fonts = enumerate_fonts();
+ g_fonts = enumerate_fonts();
dependencies.producer_registry->register_producer_factory(L"Text Producer", create_text_producer, describe_text_producer);
}
text_info& find_font_file(text_info& info)
{
auto& font_name = info.font;
- auto it = std::find_if(fonts.begin(), fonts.end(), font_comparer(font_name));
- info.font_file = (it != fonts.end()) ? (*it).second : L"";
+ auto it = std::find_if(g_fonts.begin(), g_fonts.end(), font_comparer(font_name));
+ info.font_file = (it != g_fonts.end()) ? (*it).second : L"";
return info;
}
int best_width = INT_MAX;
node_iterator best_it = nodes_.end();
- auto it = nodes_.begin();
- for(; it != nodes_.end(); ++it)
+ for(auto it = nodes_.begin(); it != nodes_.end(); ++it)
{
int y = fit(it, width, height);
if( y >= 0 )
configuration::keyer_t keyer,
const std::wstring& print)
{
- if (keyer == configuration::keyer_t::internal_keyer
- || keyer == configuration::keyer_t::external_separate_device_keyer)
+ if (keyer == configuration::keyer_t::internal_keyer)
{
BOOL value = true;
if (SUCCEEDED(attributes->GetFlag(BMDDeckLinkSupportsInternalKeying, &value)) && !value)
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->width = output_format_.width;
c->height = output_format_.height - output_format_.croptop - output_format_.cropbot;
- c->time_base.den = format_desc_.time_scale;
- c->time_base.num = format_desc_.duration;
+ st->time_base.den = format_desc_.time_scale;
+ st->time_base.num = format_desc_.duration;
c->gop_size = 25;
c->flags |= format_desc_.field_mode == core::field_mode::progressive ? 0 : (CODEC_FLAG_INTERLACED_ME | CODEC_FLAG_INTERLACED_DCT);
c->pix_fmt = c->pix_fmt != PIX_FMT_NONE ? c->pix_fmt : PIX_FMT_YUV420P;
c->sample_rate = 48000;
c->channels = 2;
c->sample_fmt = AV_SAMPLE_FMT_S16;
- c->time_base.num = 1;
- c->time_base.den = c->sample_rate;
+ st->time_base.num = 1;
+ st->time_base.den = c->sample_rate;
if(output_format_.vcodec == CODEC_ID_FLV1)
c->sample_rate = 44100;
auto av_frame = convert_video(frame, enc);
av_frame->interlaced_frame = format_desc_.field_mode != core::field_mode::progressive;
av_frame->top_field_first = format_desc_.field_mode == core::field_mode::upper;
- av_frame->pts = frame_number_++;
+ av_frame->pts = frame_number_++;
monitor_subject_ << core::monitor::message("/frame")
% static_cast<int64_t>(frame_number_)
out_frame->data,
out_frame->linesize);
+ out_frame->format = c->pix_fmt;
+ out_frame->width = c->width;
+ out_frame->height = c->height;
+
return out_frame;
}
ffmpeg_consumer_proxy(const std::wstring& filename, const std::vector<option>& options, bool separate_key)
: filename_(filename)
, options_(options)
- , separate_key_(separate_key_)
+ , separate_key_(separate_key)
{
}
int consumer_index_offset_;
std::map<std::string, std::string> options_;
+ bool compatibility_mode_;
core::video_format_desc in_video_format_;
streaming_consumer(
std::string path,
- std::string options)
+ std::string options,
+ bool compatibility_mode)
: path_(path)
, consumer_index_offset_(crc16(path))
+ , compatibility_mode_(compatibility_mode)
, video_pts_(0)
, audio_pts_(0)
, executor_(print())
const auto overwrite =
try_remove_arg<std::string>(
options_,
- boost::regex("y")) != nullptr;
+ boost::regex("y")) != boost::none;
if(!boost::regex_match(
path_.string(),
if(boost::filesystem::exists(path_))
{
- if(!overwrite)
+ if(!overwrite && !compatibility_mode_)
BOOST_THROW_EXCEPTION(invalid_argument() << msg_info("File exists"));
boost::filesystem::remove(path_);
int index() const override
{
- return 100000 + consumer_index_offset_;
+ return compatibility_mode_ ? 200 : 100000 + consumer_index_offset_;
}
int64_t presentation_frame_age_millis() const override
switch(enc->codec_type)
{
case AVMEDIA_TYPE_VIDEO:
- {
- enc->time_base = video_graph_out_->inputs[0]->time_base;
- enc->pix_fmt = static_cast<AVPixelFormat>(video_graph_out_->inputs[0]->format);
- enc->sample_aspect_ratio = st->sample_aspect_ratio = video_graph_out_->inputs[0]->sample_aspect_ratio;
- enc->width = video_graph_out_->inputs[0]->w;
- enc->height = video_graph_out_->inputs[0]->h;
+ {
+ st->time_base = video_graph_out_->inputs[0]->time_base;
+ enc->pix_fmt = static_cast<AVPixelFormat>(video_graph_out_->inputs[0]->format);
+ enc->sample_aspect_ratio = st->sample_aspect_ratio = video_graph_out_->inputs[0]->sample_aspect_ratio;
+ enc->width = video_graph_out_->inputs[0]->w;
+ enc->height = video_graph_out_->inputs[0]->h;
+ enc->bit_rate_tolerance = 400 * 1000000;
break;
}
case AVMEDIA_TYPE_AUDIO:
{
- enc->time_base = audio_graph_out_->inputs[0]->time_base;
- enc->sample_fmt = static_cast<AVSampleFormat>(audio_graph_out_->inputs[0]->format);
- enc->sample_rate = audio_graph_out_->inputs[0]->sample_rate;
- enc->channel_layout = audio_graph_out_->inputs[0]->channel_layout;
- enc->channels = audio_graph_out_->inputs[0]->channels;
+ st->time_base = audio_graph_out_->inputs[0]->time_base;
+ enc->sample_fmt = static_cast<AVSampleFormat>(audio_graph_out_->inputs[0]->format);
+ enc->sample_rate = audio_graph_out_->inputs[0]->sample_rate;
+ enc->channel_layout = audio_graph_out_->inputs[0]->channel_layout;
+ enc->channels = audio_graph_out_->inputs[0]->channels;
break;
}
spl::shared_ptr<core::frame_consumer> create_streaming_consumer(
const std::vector<std::wstring>& params, core::interaction_sink*)
{
- if (params.size() < 1 || params.at(0) != L"STREAM")
+ if (params.size() < 1 || (!boost::iequals(params.at(0), L"STREAM") && !boost::iequals(params.at(0), L"FILE")))
return core::frame_consumer::empty();
- auto path = u8(params.at(1));
+ auto compatibility_mode = boost::iequals(params.at(0), L"FILE");
+ auto path = u8(params.size() > 1 ? params.at(1) : L"");
auto args = u8(boost::join(params, L" "));
- return spl::make_shared<streaming_consumer>(path, args);
+ return spl::make_shared<streaming_consumer>(path, args, compatibility_mode);
}
spl::shared_ptr<core::frame_consumer> create_preconfigured_streaming_consumer(
{
return spl::make_shared<streaming_consumer>(
u8(ptree.get<std::wstring>(L"path")),
- u8(ptree.get<std::wstring>(L"args", L"")));
+ u8(ptree.get<std::wstring>(L"args", L"")),
+ false);
}
}}
END_COM_MAP()
BEGIN_SINK_MAP(FlashAxContainer)
- SINK_ENTRY_INFO(0, DIID__IShockwaveFlashEvents, 0xc5, OnFlashCall, &fnInfoFlashCallEvent)
- SINK_ENTRY_INFO(0, DIID__IShockwaveFlashEvents, 0xfffffd9f, OnReadyStateChange, &fnInfoReadyStateChangeEvent)
+ SINK_ENTRY_INFO(0, DIID__IShockwaveFlashEvents, static_cast<DISPID>(0xc5), OnFlashCall, &fnInfoFlashCallEvent)
+ SINK_ENTRY_INFO(0, DIID__IShockwaveFlashEvents, static_cast<DISPID>(0xfffffd9f), OnReadyStateChange, &fnInfoReadyStateChangeEvent)
END_SINK_MAP()
void STDMETHODCALLTYPE OnFlashCall(BSTR request);
std::vector<char> file_data;
std::copy((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>(), std::back_inserter(file_data));
- std::array<char, 32> data;
+ std::array<char, 32> uncompressed_data;
uLongf file_size = 32;
- auto ret = uncompress(reinterpret_cast<Bytef*>(data.data()), &file_size, reinterpret_cast<const Bytef*>(file_data.data()), static_cast<uLong>(file_data.size()));
+ auto ret = uncompress(reinterpret_cast<Bytef*>(uncompressed_data.data()), &file_size, reinterpret_cast<const Bytef*>(file_data.data()), static_cast<uLong>(file_data.size()));
if (ret == Z_DATA_ERROR)
CASPAR_THROW_EXCEPTION(io_error());
// http://thenobody.blog.matfyz.sk/p13084-how-to-get-dimensions-of-a-swf-file
- unsigned char nbits = reinterpret_cast<unsigned char*>(data.data())[0];
+ unsigned char nbits = reinterpret_cast<unsigned char*>(uncompressed_data.data())[0];
unsigned int size = nbits >> 3; // remove overlaping 3 bits
for (unsigned int j = 0; j < by_offset; ++j)
{
ibuf <<= 8;
- ibuf += reinterpret_cast<unsigned char*>(data.data())[1+ioffset+j];
+ ibuf += reinterpret_cast<unsigned char*>(uncompressed_data.data())[1+ioffset+j];
}
dims[i] = (ibuf >> (3 + bi_offset + (i * bi_offset))) / 20; // coordinates in twips, so divide by 20 for pixels
#include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp>
+#pragma warning(push)
+#pragma warning(disable: 4458)
#include <cef_app.h>
+#pragma warning(pop)
#pragma comment(lib, "libcef.lib")
#pragma comment(lib, "libcef_dll_wrapper.lib")
#include <tbb/atomic.h>
#include <tbb/concurrent_queue.h>
+#pragma warning(push)
+#pragma warning(disable: 4458)
#include <cef_task.h>
#include <cef_app.h>
#include <cef_client.h>
#include <cef_render_handler.h>
+#pragma warning(pop)
#include <asmlib.h>
#include <algorithm>
#include <array>
+#include <cstdint>
namespace caspar { namespace image {
{
core::pixel_format_desc desc = core::pixel_format::bgra;
desc.planes.push_back(core::pixel_format_desc::plane(width_, format_desc_.height, 4));
- auto frame = frame_factory->create_frame(reinterpret_cast<void*>(rand()), desc);
+ auto frame = frame_factory->create_frame(this, desc);
if(count >= frame.image_data(0).size())
{
{
core::pixel_format_desc desc = core::pixel_format::bgra;
desc.planes.push_back(core::pixel_format_desc::plane(format_desc_.width, height_, 4));
- auto frame = frame_factory->create_frame(reinterpret_cast<void*>(rand()), desc);
+ auto frame = frame_factory->create_frame(this, desc);
if(count >= frame.image_data(0).size())
{
for(int y = 0; y < height_; ++y)
void descriptor::read_value(const std::wstring& key, bigendian_file_input_stream& stream)
{
- auto type = stream.read_long();
+ auto value_type = stream.read_long();
- switch(type)
+ switch(value_type)
{
case 'Objc':
{
#include <common/log.h>
+#pragma warning(push)
+#pragma warning(disable: 4459)
+#pragma warning(disable: 4244)
#include <boost/spirit/home/qi.hpp>
+#pragma warning(pop)
+
#include <boost/lexical_cast.hpp>
#include <cstdint>
for( ReceivedBundle::const_iterator i = b.ElementsBegin();
i != b.ElementsEnd(); ++i ){
if( i->IsBundle() ){
- ReceivedBundle b(*i);
- os << b << "\n";
+ ReceivedBundle b2(*i);
+ os << b2 << "\n";
}else{
ReceivedMessage m(*i);
for( int j=0; j < indent; ++j )
#include <stdlib.h>
#include <crtdbg.h>
#else
- #include <tbb/tbbmalloc_proxy.h>
+ // Reenable when tbb gets official support for vc14
+ //#include <tbb/tbbmalloc_proxy.h>
#endif
#include "server.h"
{
ensure_gpf_handler_installed_for_thread("asio-thread");
- while (weak_work.lock())
+ while (auto strong = weak_work.lock())
{
try
{