X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Fstage.cpp;h=a3b3a892d9eee551a8cd54c2dd5a8465a66aae7a;hb=3d6cb3c7621f3080b7a9ed3eba8487d7aa60d108;hp=edc9c521bed7b8e755d2ad7831bc38365d07fcc6;hpb=c5c60ab6b8f236a563c03047f20b1ba4cd848aba;p=casparcg diff --git a/core/producer/stage.cpp b/core/producer/stage.cpp index edc9c521b..a3b3a892d 100644 --- a/core/producer/stage.cpp +++ b/core/producer/stage.cpp @@ -29,6 +29,7 @@ #include "../frame/frame_factory.h" #include +#include #include #include @@ -317,9 +318,18 @@ public: return layers_[index].info(); }, task_priority::high_priority); } + + boost::unique_future call(int index, const std::wstring& params) + { + return flatten(executor_.begin_invoke([=] + { + return make_shared(layers_[index].foreground()->call(params)); + }, task_priority::high_priority)); + } }; stage::stage(spl::shared_ptr graph) : impl_(new impl(std::move(graph))){} +boost::unique_future stage::call(int index, const std::wstring& params){return impl_->call(index, params);} void stage::apply_transforms(const std::vector& transforms){impl_->apply_transforms(transforms);} void stage::apply_transform(int index, const std::function& transform, unsigned int mix_duration, const tweener& tween){impl_->apply_transform(index, transform, mix_duration, tween);} void stage::clear_transforms(int index){impl_->clear_transforms(index);}