]> git.sesse.net Git - casparcg/blob - core/consumer/port.h
Created a consumer that provides sync to a channel based on the pace of another chann...
[casparcg] / core / consumer / port.h
1 #pragma once
2
3 #include "../monitor/monitor.h"
4 #include "../fwd.h"
5
6 #include <common/memory.h>
7 #include <common/future_fwd.h>
8
9 #include <boost/property_tree/ptree_fwd.hpp>
10
11 namespace caspar { namespace core {
12
13 class port
14 {
15         port(const port&);
16         port& operator=(const port&);
17 public:
18
19         // Static Members
20
21         // Constructors
22
23         port(int index, int channel_index, spl::shared_ptr<frame_consumer> consumer);
24         port(port&& other);
25         ~port();
26
27         // Member Functions
28
29         port& operator=(port&& other);
30
31         std::future<bool> send(const_frame frame);
32
33         monitor::subject& monitor_output();
34
35         // Properties
36
37         void change_channel_format(const video_format_desc& format_desc, const audio_channel_layout& channel_layout);
38         std::wstring print() const;
39         int buffer_depth() const;
40         bool has_synchronization_clock() const;
41         boost::property_tree::wptree info() const;
42         int64_t presentation_frame_age_millis() const;
43         spl::shared_ptr<const frame_consumer> consumer() const;
44 private:
45         struct impl;
46         std::unique_ptr<impl> impl_;
47 };
48
49 }}