From a18746c2ebf11825dd6fedab77f996a37c787773 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 17 Sep 2021 08:02:33 +0200 Subject: [PATCH] VideoManager: support receiving the stream URI With this change we support receiving the full URI for a UDP video stream such as udp://127.0.0.1:5600. The previous case where only the port number is sent as "URI" is still handled. --- src/VideoManager/VideoManager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/VideoManager/VideoManager.cc b/src/VideoManager/VideoManager.cc index 50b3970..c6bc7a3 100644 --- a/src/VideoManager/VideoManager.cc +++ b/src/VideoManager/VideoManager.cc @@ -640,7 +640,11 @@ VideoManager::_updateSettings(unsigned id) } break; case VIDEO_STREAM_TYPE_RTPUDP: - if ((settingsChanged |= _updateVideoUri(id, QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())))) { + if ((settingsChanged |= _updateVideoUri( + id, + pInfo->uri().contains("udp://") + ? pInfo->uri() // Specced case + : QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())))) { _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDPH264); } break;