From a85e2068f1fc1e6ab31a4dfcb88e6c2e9dcb2e8e Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Sun, 28 Jul 2019 12:57:16 -0400 Subject: [PATCH] When dealing with an automatically configurable video stream, handle the video source automatically as well. --- src/FlightDisplay/VideoManager.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/FlightDisplay/VideoManager.cc b/src/FlightDisplay/VideoManager.cc index bdb10e202..f8259272d 100644 --- a/src/FlightDisplay/VideoManager.cc +++ b/src/FlightDisplay/VideoManager.cc @@ -291,14 +291,20 @@ VideoManager::_updateSettings() qCDebug(VideoManagerLog) << "Configure primary stream: " << pInfo->uri(); switch(pInfo->type()) { case VIDEO_STREAM_TYPE_RTSP: + _videoReceiver->setUri(pInfo->uri()); + _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceRTSP); + break; case VIDEO_STREAM_TYPE_TCP_MPEG: _videoReceiver->setUri(pInfo->uri()); + _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceTCP); break; case VIDEO_STREAM_TYPE_RTPUDP: _videoReceiver->setUri(QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())); + _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDPH264); break; case VIDEO_STREAM_TYPE_MPEG_TS_H264: _videoReceiver->setUri(QStringLiteral("mpegts://0.0.0.0:%1").arg(pInfo->uri())); + _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceMPEGTS); break; default: _videoReceiver->setUri(pInfo->uri()); -- 2.22.0