]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 14 Aug 2011 18:03:49 +0000 (18:03 +0000)
committerRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 14 Aug 2011 18:03:49 +0000 (18:03 +0000)
core/producer/stage.cpp
core/producer/stage.h
modules/flash/producer/cg_producer.cpp

index d222b39d73e9a6b98319a7bd6bb35d666fb6bde7..72a2e80e7c38119bfe03f8b1d886d16193e41a57 100644 (file)
@@ -161,11 +161,7 @@ public:
                        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
@@ -175,9 +171,6 @@ public:
                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
@@ -203,14 +196,14 @@ public:
                }, 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
@@ -231,7 +224,7 @@ void stage::clear(){impl_->clear();}
 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
index b13e712571e6e2bc558706a9ba4a599ed5b03120..8fb21a818d5c0a2e693afa50b618cf88f03e4d31 100644 (file)
@@ -25,7 +25,6 @@
 #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
@@ -52,8 +51,8 @@ public:
        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
index 42a7af2953a1b3b6032a94d09b91623f72db982d..1cb9c09b6f98d6d22310b85edb995c76c14ef2ca 100644 (file)
@@ -111,7 +111,7 @@ public:
        \r
 safe_ptr<cg_producer> get_default_cg_producer(const safe_ptr<core::video_channel>& video_channel, int render_layer)\r
 {      \r
-       auto flash_producer = video_channel->stage()->foreground(render_layer).get();\r
+       auto flash_producer = video_channel->stage()->foreground(render_layer);\r
 \r
        if(flash_producer->print().find(L"flash[") == std::string::npos) // UGLY hack\r
        {\r