|
|
@ -29,6 +29,7 @@ const char* VideoSettings::recordingFormatName = "RecordingFormat"; |
|
|
|
const char* VideoSettings::maxVideoSizeName = "MaxVideoSize"; |
|
|
|
const char* VideoSettings::maxVideoSizeName = "MaxVideoSize"; |
|
|
|
|
|
|
|
|
|
|
|
const char* VideoSettings::videoSourceNoVideo = "No Video Available"; |
|
|
|
const char* VideoSettings::videoSourceNoVideo = "No Video Available"; |
|
|
|
|
|
|
|
const char* VideoSettings::videoDisabled = "Video Stream Disabled"; |
|
|
|
const char* VideoSettings::videoSourceUDP = "UDP Video Stream"; |
|
|
|
const char* VideoSettings::videoSourceUDP = "UDP Video Stream"; |
|
|
|
const char* VideoSettings::videoSourceRTSP = "RTSP Video Stream"; |
|
|
|
const char* VideoSettings::videoSourceRTSP = "RTSP Video Stream"; |
|
|
|
|
|
|
|
|
|
|
@ -47,6 +48,7 @@ VideoSettings::VideoSettings(QObject* parent) |
|
|
|
qmlRegisterUncreatableType<VideoSettings>("QGroundControl.SettingsManager", 1, 0, "VideoSettings", "Reference only"); |
|
|
|
qmlRegisterUncreatableType<VideoSettings>("QGroundControl.SettingsManager", 1, 0, "VideoSettings", "Reference only"); |
|
|
|
|
|
|
|
|
|
|
|
// Setup enum values for videoSource settings into meta data
|
|
|
|
// Setup enum values for videoSource settings into meta data
|
|
|
|
|
|
|
|
bool noVideo = false; |
|
|
|
QStringList videoSourceList; |
|
|
|
QStringList videoSourceList; |
|
|
|
#ifdef QGC_GST_STREAMING |
|
|
|
#ifdef QGC_GST_STREAMING |
|
|
|
#ifndef NO_UDP_VIDEO |
|
|
|
#ifndef NO_UDP_VIDEO |
|
|
@ -61,7 +63,10 @@ VideoSettings::VideoSettings(QObject* parent) |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if (videoSourceList.count() == 0) { |
|
|
|
if (videoSourceList.count() == 0) { |
|
|
|
|
|
|
|
noVideo = true; |
|
|
|
videoSourceList.append(videoSourceNoVideo); |
|
|
|
videoSourceList.append(videoSourceNoVideo); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
videoSourceList.insert(0, videoDisabled); |
|
|
|
} |
|
|
|
} |
|
|
|
QVariantList videoSourceVarList; |
|
|
|
QVariantList videoSourceVarList; |
|
|
|
foreach (const QString& videoSource, videoSourceList) { |
|
|
|
foreach (const QString& videoSource, videoSourceList) { |
|
|
@ -70,11 +75,11 @@ VideoSettings::VideoSettings(QObject* parent) |
|
|
|
_nameToMetaDataMap[videoSourceName]->setEnumInfo(videoSourceList, videoSourceVarList); |
|
|
|
_nameToMetaDataMap[videoSourceName]->setEnumInfo(videoSourceList, videoSourceVarList); |
|
|
|
|
|
|
|
|
|
|
|
// Set default value for videoSource
|
|
|
|
// Set default value for videoSource
|
|
|
|
#if defined(NO_UDP_VIDEO) |
|
|
|
if (noVideo) { |
|
|
|
_nameToMetaDataMap[videoSourceName]->setRawDefaultValue(videoSourceRTSP); |
|
|
|
_nameToMetaDataMap[videoSourceName]->setRawDefaultValue(videoSourceNoVideo); |
|
|
|
#else |
|
|
|
} else { |
|
|
|
_nameToMetaDataMap[videoSourceName]->setRawDefaultValue(videoSourceUDP); |
|
|
|
_nameToMetaDataMap[videoSourceName]->setRawDefaultValue(videoDisabled); |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Fact* VideoSettings::videoSource(void) |
|
|
|
Fact* VideoSettings::videoSource(void) |
|
|
|