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