swap_layer(index, other_index);\r
else\r
{\r
- if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc() || &channel_.ogl() != &other.impl_->channel_.ogl())\r
- BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between incompatible channels."));\r
-\r
- auto func = [&]{layers_[index].swap(other.impl_->layers_[other_index]);};\r
- \r
+ auto func = [&]{layers_[index].swap(other.impl_->layers_[other_index]);}; \r
channel_.execution().invoke([&]{other.impl_->channel_.execution().invoke(func, high_priority);}, high_priority);\r
}\r
}\r
if(other.impl_.get() == this)\r
return;\r
\r
- if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc() || &channel_.ogl() != &other.impl_->channel_.ogl())\r
- BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between incompatible channels."));\r
-\r
auto func = [&]\r
{\r
auto sel_first = [](const std::pair<int, layer>& pair){return pair.first;};\r
}, high_priority );\r
}\r
\r
- boost::unique_future<safe_ptr<frame_producer>> foreground(int index)\r
+ safe_ptr<frame_producer> foreground(int index)\r
{\r
- return channel_.execution().begin_invoke([=]{return layers_[index].foreground();}, high_priority);\r
+ return channel_.execution().invoke([=]{return layers_[index].foreground();}, high_priority);\r
}\r
\r
- boost::unique_future<safe_ptr<frame_producer>> background(int index)\r
+ safe_ptr<frame_producer> background(int index)\r
{\r
- return channel_.execution().begin_invoke([=]{return layers_[index].background();}, high_priority);\r
+ return channel_.execution().invoke([=]{return layers_[index].background();}, high_priority);\r
}\r
\r
std::wstring print() const\r
void stage::swap_layer(int index, size_t other_index){impl_->swap_layer(index, other_index);}\r
void stage::swap_layer(int index, size_t other_index, stage& other){impl_->swap_layer(index, other_index, other);}\r
layer_status stage::get_status(int index){return impl_->get_status(index);}\r
-boost::unique_future<safe_ptr<frame_producer>> stage::foreground(size_t index) {return impl_->foreground(index);}\r
-boost::unique_future<safe_ptr<frame_producer>> stage::background(size_t index) {return impl_->background(index);}\r
+safe_ptr<frame_producer> stage::foreground(size_t index) {return impl_->foreground(index);}\r
+safe_ptr<frame_producer> stage::background(size_t index) {return impl_->background(index);}\r
std::map<int, safe_ptr<basic_frame>> stage::execute(){return impl_->execute();}\r
}}
\ No newline at end of file
#include <common/memory/safe_ptr.h>\r
\r
#include <boost/noncopyable.hpp>\r
-#include <boost/thread/future.hpp>\r
\r
namespace caspar { namespace core {\r
\r
void swap_layer(int index, size_t other_index, stage& other);\r
\r
layer_status get_status(int index);\r
- boost::unique_future<safe_ptr<frame_producer>> foreground(size_t index);\r
- boost::unique_future<safe_ptr<frame_producer>> background(size_t index);\r
+ safe_ptr<frame_producer> foreground(size_t index);\r
+ safe_ptr<frame_producer> background(size_t index);\r
\r
private:\r
struct implementation;\r