VideoSettings.h 2.67 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#ifndef VideoSettings_H
#define VideoSettings_H

#include "SettingsGroup.h"

class VideoSettings : public SettingsGroup
{
    Q_OBJECT
18

19
public:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
    VideoSettings(QObject* parent = nullptr);
    DEFINE_SETTING_NAME_GROUP()

    DEFINE_SETTINGFACT(videoSource)
    DEFINE_SETTINGFACT(udpPort)
    DEFINE_SETTINGFACT(tcpUrl)
    DEFINE_SETTINGFACT(rtspUrl)
    DEFINE_SETTINGFACT(aspectRatio)
    DEFINE_SETTINGFACT(videoFit)
    DEFINE_SETTINGFACT(gridLines)
    DEFINE_SETTINGFACT(showRecControl)
    DEFINE_SETTINGFACT(recordingFormat)
    DEFINE_SETTINGFACT(maxVideoSize)
    DEFINE_SETTINGFACT(enableStorageLimit)
    DEFINE_SETTINGFACT(rtspTimeout)
    DEFINE_SETTINGFACT(streamEnabled)
    DEFINE_SETTINGFACT(disableWhenDisarmed)
37
    DEFINE_SETTINGFACT(lowLatencyMode)
38

39 40
    Q_PROPERTY(bool     streamConfigured        READ streamConfigured       NOTIFY streamConfiguredChanged)
    Q_PROPERTY(QString  rtspVideoSource         READ rtspVideoSource        CONSTANT)
Gus Grubba's avatar
Gus Grubba committed
41 42
    Q_PROPERTY(QString  udp264VideoSource       READ udp264VideoSource      CONSTANT)
    Q_PROPERTY(QString  udp265VideoSource       READ udp265VideoSource      CONSTANT)
43
    Q_PROPERTY(QString  tcpVideoSource          READ tcpVideoSource         CONSTANT)
44
    Q_PROPERTY(QString  mpegtsVideoSource       READ mpegtsVideoSource      CONSTANT)
45
    Q_PROPERTY(QString  disabledVideoSource     READ disabledVideoSource      CONSTANT)
46

47 48
    bool     streamConfigured       ();
    QString  rtspVideoSource        () { return videoSourceRTSP; }
Gus Grubba's avatar
Gus Grubba committed
49 50
    QString  udp264VideoSource      () { return videoSourceUDPH264; }
    QString  udp265VideoSource      () { return videoSourceUDPH265; }
51
    QString  tcpVideoSource         () { return videoSourceTCP; }
52
    QString  mpegtsVideoSource      () { return videoSourceMPEGTS; }
53
    QString  disabledVideoSource    () { return videoDisabled; }
54 55

    static const char* videoSourceNoVideo;
56
    static const char* videoDisabled;
Gus Grubba's avatar
Gus Grubba committed
57 58
    static const char* videoSourceUDPH264;
    static const char* videoSourceUDPH265;
59
    static const char* videoSourceRTSP;
60
    static const char* videoSourceTCP;
61
    static const char* videoSourceMPEGTS;
62

63
signals:
64
    void streamConfiguredChanged    (bool configured);
65 66 67 68

private slots:
    void _configChanged             (QVariant value);

69
private:
Gus Grubba's avatar
Gus Grubba committed
70 71 72 73 74
    void _setDefaults               ();

private:
    bool _noVideo = false;

75 76 77
};

#endif