diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index 0c0cef49db023966401dbfa5f97168b8755aebdb..296d012dc5f67f3ccebe39346df0234aba51534b 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -64,6 +64,7 @@ VideoReceiver::VideoReceiver(QObject* parent) , _socket(nullptr) , _serverPresent(false) , _rtspTestInterval_ms(5000) + , _udpReconnect_us(5000000) #endif , _videoSurface(nullptr) , _videoRunning(false) @@ -287,7 +288,7 @@ VideoReceiver::start() QUrl url(_uri); g_object_set(G_OBJECT(dataSource), "host", qPrintable(url.host()), "port", url.port(), nullptr ); } else { - g_object_set(G_OBJECT(dataSource), "location", qPrintable(_uri), "latency", 17, "udp-reconnect", 1, "timeout", static_cast(5000000), NULL); + g_object_set(G_OBJECT(dataSource), "location", qPrintable(_uri), "latency", 17, "udp-reconnect", 1, "timeout", _udpReconnect_us, NULL); } // Currently, we expect H264 when using anything except for TCP. Long term we may want this to be settable diff --git a/src/VideoStreaming/VideoReceiver.h b/src/VideoStreaming/VideoReceiver.h index ea2c502046e379901c8b502b742aa6b09920e12a..04e344e09326bc48c5eacab3748ed4c5540cc46f 100644 --- a/src/VideoStreaming/VideoReceiver.h +++ b/src/VideoStreaming/VideoReceiver.h @@ -138,6 +138,9 @@ protected: bool _serverPresent; int _rtspTestInterval_ms; + //-- RTSP UDP reconnect timeout + uint64_t _udpReconnect_us; + #endif QString _uri;