\r
#include "frame_producer.h"\r
\r
-#include <common/no_copy.h>\r
#include <common/forward.h>\r
#include <common/memory/safe_ptr.h>\r
-#include <common/concurrency/target.h>\r
+#include <common/tweener.h>\r
\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
#include <functional>\r
+#include <tuple>\r
+#include <vector>\r
\r
FORWARD2(caspar, diagnostics, class graph);\r
FORWARD1(boost, template<typename> class unique_future);\r
\r
class stage sealed\r
{\r
- CASPAR_NO_COPY(stage);\r
+ stage(const stage&);\r
+ stage& operator=(const stage&);\r
public: \r
- typedef target<std::pair<std::map<int, safe_ptr<class basic_frame>>, std::shared_ptr<void>>> target_t;\r
+ typedef std::function<struct frame_transform(struct frame_transform)> transform_func_t;\r
+ typedef std::tuple<int, transform_func_t, unsigned int, tweener> transform_tuple_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 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
+ stage();\r
+ \r
+ std::map<int, safe_ptr<class draw_frame>> operator()(const struct video_format_desc& format_desc);\r
+\r
+ void apply_transforms(const std::vector<transform_tuple_t>& transforms);\r
+ void apply_transform(int index, const transform_func_t& transform, unsigned int mix_duration = 0, const tweener& tween = L"linear");\r
void clear_transforms(int index);\r
void clear_transforms();\r
-\r
- void spawn_token();\r
- \r
- void load(int index, const safe_ptr<struct frame_producer>& producer, bool preview = false, int auto_play_delta = -1);\r
+ \r
+ void load(int index, const safe_ptr<struct frame_producer>& producer, int auto_play_delta = -1);\r
void pause(int index);\r
void play(int index);\r
void stop(int index);\r
void swap_layer(int index, int other_index);\r
void swap_layer(int index, int other_index, const safe_ptr<stage>& other);\r
\r
- boost::unique_future<std::wstring> call(int index, bool foreground, const std::wstring& param);\r
boost::unique_future<safe_ptr<struct frame_producer>> foreground(int index);\r
boost::unique_future<safe_ptr<struct frame_producer>> background(int index);\r
\r
boost::unique_future<boost::property_tree::wptree> info() const;\r
- boost::unique_future<boost::property_tree::wptree> info(int layer) const;\r
+ boost::unique_future<boost::property_tree::wptree> info(int index) const;\r
\r
- void set_video_format_desc(const struct video_format_desc& format_desc);\r
-\r
private:\r
struct impl;\r
safe_ptr<impl> impl_;\r