VideoSettings.h 2.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * 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

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

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

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

62 63 64 65 66 67
signals:
    void streamConfiguredChanged    ();

private slots:
    void _configChanged             (QVariant value);

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

private:
    bool _noVideo = false;

74 75 76
};

#endif