]> git.sesse.net Git - casparcg/blobdiff - core/producer/stage.h
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / core / producer / stage.h
index 95b44ea8576133efa41bfe4c99816ec9b1a6d823..bd8b67e5388ddbafc66b7659a9ad94ec442b3626 100644 (file)
 \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
@@ -39,22 +40,22 @@ namespace caspar { namespace core {
        \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
@@ -64,15 +65,12 @@ public:
        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