]> git.sesse.net Git - casparcg/blob - core/consumer/port.h
2.1.0: Extracted "port" class.
[casparcg] / core / consumer / port.h
1 #pragma once\r
2 \r
3 #include "../monitor/monitor.h"\r
4 \r
5 #include <common/memory.h>\r
6 \r
7 #include <boost/property_tree/ptree_fwd.hpp>\r
8 \r
9 namespace caspar { namespace core {\r
10 \r
11 class port : public monitor::observable\r
12 {\r
13         port(const port&);\r
14         port& operator=(const port&);\r
15 public:\r
16 \r
17         // Static Members\r
18 \r
19         // Constructors\r
20 \r
21         port(int index, int channel_index, spl::shared_ptr<class frame_consumer> consumer);\r
22         port(port&& other);\r
23         ~port();\r
24 \r
25         // Member Functions\r
26 \r
27         port& operator=(port&& other);\r
28 \r
29         bool send(class const_frame frame);     \r
30 \r
31         // monitor::observable\r
32         \r
33         void subscribe(const monitor::observable::observer_ptr& o) override;\r
34         void unsubscribe(const monitor::observable::observer_ptr& o) override;\r
35 \r
36         // Properties\r
37 \r
38         void video_format_desc(const struct video_format_desc& format_desc);\r
39         int buffer_depth() const;\r
40         bool has_synchronization_clock() const;\r
41         boost::property_tree::wptree info() const;\r
42 private:\r
43         struct impl;\r
44         std::unique_ptr<impl> impl_;\r
45 };\r
46 \r
47 }}