3 #include "consumer/frame_consumer.h"
\r
4 #include "producer/frame_producer.h"
\r
6 #include <common/memory/safe_ptr.h>
\r
8 #include <boost/noncopyable.hpp>
\r
9 #include <boost/thread/future.hpp>
\r
11 namespace caspar { namespace core {
\r
13 ////////////////////////////////////////////////////////////////////////////////////////////////////
\r
18 /// |**********| <- empty frame <- |***********| <- frame format <- |**********|
\r
19 /// PROTOCOL -> | PRODUCER | | MIXER | | CONSUMER | -> DISPLAY DEVICE
\r
20 /// |**********| -> rendered frames -> |***********| -> formatted frame -> |**********|
\r
22 ////////////////////////////////////////////////////////////////////////////////////////////////////
\r
23 class channel : boost::noncopyable
\r
26 explicit channel(const video_format_desc& format_desc);
\r
27 channel(channel&& other);
\r
30 void add(int index, const safe_ptr<frame_consumer>& consumer);
\r
31 void remove(int index);
\r
33 // Layers and Producers
\r
34 void set_video_gain(int index, double value);
\r
35 void set_video_opacity(int index, double value);
\r
37 void set_audio_gain(int index, double value);
\r
39 void load(int index, const safe_ptr<frame_producer>& producer, bool play_on_load = false);
\r
40 void preview(int index, const safe_ptr<frame_producer>& producer);
\r
41 void pause(int index);
\r
42 void play(int index);
\r
43 void stop(int index);
\r
44 void clear(int index);
\r
46 boost::unique_future<safe_ptr<frame_producer>> foreground(int index) const;
\r
47 boost::unique_future<safe_ptr<frame_producer>> background(int index) const;
\r
48 const video_format_desc& get_video_format_desc() const;
\r
51 struct implementation;
\r
52 safe_ptr<implementation> impl_;
\r