X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=protocol%2Famcp%2FAMCPProtocolStrategy.cpp;h=f22827bd35c0a8729b466e1798674fd382f5a3f5;hb=8d03d97e6eca0a1b0d2ce6f81cc9054e474850b4;hp=5db0c6e09b06b807c3d993286f67d79d229d6df7;hpb=8612f40e8d3f3f37903b4462ae34e279f3b1f991;p=casparcg diff --git a/protocol/amcp/AMCPProtocolStrategy.cpp b/protocol/amcp/AMCPProtocolStrategy.cpp index 5db0c6e09..f22827bd3 100644 --- a/protocol/amcp/AMCPProtocolStrategy.cpp +++ b/protocol/amcp/AMCPProtocolStrategy.cpp @@ -69,10 +69,16 @@ private: spl::shared_ptr repo_; public: - impl(const spl::shared_ptr& repo) + impl(const std::wstring& name, const spl::shared_ptr& repo) : repo_(repo) { - commandQueues_.resize(repo_->channels().size() + 1); + commandQueues_.push_back(spl::make_shared(L"General Queue for " + name)); + + for (int i = 0; i < repo_->channels().size(); ++i) + { + commandQueues_.push_back(spl::make_shared( + L"Channel " + boost::lexical_cast(i + 1) + L" for " + name)); + } } ~impl() {} @@ -92,7 +98,7 @@ public: std::wstring command_name; AMCPCommand::ptr_type command; error_state error = error_state::no_error; - AMCPCommandQueue::ptr_type queue; + std::shared_ptr queue; }; //The paser method expects message to be complete messages with the delimiter stripped away. @@ -310,8 +316,8 @@ private: } }; -AMCPProtocolStrategy::AMCPProtocolStrategy(const spl::shared_ptr& repo) - : impl_(spl::make_unique(repo)) +AMCPProtocolStrategy::AMCPProtocolStrategy(const std::wstring& name, const spl::shared_ptr& repo) + : impl_(spl::make_unique(name, repo)) { } AMCPProtocolStrategy::~AMCPProtocolStrategy() {}