VideoSettings.h 2.26 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 40 41
    Q_PROPERTY(bool     streamConfigured        READ streamConfigured       NOTIFY streamConfiguredChanged)
    Q_PROPERTY(QString  rtspVideoSource         READ rtspVideoSource        CONSTANT)
    Q_PROPERTY(QString  udpVideoSource          READ udpVideoSource         CONSTANT)
    Q_PROPERTY(QString  tcpVideoSource          READ tcpVideoSource         CONSTANT)
42
    Q_PROPERTY(QString  mpegtsVideoSource       READ mpegtsVideoSource      CONSTANT)
43

44 45 46 47
    bool     streamConfigured       ();
    QString  rtspVideoSource        () { return videoSourceRTSP; }
    QString  udpVideoSource         () { return videoSourceUDP; }
    QString  tcpVideoSource         () { return videoSourceTCP; }
48
    QString  mpegtsVideoSource      () { return videoSourceMPEGTS; }
49 50

    static const char* videoSourceNoVideo;
51
    static const char* videoDisabled;
52 53
    static const char* videoSourceUDP;
    static const char* videoSourceRTSP;
54
    static const char* videoSourceTCP;
55
    static const char* videoSourceMPEGTS;
56

57 58 59 60 61 62
signals:
    void streamConfiguredChanged    ();

private slots:
    void _configChanged             (QVariant value);

63
private:
Gus Grubba's avatar
Gus Grubba committed
64 65 66 67 68
    void _setDefaults               ();

private:
    bool _noVideo = false;

69 70 71
};

#endif