-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhyperdeckapi.cpp
More file actions
51 lines (42 loc) · 1.34 KB
/
hyperdeckapi.cpp
File metadata and controls
51 lines (42 loc) · 1.34 KB
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
#include "hyperdeckapi.h"
#include <QJsonDocument>
#include <QJsonObject>
HyperdeckApi::HyperdeckApi(QObject *parent)
: BMBase{parent}
{
m_oac.append(&system);
m_oac.append(&transport);
m_oac.append(&timeline);
m_oac.append(&media);
m_oac.append(&audio);
m_oac.append(&clips);
m_oac.append(&event);
m_oac.append(&externalmedia);
m_oac.append(&input);
m_oac.append(&monitoring);
m_oac.append(&nas);
m_oac.append(&playrange);
m_oac.append(&recordcache);
m_oac.append(&spill);
}
HyperdeckApi::~HyperdeckApi()
{
}
void HyperdeckApi::onSubscribeHandler(QJsonObject jso)
{
qDebug() << "onSubscribeHandler" << jso;
if (jso.contains("/system/product")) {
auto o=jso.value("/system/product").toObject();
m_device=o.value("deviceName").toString();
m_product=o.value("productName").toString();
m_version=o.value("softwareVersion").toString();
}
if (jso.contains("/timelines/0")) {
QVariantList tmp=jso.value("/timelines/0").toObject().value("clips").toArray().toVariantList();
m_clip_model.setItems(tmp);
}
if (jso.contains("/system/supportedVideoFormats")) {
QVariantList tmp=jso.value("/system/supportedVideoFormats").toObject().value("videoFormats").toArray().toVariantList();
qDebug() << "Video formats" << tmp;
}
}