forked from petersimonsson/libqatemcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qatemconnection.h
574 lines (445 loc) · 22.4 KB
/
qatemconnection.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
/*
Copyright 2012 Peter Simonsson <peter.simonsson@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QATEMCONNECTION_H
#define QATEMCONNECTION_H
#include "qatemtypes.h"
#include "libqatemcontrol_global.h"
#include <QObject>
#include <QUdpSocket>
#include <QColor>
#include <QTime>
#include "qatemdownstreamkey.h"
class QTimer;
class QHostAddress;
class QAtemSubsystemBase;
class QAtemMixEffect;
class QAtemCameraControl;
class QAtemDownstreamKey;
class QAtemFairlight;
class QAtemSuperSource;
class QAtemRecording;
class QAtemStreaming;
class LIBQATEMCONTROLSHARED_EXPORT QAtemConnection : public QObject
{
Q_OBJECT
friend class QAtemSubsystemBase;
friend class QAtemMixEffect;
friend class QAtemCameraControl;
friend class QAtemDownstreamKey;
friend class QAtemFairlight;
friend class QAtemSuperSource;
friend class QAtemRecording;
friend class QAtemStreaming;
Q_PROPERTY(bool connected READ isConnected NOTIFY connectedChanged)
Q_PROPERTY(QTime time READ getTime NOTIFY timeChanged)
Q_PROPERTY(bool timecodeLocked READ getTimecodeLocked NOTIFY timecodeLockedChanged)
Q_PROPERTY(bool macroRunning READ macroRunning NOTIFY macroRunningChanged)
Q_PROPERTY(bool macroRecording READ macroRecording NOTIFY macroRecordingChanged)
Q_PROPERTY(float audioMixerMasterVolume READ audioMasterOutputGain NOTIFY audioMasterOutputGainChanged)
public:
enum Command
{
Cmd_NoCommand = 0x0,
Cmd_AckRequest = 0x1,
Cmd_HelloPacket = 0x2,
Cmd_Resend = 0x4,
Cmd_Undefined = 0x8,
Cmd_Ack = 0x10
};
Q_DECLARE_FLAGS(Commands, Command)
struct CommandHeader
{
quint8 bitmask;
quint16 size;
quint16 uid;
quint16 ackId;
quint16 packetId;
CommandHeader()
{
bitmask = size = uid = ackId = packetId = 0;
}
};
explicit QAtemConnection(QObject* parent = nullptr);
virtual ~QAtemConnection();
QHostAddress address() const { return m_address; }
Q_INVOKABLE QString hostname() const { return m_address.toString(); }
Q_INVOKABLE bool isConnected() const;
/// Connect to ATEM switcher at @p address
void connectToSwitcher(const QHostAddress& address, int connectionTimeout = 1000);
Q_INVOKABLE void connectToSwitcher(const QString address, int connectionTimeout = 1000);
Q_INVOKABLE void disconnectFromSwitcher();
Q_INVOKABLE void setDebugEnabled(bool enabled) { m_debugEnabled = enabled; }
Q_INVOKABLE bool debugEnabled() const { return m_debugEnabled; }
Q_INVOKABLE QTime getTime() const { return m_time; }
Q_INVOKABLE bool getTimecodeLocked() { return m_timecode_locked; }
Q_INVOKABLE void requestTimeCode();
/// @returns the tally state of the input @p index. 1 = program, 2 = preview and 3 = both
Q_INVOKABLE quint8 tallyByIndex(quint8 index) const;
/// @returns number of tally indexes available
Q_INVOKABLE int tallyIndexCount() const { return m_tallyByIndex.count(); }
/// @returns number of tally channels available
Q_INVOKABLE quint16 tallyChannelCount() const { return m_tallyChannelCount; }
Q_INVOKABLE QColor colorGeneratorColor(quint8 generator) const;
Q_INVOKABLE QAtemDownstreamKey *downstreamKey(quint8 id) const;
Q_INVOKABLE QVector<QAtemDownstreamKey*> downstreamKeys() const { return m_downstreamKeys; }
Q_INVOKABLE quint8 mediaPlayerType(quint8 player) const;
Q_INVOKABLE quint8 mediaPlayerSelectedStill(quint8 player) const;
Q_INVOKABLE quint8 mediaPlayerSelectedClip(quint8 player) const;
/// @returns the current state of the media player @p player
QAtem::MediaPlayerState mediaPlayerState(quint8 player) const { return m_mediaPlayerStates.value(player); }
Q_INVOKABLE quint16 auxSource(quint8 aux) const;
Q_INVOKABLE QString productInformation() const { return m_productInformation; }
Q_INVOKABLE quint16 majorVersion() const { return m_majorversion; }
Q_INVOKABLE quint16 minorVersion() const { return m_minorversion; }
/// @returns Info about the input @p index
Q_INVOKABLE QAtem::InputInfo inputInfo(quint16 index) const { return m_inputInfos.value(index); }
Q_INVOKABLE quint16 inputInfoCount () const { return m_inputInfos.count(); }
Q_INVOKABLE QMap<quint16, QAtem::InputInfo> inputInfos () const { return m_inputInfos; }
Q_INVOKABLE QList<quint16> inputInfoIndexes() const { return m_inputInfos.keys(); }
Q_INVOKABLE QAtem::MediaInfo stillMediaInfo(quint8 index) const { return m_stillMediaInfos.value(index); }
Q_INVOKABLE QAtem::MediaInfo clipMediaInfo(quint8 index) const { return m_clipMediaInfos.value(index); }
Q_INVOKABLE QAtem::MediaInfo soundMediaInfo(quint8 index) const { return m_soundMediaInfos.value(index); }
Q_INVOKABLE quint8 multiViewCount() const { return static_cast<quint8>(m_multiViews.count()); }
QAtem::MultiView *multiView(quint8 index) const;
Q_INVOKABLE QMap<quint8, QAtem::VideoMode> availableVideoModes() const { return m_availableVideoModes; }
/// @returns index of the video format in use. 0 = 525i5994, 1 = 625i50, 2 = 525i5994 16:9, 3 = 625i50 16:9, 4 = 720p50, 5 = 720p5994, 6 = 1080i50, 7 = 1080i5994
Q_INVOKABLE quint8 videoFormat() const { return m_videoFormat; }
/// @returns type of video down coversion, 0 = Center cut, 1 = Letterbox, 2 = Anamorphic
Q_INVOKABLE quint8 videoDownConvertType() const { return m_videoDownConvertType; }
/// @returns size of clip 1 in the media pool
Q_INVOKABLE quint16 mediaPoolClip1Size() const { return m_mediaPoolClip1Size; }
/// @returns size of clip 2 in the media pool
Q_INVOKABLE quint16 mediaPoolClip2Size() const { return m_mediaPoolClip2Size; }
/// @returns number of still banks in the media pool
quint8 mediaPoolStillBankCount() const { return m_mediaPoolStillBankCount; }
/// @returns total number of clip banks in the media pool
quint8 mediaPoolClipBankCount() const { return m_mediaPoolClipBankCount; }
/// @returns audio input info for input @p index
QAtem::AudioInput audioInput(quint16 index) { return m_audioInputs.value(index); }
QHash<quint16, QAtem::AudioInput> audioInputs() { return m_audioInputs; }
/// @return audio tally state for audio input @p index
Q_INVOKABLE bool audioTallyState(quint16 index) { return m_audioTally.value(index); }
/// @returns true if the monitor function is enabled on the audio breakout cable.
Q_INVOKABLE bool audioMonitorEnabled() const { return m_audioMonitorEnabled; }
Q_INVOKABLE float audioMonitorGain() const { return m_audioMonitorGain; }
Q_INVOKABLE bool audioMonitorMuted() const { return m_audioMonitorMuted; }
Q_INVOKABLE bool audioMonitorDimmed() const { return m_audioMonitorDimmed; }
/// @returns the audio channel that is solo on monitor out. -1 = None.
Q_INVOKABLE qint8 audioMonitorSolo() const { return m_audioMonitorSolo; }
Q_INVOKABLE float audioMonitorLevel() const { return m_audioMonitorLevel; }
Q_INVOKABLE float audioMasterOutputGain() const { return m_audioMasterOutputGain; }
Q_INVOKABLE QAtem::AudioLevel audioLevel(quint16 index) const { return m_audioLevels.value(index); }
Q_INVOKABLE float audioMasterOutputLevelLeft() const { return m_audioMasterOutputLevelLeft;}
Q_INVOKABLE float audioMasterOutputLevelRight() const { return m_audioMasterOutputLevelRight;}
Q_INVOKABLE float audioMasterOutputPeakLeft() const { return m_audioMasterOutputPeakLeft; }
Q_INVOKABLE float audioMasterOutputPeakRight() const { return m_audioMasterOutputPeakRight; }
Q_INVOKABLE quint8 audioChannelCount() const { return m_audioChannelCount; }
Q_INVOKABLE bool hasAudioMonitor() const { return m_hasAudioMonitor; }
/// Aquire the media pool lock with ID @p id. @returns false if the lock is already locked.
Q_INVOKABLE bool aquireMediaLock(quint8 id, quint8 index);
/// Unlock the media pool lock with ID @p id.
Q_INVOKABLE void unlockMediaLock(quint8 id);
/// @returns the state of the media pool lock with ID @p id.
Q_INVOKABLE bool mediaLockState(quint8 id) const { return m_mediaLocks.value(id); }
Q_INVOKABLE void aquireLock(quint8 storeId);
/**
* @brief Send data to a store in the switcher.
* @param storeId 0 = Still store, 1 = Clip store, 2 = Sound store, 3 = Multiview labels, 255 = Macros
* @param index Index in the store
* @param name Name shown to the user
* @param data Actual pixel or sound data
* @return Returns the ID of the data transfer if success else 0
*/
quint16 sendDataToSwitcher(quint8 storeId, quint8 index, const QByteArray &name, const QByteArray &data);
Q_INVOKABLE bool transferActive() const { return m_transferActive; }
Q_INVOKABLE quint16 transferId () const { return m_transferId; }
Q_INVOKABLE int remainingTransferDataSize() const { return m_transferData.size(); }
Q_INVOKABLE quint16 getDataFromSwitcher(quint8 storeId, quint8 index);
QByteArray transferData() const { return m_transferData; }
/**
* Convert @p image to a QByteArray suitable for sending to the switcher.
* @param image The image to convert
* @param width Width of the frame the image will be converted to
* @param height Height of the frame the image will be converted to
*/
static QByteArray prepImageForSwitcher(QImage &image, const int width, const int height);
Q_INVOKABLE QAtem::Topology topology() const { return m_topology; }
Q_INVOKABLE QAtemMixEffect *mixEffect(quint8 me) const;
void registerCommand(const QByteArray &command, QObject *object, const QByteArray &slot);
void unregisterCommand(const QByteArray &command, QObject *object);
/// @returns the power status as a bitmask. Bit 0: Main power on/off, 1: Backup power on/off
Q_INVOKABLE quint8 powerStatus() const { return m_powerStatus; }
QAtemCameraControl *cameraControl() const { return m_cameraControl; }
Q_INVOKABLE QAtem::MacroInfo macroInfo(quint8 index) const { return m_macroInfos.at(index); }
Q_INVOKABLE QVector<QAtem::MacroInfo> macroInfos () const { return m_macroInfos; }
Q_INVOKABLE QAtem::MacroRunningState macroRunningState() const { return m_macroRunningState; }
Q_INVOKABLE bool macroRepeating() const { return m_macroRepeating; }
Q_INVOKABLE quint8 runningMacro() const { return m_runningMacro; }
Q_INVOKABLE bool macroRecording() const { return m_macroRecording; }
Q_INVOKABLE quint8 recordingMacro() const { return m_recordingMacro; }
Q_INVOKABLE bool macroRunning() const { return m_macroRunningState!=QAtem::MacroStoped; }
public slots:
void saveSettings();
void clearSettings();
void setColorGeneratorColor(quint8 generator, const QColor& color);
void setMediaPlayerSource(quint8 player, bool clip, quint8 source);
void setMediaPlayerLoop(quint8 player, bool loop);
void setMediaPlayerPlay(quint8 player, bool play);
void mediaPlayerGoToBeginning(quint8 player);
void mediaPlayerGoFrameBackward(quint8 player);
void mediaPlayerGoFrameForward(quint8 player);
void setAuxSource(quint8 aux, quint16 source);
/**
* Set the type of input to use. 1 = SDI, 2 = HMDI, 4 = Component.
* On TVS input 3 and 4 are selectable between HDMI and SDI.
* On 1 M/E input 1 is selectable between HDMI and component.
*/
void setInputType(quint16 input, quint8 type);
void setInputLongName(quint16 input, const QString& name);
void setInputShortName(quint16 input, const QString& name);
void setVideoFormat(quint8 format);
/// Set type of video down conversion to @p type. 0 = Center cut, 1 = Letterbox, 2 = Anamorphic
void setVideoDownConvertType(quint8 type);
/// Sets the size of media pool clip 1 to @p size, max is mediaPoolClipBankCount(). Clip 2 size will be mediaPoolClipBankCount() - @p size.
void setMediaPoolClipSplit(quint16 size);
/// Sets the layout of multi viewer @p multiView to @p layout.
void setMultiViewLayout(quint8 multiView, quint8 layout);
void setMultiViewInput(quint8 multiView, quint8 windowIndex, quint16 source);
/// Set to true if you want audio data from the mixer
void setAudioLevelsEnabled(bool enabled);
/// Set the state of the audio input. 0 = Off, 1 = On, 2 = AFV
void setAudioInputState(quint16 index, quint8 state);
/// Set the balance of the audio input. @p balance is a value between -1.0 and +1.0.
void setAudioInputBalance(quint16 index, float balance);
/// Set the gain of the audio input @p index. @p left and @p right is between +6dB and -60dB (-infdB)
void setAudioInputGain(quint16 index, float gain);
/// Set the gain of the audio master output. @p left and @p right is between +6dB and -60dB (-infdB)
void setAudioMasterOutputGain(float gain);
/// Enables audio monitoring using the breakout cable.
void setAudioMonitorEnabled(bool enabled);
/// Set the gain of the audio monitor output. @p gain is between +6dB and -60dB (-infdB)
void setAudioMonitorGain(float gain);
void setAudioMonitorMuted(bool muted);
void setAudioMonitorDimmed(bool dimmed);
void setAudioMonitorSolo(qint8 solo);
void resetAudioMasterOutputPeaks();
void resetAudioInputPeaks(quint16 input);
void runMacro(quint8 macroIndex);
void setMacroRepeating(bool state);
void startRecordingMacro(quint8 macroIndex, const QByteArray &name, const QByteArray &description);
void stopRecordingMacro();
void addMacroUserWait();
void addMacroPause(quint32 frames);
void setMacroName(quint8 macroIndex, const QByteArray &name);
void setMacroDescription(quint8 macroIndex, const QByteArray &description);
void removeMacro(quint8 macroIndex);
void continueMacro();
void stopMacro();
protected slots:
void handleSocketData();
void handleError(QAbstractSocket::SocketError);
void handleConnectionTimeout();
void emitConnectedSignal();
void onTlIn(const QByteArray& payload);
void onColV(const QByteArray& payload);
void onMPCE(const QByteArray& payload);
void onAuxS(const QByteArray& payload);
void on_pin(const QByteArray& payload);
void on_ver(const QByteArray& payload);
void onInPr(const QByteArray& payload);
void onMPSE(const QByteArray& payload);
void onMPfe(const QByteArray& payload);
void onMPCS(const QByteArray& payload);
void onMvIn(const QByteArray& payload);
void onMvPr(const QByteArray& payload);
void onVidM(const QByteArray& payload);
void onTime(const QByteArray& payload);
void onDcOt(const QByteArray& payload);
void onAMmO(const QByteArray& payload);
void onMPSp(const QByteArray& payload);
void onRCPS(const QByteArray& payload);
void onAMLv(const QByteArray& payload);
void onAMTl(const QByteArray& payload);
void onAMIP(const QByteArray& payload);
void onAMMO(const QByteArray& payload);
void onLKST(const QByteArray& payload);
void onFTCD(const QByteArray& payload);
void onFTDC(const QByteArray& payload);
void on_top(const QByteArray& payload);
void onPowr(const QByteArray& payload);
void onVMC(const QByteArray& payload);
void onWarn(const QByteArray& payload);
void on_mpl(const QByteArray& payload);
void on_TlC(const QByteArray& payload);
void onTlSr(const QByteArray& payload);
void on_AMC(const QByteArray& payload);
void onMPAS(const QByteArray& payload);
void onMPfM(const QByteArray& payload);
void onAuxP(const QByteArray& payload);
void onMPrp(const QByteArray& payload);
void onMRPr(const QByteArray& payload);
void onMRcS(const QByteArray& payload);
void on_MAC(const QByteArray& payload);
void onFTDa(const QByteArray& payload);
void onFTDE(const QByteArray& payload);
void onLKOB(const QByteArray& payload);
void onTcLK(const QByteArray& payload);
void onTCCc(const QByteArray &payload);
void onDSTV(const QByteArray &payload);
void onDCPV(const QByteArray &payload);
void initDownloadToSwitcher();
void flushTransferBuffer(quint8 count);
void acceptData();
protected:
QByteArray createCommandHeader(Commands bitmask, quint16 payloadSize, quint16 uid, quint16 ackId);
QAtemConnection::CommandHeader parseCommandHeader(const QByteArray& datagram) const;
void parsePayLoad(const QByteArray& datagram);
bool sendDatagram(const QByteArray& datagram);
bool sendCommand(const QByteArray& cmd, const QByteArray &payload);
void initCommandSlotHash();
void sendData(quint16 id, const QByteArray &data);
void sendFileDescription();
void requestData();
static float convertToDecibel(quint16 level);
static quint16 convertFromDecibel(float level);
void setInitialized(bool state);
private:
struct ObjectSlot
{
ObjectSlot(QObject *o, const QByteArray &s) : object(o), slot(s) {}
inline bool operator ==(const ObjectSlot &b) const
{
return (b.object == object && b.slot == slot);
}
QObject *object;
QByteArray slot;
};
QUdpSocket* m_socket;
QTimer* m_connectionTimer;
QHostAddress m_address;
quint16 m_port;
quint16 m_packetCounter;
bool m_isInitialized;
quint16 m_currentUid;
QMultiHash<QByteArray, ObjectSlot> m_commandSlotHash;
bool m_debugEnabled;
QVector<QAtemMixEffect*> m_mixEffects;
QVector<quint8> m_tallyByIndex;
quint16 m_tallyChannelCount;
QVector<QAtemDownstreamKey*> m_downstreamKeys;
QHash<quint8, QColor> m_colorGeneratorColors;
QHash<quint8, quint8> m_mediaPlayerType;
QHash<quint8, quint8> m_mediaPlayerSelectedStill;
QHash<quint8, quint8> m_mediaPlayerSelectedClip;
QHash<quint8, QAtem::MediaPlayerState> m_mediaPlayerStates;
QHash<quint8, quint16> m_auxSource;
QString m_productInformation;
quint16 m_majorversion;
quint16 m_minorversion;
QMap<quint16, QAtem::InputInfo> m_inputInfos;
QHash<quint8, QAtem::MediaInfo> m_stillMediaInfos;
QHash<quint8, QAtem::MediaInfo> m_clipMediaInfos;
QHash<quint8, QAtem::MediaInfo> m_soundMediaInfos;
QVector<QAtem::MultiView*> m_multiViews;
quint8 m_videoFormat;
quint8 m_videoDownConvertType;
quint16 m_mediaPoolClip1Size;
quint16 m_mediaPoolClip2Size;
quint8 m_mediaPoolStillBankCount;
quint8 m_mediaPoolClipBankCount;
QHash<quint16, QAtem::AudioInput> m_audioInputs;
QHash<quint16, bool> m_audioTally;
QHash<quint16, QAtem::AudioLevel> m_audioLevels;
bool m_audioMonitorEnabled;
float m_audioMonitorGain;
bool m_audioMonitorDimmed;
bool m_audioMonitorMuted;
qint8 m_audioMonitorSolo;
float m_audioMonitorLevel;
float m_audioMasterOutputLevelLeft;
float m_audioMasterOutputLevelRight;
float m_audioMasterOutputPeakLeft;
float m_audioMasterOutputPeakRight;
float m_audioMasterOutputGain;
quint8 m_audioChannelCount;
bool m_hasAudioMonitor;
QHash<quint8, bool> m_mediaLocks;
bool m_transferActive;
QByteArray m_transferData;
quint8 m_transferStoreId;
quint8 m_transferIndex;
QByteArray m_transferName;
quint16 m_transferId;
quint16 m_lastTransferId;
QByteArray m_transferHash;
QAtem::Topology m_topology;
quint8 m_powerStatus;
bool m_timecode_locked;
QAtem::TimeCodeMode m_timecode_mode;
QTime m_time;
QMap<quint8, QAtem::VideoMode> m_availableVideoModes;
QAtemCameraControl *m_cameraControl;
QVector<QAtem::MacroInfo> m_macroInfos;
QAtem::MacroRunningState m_macroRunningState;
bool m_macroRepeating=false;
quint8 m_runningMacro;
bool m_macroRecording=false;
quint8 m_recordingMacro=false;
signals:
void connected();
void connectedChanged();
void disconnected();
void socketError(const QString& errorString);
void switcherWarning(const QString &warningString);
void tallyStatesChanged();
void colorGeneratorColorChanged(quint8 generator, const QColor& color);
void mediaPlayerChanged(quint8 player, quint8 type, quint8 still, quint8 clip);
void mediaPlayerStateChanged(quint8 player, const QAtem::MediaPlayerState& state);
void auxSourceChanged(quint8 aux, quint16 source);
void inputInfoChanged(const QAtem::InputInfo& info);
void mediaInfoChanged(const QAtem::MediaInfo& info);
void productInformationChanged(const QString& info);
void versionChanged(quint16 major, quint16 minor);
void timeChanged(QTime time, quint8 frame);
void timecodeLockedChanged(bool locked);
void timecodeModeChanged(QAtem::TimeCodeMode mode);
void videoFormatChanged(quint8 format);
void videoDownConvertTypeChanged(quint8 type);
void mediaPoolClip1SizeChanged(quint16 size);
void mediaPoolClip2SizeChanged(quint16 size);
void audioInputChanged(quint8 index, const QAtem::AudioInput& input);
void audioMonitorEnabledChanged(bool enabled);
void audioMonitorGainChanged(float gain);
void audioMonitorMutedChanged(bool muted);
void audioMonitorDimmedChanged(bool dimmed);
void audioMonitorSoloChanged(qint8 solo);
void audioMasterOutputGainChanged(float gain);
void audioMasterLevelsChanged(float left, float right, float peak_left, float peak_right);
void audioMonitorLevelChanged(float level);
void audioLevelsChanged(int sources);
void mediaLockStateChanged(quint8 id, bool state);
void getLockStateChanged(quint8 storeId, bool state);
void dataTransferFinished(quint16 transferId);
void topologyChanged(const QAtem::Topology &topology);
void powerStatusChanged(quint8 status);
void multiViewLayoutChanged(quint8 multiView, quint8 layout);
void multiViewInputsChanged(quint8 multiView);
void macroInfoChanged(quint8 index, const QAtem::MacroInfo &info);
void macroRunningStateChanged(QAtem::MacroRunningState running, bool repeating, quint8 macroIndex);
void macroRecordingStateChanged(bool recording, quint8 macroIndex);
void macroRunningChanged();
void macroRecordingChanged();
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QAtemConnection::Commands)
#endif //QATEMCONNECTION_H