From 45d35b02fc9cefd8da929b1d86f1b4c63b5bb3ea Mon Sep 17 00:00:00 2001 From: AndKe Date: Thu, 4 Feb 2021 08:50:05 +0100 Subject: [PATCH] Video: added preset for Yuneec Mantis G --- src/Settings/VideoSettings.cc | 2 ++ src/Settings/VideoSettings.h | 1 + src/VideoManager/VideoManager.cc | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/Settings/VideoSettings.cc b/src/Settings/VideoSettings.cc index 90a2e1b..0c5f44b 100644 --- a/src/Settings/VideoSettings.cc +++ b/src/Settings/VideoSettings.cc @@ -28,6 +28,7 @@ const char* VideoSettings::videoSourceTCP = "TCP-MPEG2 Video Strea const char* VideoSettings::videoSourceMPEGTS = "MPEG-TS (h.264) Video Stream"; const char* VideoSettings::videoSource3DRSolo = "3DR Solo (requires restart)"; const char* VideoSettings::videoSourceParrotDiscovery = "Parrot Discovery"; +const char* VideoSettings::videoSourceYuneecMantisG = "Yuneec Mantis G"; DECLARE_SETTINGGROUP(Video, "Video") { @@ -45,6 +46,7 @@ DECLARE_SETTINGGROUP(Video, "Video") videoSourceList.append(videoSourceMPEGTS); videoSourceList.append(videoSource3DRSolo); videoSourceList.append(videoSourceParrotDiscovery); + videoSourceList.append(videoSourceYuneecMantisG); #endif #ifndef QGC_DISABLE_UVC QList cameras = QCameraInfo::availableCameras(); diff --git a/src/Settings/VideoSettings.h b/src/Settings/VideoSettings.h index a481400..3a2bd5e 100644 --- a/src/Settings/VideoSettings.h +++ b/src/Settings/VideoSettings.h @@ -72,6 +72,7 @@ public: static const char* videoSourceMPEGTS; static const char* videoSource3DRSolo; static const char* videoSourceParrotDiscovery; + static const char* videoSourceYuneecMantisG; signals: void streamConfiguredChanged (bool configured); diff --git a/src/VideoManager/VideoManager.cc b/src/VideoManager/VideoManager.cc index 71c4940..eb66b18 100644 --- a/src/VideoManager/VideoManager.cc +++ b/src/VideoManager/VideoManager.cc @@ -534,6 +534,7 @@ VideoManager::isGStreamer() videoSource == VideoSettings::videoSourceMPEGTS || videoSource == VideoSettings::videoSource3DRSolo || videoSource == VideoSettings::videoSourceParrotDiscovery || + videoSource == VideoSettings::videoSourceYuneecMantisG || autoStreamConfigured(); #else return false; @@ -692,6 +693,8 @@ VideoManager::_updateSettings(unsigned id) settingsChanged |= _updateVideoUri(0, QStringLiteral("udp://0.0.0.0:5600")); else if (source == VideoSettings::videoSourceParrotDiscovery) settingsChanged |= _updateVideoUri(0, QStringLiteral("udp://0.0.0.0:8888")); + else if (source == VideoSettings::videoSourceYuneecMantisG) + settingsChanged |= _updateVideoUri(0, QStringLiteral("rtsp://192.168.42.1:554/live")); return settingsChanged; }