]> git.sesse.net Git - casparcg/blobdiff - core/producer/stage.cpp
2.1.0: -ffmpeg_producer: seek while paused.
[casparcg] / core / producer / stage.cpp
index edc9c521bed7b8e755d2ad7831bc38365d07fcc6..a3b3a892d9eee551a8cd54c2dd5a8465a66aae7a 100644 (file)
@@ -29,6 +29,7 @@
 #include "../frame/frame_factory.h"\r
 \r
 #include <common/executor.h>\r
+#include <common/future.h>\r
 #include <common/diagnostics/graph.h>\r
 \r
 #include <core/frame/frame_transform.h>\r
@@ -317,9 +318,18 @@ public:
                        return layers_[index].info();\r
                }, task_priority::high_priority);\r
        }               \r
+       \r
+       boost::unique_future<std::wstring> call(int index, const std::wstring& params)\r
+       {\r
+               return flatten(executor_.begin_invoke([=]\r
+               {\r
+                       return make_shared(layers_[index].foreground()->call(params));\r
+               }, task_priority::high_priority));\r
+       }\r
 };\r
 \r
 stage::stage(spl::shared_ptr<diagnostics::graph> graph) : impl_(new impl(std::move(graph))){}\r
+boost::unique_future<std::wstring> stage::call(int index, const std::wstring& params){return impl_->call(index, params);}\r
 void stage::apply_transforms(const std::vector<stage::transform_tuple_t>& transforms){impl_->apply_transforms(transforms);}\r
 void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const tweener& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
 void stage::clear_transforms(int index){impl_->clear_transforms(index);}\r