]> git.sesse.net Git - casparcg/blob - core/channel.h
2.0.0.2:
[casparcg] / core / channel.h
1 #pragma once\r
2 \r
3 #include "producer/frame_producer_device.h"\r
4 #include "consumer/frame_consumer_device.h"\r
5 #include "processor/frame_processor_device.h"\r
6 \r
7 #include <boost/noncopyable.hpp>\r
8 \r
9 #include <memory>\r
10 \r
11 namespace caspar { namespace core {\r
12 \r
13 ////////////////////////////////////////////////////////////////////////////////////////////////////\r
14 /// \class      channel\r
15 ///\r
16 /// \brief      Channel. \r
17 ///             \r
18 ///                |**********| <-   empty frame   <- |***********| <-   frame format  <- |**********|\r
19 /// CONTROLLER ->  | PRODUCER |                       | PROCESSOR |                       | CONSUMER |  -> DISPLAY DEVICE\r
20 ///                |**********| -> rendered frames -> |***********| -> processed frame -> |**********|\r
21 ///   \r
22 ////////////////////////////////////////////////////////////////////////////////////////////////////\r
23 class channel : boost::noncopyable\r
24 {\r
25 public:\r
26         channel(const frame_producer_device_ptr& producer_device, const frame_processor_device_ptr& processor_device, const frame_consumer_device_ptr& consumer_device);\r
27         \r
28         void load(int render_layer, const frame_producer_ptr& producer, load_option::type option = load_option::none);\r
29         void pause(int render_layer);\r
30         void play(int render_layer);\r
31         void stop(int render_layer);\r
32         void clear(int render_layer);\r
33         void clear();   \r
34         frame_producer_ptr active(int render_layer) const;\r
35         frame_producer_ptr background(int render_layer) const;\r
36         const video_format_desc get_video_format_desc() const;\r
37 private:\r
38         struct implementation;\r
39         std::shared_ptr<implementation> impl_;\r
40 };\r
41 typedef std::shared_ptr<channel> channel_ptr;\r
42 \r
43 }}