\r
#include "frame_producer.h"\r
\r
+#include <common/forward.h>\r
#include <common/memory/safe_ptr.h>\r
-#include <common/concurrency/target.h>\r
-#include <common/diagnostics/graph.h>\r
+#include <common/tweener.h>\r
\r
-#include <boost/noncopyable.hpp>\r
#include <boost/property_tree/ptree_fwd.hpp>\r
-#include <boost/thread/future.hpp>\r
\r
#include <functional>\r
+#include <tuple>\r
+#include <vector>\r
\r
-namespace caspar { namespace core {\r
-\r
-struct video_format_desc;\r
-struct frame_transform;\r
+FORWARD2(caspar, diagnostics, class graph);\r
+FORWARD1(boost, template<typename> class unique_future);\r
\r
-class stage : boost::noncopyable\r
+namespace caspar { namespace core {\r
+ \r
+class stage sealed\r
{\r
-public:\r
- typedef target<std::pair<std::map<int, safe_ptr<basic_frame>>, std::shared_ptr<void>>> target_t;\r
+ stage(const stage&);\r
+ stage& operator=(const stage&);\r
+public: \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
- explicit stage(const safe_ptr<diagnostics::graph>& graph, const safe_ptr<target_t>& target, const video_format_desc& format_desc);\r
- \r
- // stage\r
- \r
- void set_frame_transform(int index, const frame_transform& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void apply_frame_transform(int index, const std::function<frame_transform(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<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 clear(int index);\r
void clear(); \r
void swap_layers(const safe_ptr<stage>& other);\r
- void swap_layer(int index, size_t other_index);\r
- void swap_layer(int index, size_t other_index, const safe_ptr<stage>& other);\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<frame_producer>> foreground(int index);\r
- boost::unique_future<safe_ptr<frame_producer>> background(int index);\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 video_format_desc& format_desc);\r
-\r
private:\r
- struct implementation;\r
- safe_ptr<implementation> impl_;\r
+ struct impl;\r
+ safe_ptr<impl> impl_;\r
};\r
\r
}}
\ No newline at end of file