Browse Source

Make RTSP UDP timeout into a (protected) variable so derived classes have access to it.

QGC4.4
Gus Grubba 7 years ago
parent
commit
dac81965c8
  1. 3
      src/VideoStreaming/VideoReceiver.cc
  2. 3
      src/VideoStreaming/VideoReceiver.h

3
src/VideoStreaming/VideoReceiver.cc

@ -64,6 +64,7 @@ VideoReceiver::VideoReceiver(QObject* parent) @@ -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() @@ -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<guint64>(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

3
src/VideoStreaming/VideoReceiver.h

@ -138,6 +138,9 @@ protected: @@ -138,6 +138,9 @@ protected:
bool _serverPresent;
int _rtspTestInterval_ms;
//-- RTSP UDP reconnect timeout
uint64_t _udpReconnect_us;
#endif
QString _uri;

Loading…
Cancel
Save