libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
ntv2routing.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_NTV2
13
14#include <cstdint>
15#include <promeki/enums.h>
16#include <promeki/list.h>
17#include <promeki/namespace.h>
18
19PROMEKI_NAMESPACE_BEGIN
20
59namespace Ntv2Routing {
60
70 struct Connection {
71 uint32_t input;
72 uint32_t output;
73
74 bool operator==(const Connection &o) const {
75 return input == o.input && output == o.output;
76 }
77 bool operator!=(const Connection &o) const { return !(*this == o); }
78 };
79
81 using ConnectionList = ::promeki::List<Connection>;
82
92 struct Config {
94 SdiLinkStandard standard{SdiLinkStandard::Auto};
96 int channelStart = 1;
98 int portStart = 1;
104 bool can12gRouting = false;
107 bool framebufferRgb = false;
112 bool signalRgb = false;
120 bool allowOnBoardCsc = true;
130 ::promeki::List<int> mirrorPortStarts;
131 };
132
165 ConnectionList sdiInputConnections(const SdiLinkStandard &standard, int channel, int startPort,
166 bool can12gRouting, bool framebufferRgb);
167
178 ConnectionList sdiInputConnections(const Config &cfg);
179
189 ConnectionList sdiOutputConnections(const SdiLinkStandard &standard, int channel, int startPort,
190 bool can12gRouting, bool framebufferRgb);
191
197 ConnectionList sdiOutputConnections(const Config &cfg);
198
207 bool needsTsi(const SdiLinkStandard &standard, bool can12gRouting);
208
214 bool needsSquares(const SdiLinkStandard &standard);
215
216} // namespace Ntv2Routing
217
218PROMEKI_NAMESPACE_END
219
220#endif // PROMEKI_ENABLE_NTV2