]> git.sesse.net Git - casparcg/blobdiff - core/producer/frame_producer_device.h
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / core / producer / frame_producer_device.h
index 8a70fafc2494e243f67eda43ae9d3c75dc3b4970..8f5972b5227daa7972478bf1c54357cf028da19b 100644 (file)
@@ -3,13 +3,14 @@
 #include "frame_producer.h"\r
 \r
 #include <common/memory/safe_ptr.h>\r
-#include <common/utility/printable.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 #include <boost/thread/future.hpp>\r
 \r
 #include <functional>\r
 \r
+#include <boost/signals2.hpp>\r
+\r
 namespace caspar { namespace core {\r
 \r
 ////////////////////////////////////////////////////////////////////////////////////////////////////\r
@@ -26,23 +27,22 @@ namespace caspar { namespace core {
 class frame_producer_device : boost::noncopyable\r
 {\r
 public:\r
-       static const int MAX_LAYER = 32;\r
-\r
-       typedef std::function<void(const std::vector<safe_ptr<draw_frame>>&)> output_func;\r
+       typedef boost::signals2::signal<void(const std::vector<safe_ptr<basic_frame>>&)> output_t;\r
+        \r
+       boost::signals2::connection connect(const output_t::slot_type& subscriber);\r
 \r
-       explicit frame_producer_device(const printer& parent_printer, const safe_ptr<frame_factory>& factory, const output_func& output);\r
+       explicit frame_producer_device(const video_format_desc& format_desc);\r
        frame_producer_device(frame_producer_device&& other);\r
+       void swap(frame_producer_device& other);\r
                \r
-       void load(size_t index, const safe_ptr<frame_producer>& producer, bool play_on_load = false);\r
-       void preview(size_t index, const safe_ptr<frame_producer>& producer);\r
-       void pause(size_t index);\r
-       void play(size_t index);\r
-       void stop(size_t index);\r
-       void clear(size_t index);\r
+       void load(int index, const safe_ptr<frame_producer>& producer, bool play_on_load = false, bool preview = false);\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_layer(size_t index, size_t other_index);\r
-       void swap_layer(size_t index, size_t other_index, frame_producer_device& other);\r
-       void swap_output(frame_producer_device& other);\r
+       void swap_layer(int index, size_t other_index);\r
+       void swap_layer(int index, size_t other_index, frame_producer_device& other);\r
        boost::unique_future<safe_ptr<frame_producer>> foreground(size_t index) const;\r
 \r
 private:\r