\r
~implementation()\r
{\r
+ Stop();\r
is_running_ = false;\r
input_.try_push(std::vector<short>());\r
input_.try_push(std::vector<short>());\r
: factory_(factory)\r
, output_(output)\r
{\r
- for(size_t n = 0; n < layers_.size(); ++n)\r
- layers_[n] = layer(n);\r
-\r
executor_.start();\r
executor_.begin_invoke([=]{tick();});\r
}\r
[&](const tbb::blocked_range<size_t>& r)\r
{\r
for(size_t i = r.begin(); i != r.end(); ++i)\r
+ {\r
frames[i] = layers_[i].receive();\r
+ frames[i]->set_layer_index(i);\r
+ }\r
}); \r
boost::range::remove_erase(frames, draw_frame::eof());\r
boost::range::remove_erase(frames, draw_frame::empty());\r
safe_ptr<frame_producer> foreground_;\r
safe_ptr<frame_producer> background_;\r
safe_ptr<draw_frame> last_frame_;\r
- const int index_;\r
bool is_paused_;\r
\r
public:\r
- implementation(int index) \r
+ implementation() \r
: foreground_(frame_producer::empty())\r
, background_(frame_producer::empty())\r
, last_frame_(draw_frame::empty())\r
- , index_(index) \r
, is_paused_(false){}\r
\r
void load(const safe_ptr<frame_producer>& frame_producer, bool play_on_load)\r
try\r
{\r
last_frame_ = foreground_->receive(); \r
- last_frame_->set_layer_index(index_);\r
if(last_frame_ == draw_frame::eof())\r
{\r
CASPAR_ASSERT(foreground_ != frame_producer::empty());\r
return last_frame_;\r
}\r
\r
- std::wstring print() const { return L"layer[" + boost::lexical_cast<std::wstring>(index_) + L"]"; }\r
+ std::wstring print() const { return L"layer[]"; }\r
};\r
\r
-layer::layer(int index) \r
+layer::layer() \r
{\r
- impl_ = new implementation(index);\r
+ impl_ = new implementation();\r
}\r
layer::layer(layer&& other) : impl_(std::move(other.impl_)){other.impl_ = nullptr;}\r
layer::~layer()\r
class layer : boost::noncopyable\r
{\r
public:\r
- layer(int index = -1); // nothrow\r
+ layer(); // nothrow\r
layer(layer&& other); // nothrow\r
~layer();\r
layer& operator=(layer&& other); // nothrow\r
std::wstring wcmd;\r
std::getline(std::wcin, wcmd); // TODO: It's blocking...\r
is_running = wcmd != L"exit" && wcmd != L"q";\r
- if(wcmd.substr(0, 2) == L"10")\r
+ if(wcmd.substr(0, 2) == L"12")\r
+ {\r
+ wcmd = L"LOADBG 1-1 A LOOP AUTOPLAY\r\n";\r
+ amcp.Parse(wcmd.c_str(), wcmd.length(), dummy);\r
+ wcmd = L"LOADBG 1-2 DV LOOP AUTOPLAY\r\n";\r
+ amcp.Parse(wcmd.c_str(), wcmd.length(), dummy);\r
+ wcmd = L"MIXER 1-1 VIDEO FIX_RECT 0.0 0.0 0.5 0.5\r\n";\r
+ amcp.Parse(wcmd.c_str(), wcmd.length(), dummy);\r
+ wcmd = L"MIXER 1-2 VIDEO FIX_RECT 0.5 0.0 0.5 0.5\r\n";\r
+ amcp.Parse(wcmd.c_str(), wcmd.length(), dummy);\r
+ }\r
+ else if(wcmd.substr(0, 2) == L"10")\r
wcmd = L"MIXER 1-1 VIDEO CLIP_RECT 0.4 0.4 0.5 0.5";\r
if(wcmd.substr(0, 2) == L"11")\r
wcmd = L"MIXER 1-1 VIDEO FIX_RECT 0.4 0.4 0.5 0.5";\r