#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
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