} \r
}\r
\r
- void set_transform(int index, const frame_transform& transform, unsigned int mix_duration, const std::wstring& tween)\r
+ void apply_transform(int index, const frame_transform& transform, unsigned int mix_duration, const std::wstring& tween)\r
{\r
executor_.begin_invoke([=]\r
{\r
};\r
\r
stage::stage(const safe_ptr<stage::target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc) : impl_(new impl(target, graph, format_desc)){}\r
-void stage::set_frame_transform(int index, const core::frame_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform(index, transform, mix_duration, tween);}\r
-void stage::apply_frame_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
+void stage::apply_transform(int index, const core::frame_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
+void stage::apply_transform(int index, const std::function<core::frame_transform(core::frame_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform(index, transform, mix_duration, tween);}\r
void stage::clear_transforms(int index){impl_->clear_transforms(index);}\r
void stage::clear_transforms(){impl_->clear_transforms();}\r
void stage::spawn_token(){impl_->spawn_token();}\r
#include <common/concurrency/target.h>\r
\r
#include <boost/property_tree/ptree_fwd.hpp>\r
-#include <boost/thread/future.hpp>\r
\r
#include <functional>\r
\r
FORWARD2(caspar, diagnostics, class graph);\r
+FORWARD1(boost, template<typename> class unique_future);\r
\r
namespace caspar { namespace core {\r
\r
class stage sealed\r
{\r
CASPAR_NO_COPY(stage);\r
-public:\r
+public: \r
typedef target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>> target_t;\r
\r
stage(const safe_ptr<target_t>& target, const safe_ptr<diagnostics::graph>& graph, const struct video_format_desc& format_desc);\r
\r
// stage\r
\r
- void set_frame_transform(int index, const struct frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void apply_frame_transform(int index, const std::function<struct frame_transform(struct frame_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
+ void apply_transform(int index, const struct frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
+ void apply_transform(int index, const std::function<struct frame_transform(struct frame_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
void clear_transforms(int index);\r
void clear_transforms();\r
\r
transform.clip_scale[1] = delta; \r
return transform;\r
};\r
- self->stage()->apply_frame_transform(index, transform);\r
+ self->stage()->apply_transform(index, transform);\r
}\r
}\r
\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform);\r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform);\r
}\r
else if(_parameters[0] == L"OPACITY")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween);\r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween);\r
}\r
else if(_parameters[0] == L"FILL" || _parameters[0] == L"FILL_RECT")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween);\r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween);\r
}\r
else if(_parameters[0] == L"CLIP" || _parameters[0] == L"CLIP_RECT")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween);\r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween);\r
}\r
else if(_parameters[0] == L"GRID")\r
{\r
transform.clip_scale[1] = delta; \r
return transform;\r
};\r
- GetChannel()->stage()->apply_frame_transform(index, transform, duration, tween);\r
+ GetChannel()->stage()->apply_transform(index, transform, duration, tween);\r
}\r
}\r
}\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween); \r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween); \r
}\r
else if(_parameters[0] == L"SATURATION")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween); \r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween); \r
}\r
else if(_parameters[0] == L"CONTRAST")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween); \r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween); \r
}\r
else if(_parameters[0] == L"LEVELS")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween); \r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween); \r
}\r
else if(_parameters[0] == L"VOLUME")\r
{\r
};\r
\r
int layer = GetLayerIndex();\r
- GetChannel()->stage()->apply_frame_transform(GetLayerIndex(), transform, duration, tween);\r
+ GetChannel()->stage()->apply_transform(GetLayerIndex(), transform, duration, tween);\r
}\r
else if(_parameters[0] == L"CLEAR")\r
{\r