3 #include "frame_producer.h"
\r
5 #include <common/memory/safe_ptr.h>
\r
6 #include <common/utility/printable.h>
\r
8 #include <boost/noncopyable.hpp>
\r
9 #include <boost/thread/future.hpp>
\r
11 #include <functional>
\r
13 namespace caspar { namespace core {
\r
15 ////////////////////////////////////////////////////////////////////////////////////////////////////
\r
16 /// \class frame_producer_device
\r
20 /// |**********| <- empty frame <- |***********| <- frame format <- |**********|
\r
21 /// PROTOCOL -> | PRODUCER | | MIXER | | CONSUMER | -> DISPLAY DEVICE
\r
22 /// |**********| -> rendered frames -> |***********| -> formatted frame -> |**********|
\r
24 ////////////////////////////////////////////////////////////////////////////////////////////////////
\r
26 class frame_producer_device : boost::noncopyable
\r
29 typedef std::function<void(const std::vector<safe_ptr<draw_frame>>&)> output_func;
\r
31 explicit frame_producer_device(const printer& parent_printer, const safe_ptr<frame_factory>& factory, const output_func& output);
\r
32 frame_producer_device(frame_producer_device&& other);
\r
33 void swap(frame_producer_device& other);
\r
35 void load(int index, const safe_ptr<frame_producer>& producer, bool play_on_load = false);
\r
36 void preview(int index, const safe_ptr<frame_producer>& producer);
\r
37 void pause(int index);
\r
38 void play(int index);
\r
39 void stop(int index);
\r
40 void clear(int index);
\r
42 void swap_layer(int index, size_t other_index);
\r
43 void swap_layer(int index, size_t other_index, frame_producer_device& other);
\r
44 boost::unique_future<safe_ptr<frame_producer>> foreground(size_t index) const;
\r
47 struct implementation;
\r
48 safe_ptr<implementation> impl_;
\r