18 Q_PROPERTY(QString uri READ uri NOTIFY infoChanged)
19 Q_PROPERTY(QString name READ name NOTIFY infoChanged)
20 Q_PROPERTY(quint8 streamID READ streamID NOTIFY infoChanged)
21 Q_PROPERTY(quint8 type READ type NOTIFY infoChanged)
22 Q_PROPERTY(qreal aspectRatio READ aspectRatio NOTIFY infoChanged)
23 Q_PROPERTY(quint16 hfov READ hfov NOTIFY infoChanged)
24 Q_PROPERTY(
bool isThermal READ isThermal NOTIFY infoChanged)
25 Q_PROPERTY(
bool isActive READ isActive NOTIFY infoChanged)
26 Q_PROPERTY(QSize resolution READ resolution NOTIFY infoChanged)
27 Q_PROPERTY(quint8 encoding READ encoding NOTIFY infoChanged)
28 Q_PROPERTY(quint16 rotation READ rotation NOTIFY infoChanged)
29 Q_PROPERTY(quint32 bitrate READ bitrate NOTIFY infoChanged)
30 Q_PROPERTY(qreal framerate READ framerate NOTIFY infoChanged)
31 Q_ENUM(VIDEO_STREAM_TYPE)
32 Q_ENUM(VIDEO_STREAM_ENCODING)
33 Q_FLAGS(QVIDEO_STREAM_STATUS_FLAGS)
36 explicit QGCVideoStreamInfo(
const mavlink_video_stream_information_t &info, QObject *parent =
nullptr);
39 Q_DECLARE_FLAGS(QVIDEO_STREAM_STATUS_FLAGS, VIDEO_STREAM_STATUS_FLAGS)
41 QString uri()
const {
return QString(_streamInfo.uri); }
42 QString name()
const {
return QString(_streamInfo.name); }
43 qreal aspectRatio()
const;
44 quint16 hfov()
const {
return _streamInfo.hfov; }
45 quint8 type()
const {
return _streamInfo.type; }
46 quint8 streamID()
const {
return _streamInfo.stream_id; }
47 quint8 encoding()
const {
return _streamInfo.encoding; }
48 bool isThermal()
const {
return (_streamInfo.flags & VIDEO_STREAM_STATUS_FLAGS_THERMAL); }
49 QSize resolution()
const {
return QSize(_streamInfo.resolution_h, _streamInfo.resolution_v); }
50 quint16 rotation()
const {
return _streamInfo.rotation; }
51 bool isActive()
const {
return (_streamInfo.flags & VIDEO_STREAM_STATUS_FLAGS_RUNNING); }
52 uint32_t bitrate()
const {
return _streamInfo.bitrate; }
53 qreal framerate()
const {
return _streamInfo.framerate; }
55 bool update(
const mavlink_video_stream_status_t &info);
61 mavlink_video_stream_information_t _streamInfo{};