try\r
{\r
BOOST_FOREACH(auto& layer, layers_)\r
+ {\r
frames[layer.first] = layer.second.receive();\r
+ channel_.execution().yield();\r
+ }\r
}\r
catch(...)\r
{\r
channel_.execution().invoke([&]\r
{\r
layers_[index].load(make_safe<destroy_producer_proxy>(channel_.destruction(), producer), preview, auto_play_delta);\r
- });\r
+ }, high_priority);\r
}\r
\r
void pause(int index)\r
channel_.execution().invoke([&]\r
{\r
layers_[index].pause();\r
- });\r
+ }, high_priority);\r
}\r
\r
void play(int index)\r
channel_.execution().invoke([&]\r
{\r
layers_[index].play();\r
- });\r
+ }, high_priority);\r
}\r
\r
void stop(int index)\r
channel_.execution().invoke([&]\r
{\r
layers_[index].stop();\r
- });\r
+ }, high_priority);\r
}\r
\r
void clear(int index)\r
channel_.execution().invoke([&]\r
{\r
layers_.erase(index);\r
- });\r
+ }, high_priority);\r
}\r
\r
void clear()\r
channel_.execution().invoke([&]\r
{\r
layers_.clear();\r
- });\r
+ }, high_priority);\r
} \r
\r
void swap_layer(int index, size_t other_index)\r
channel_.execution().invoke([&]\r
{\r
layers_[index].swap(layers_[other_index]);\r
- });\r
+ }, high_priority);\r
}\r
\r
void swap_layer(int index, size_t other_index, stage& other)\r
\r
auto func = [&]{layers_[index].swap(other.impl_->layers_[other_index]);};\r
\r
- channel_.execution().invoke([&]{other.impl_->channel_.execution().invoke(func);});\r
+ channel_.execution().invoke([&]{other.impl_->channel_.execution().invoke(func, high_priority);}, high_priority);\r
}\r
}\r
\r
layers_[index].swap(other.impl_->layers_[index]);\r
};\r
\r
- channel_.execution().invoke([&]{other.impl_->channel_.execution().invoke(func);});\r
+ channel_.execution().invoke([&]{other.impl_->channel_.execution().invoke(func, high_priority);});\r
}\r
\r
boost::unique_future<safe_ptr<frame_producer>> foreground(int index)\r
{\r
- return channel_.execution().begin_invoke([=]{return layers_[index].foreground();});\r
+ return channel_.execution().begin_invoke([=]{return layers_[index].foreground();}, high_priority);\r
}\r
\r
boost::unique_future<safe_ptr<frame_producer>> background(int index)\r
{\r
- return channel_.execution().begin_invoke([=]{return layers_[index].background();});\r
+ return channel_.execution().begin_invoke([=]{return layers_[index].background();}, high_priority);\r
}\r
\r
std::wstring print() const\r