Commit 7e2c88bd authored by Matej Frančeškin's avatar Matej Frančeškin Committed by Matej Frančeškin

Configure Video Stream: Allow video stream restart and reconnect after changing video encoding.

parent b41a6b9a
/**************************************************************************** /****************************************************************************
* *
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
* *
* QGroundControl is licensed according to the terms in the file * QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory. * COPYING.md in the root of the source code directory.
...@@ -206,28 +206,28 @@ VideoManager::_videoSourceChanged() ...@@ -206,28 +206,28 @@ VideoManager::_videoSourceChanged()
emit hasVideoChanged(); emit hasVideoChanged();
emit isGStreamerChanged(); emit isGStreamerChanged();
emit isAutoStreamChanged(); emit isAutoStreamChanged();
_restartVideo(); restartVideo();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
VideoManager::_udpPortChanged() VideoManager::_udpPortChanged()
{ {
_restartVideo(); restartVideo();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
VideoManager::_rtspUrlChanged() VideoManager::_rtspUrlChanged()
{ {
_restartVideo(); restartVideo();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
VideoManager::_tcpUrlChanged() VideoManager::_tcpUrlChanged()
{ {
_restartVideo(); restartVideo();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -275,7 +275,14 @@ VideoManager::_updateSettings() ...@@ -275,7 +275,14 @@ VideoManager::_updateSettings()
return; return;
//-- Auto discovery //-- Auto discovery
if(_activeVehicle && _activeVehicle->dynamicCameras()) { if(_activeVehicle && _activeVehicle->dynamicCameras()) {
QGCVideoStreamInfo* pInfo = _activeVehicle->dynamicCameras()->currentStreamInstance(); QGCCameraControl* pCamera = _activeVehicle->dynamicCameras()->currentCameraInstance();
if(pCamera) {
Fact *fact = pCamera->videoEncoding();
if (fact) {
_videoReceiver->setVideoDecoder(static_cast<VideoReceiver::VideoEncoding>(fact->rawValue().toInt()));
}
}
QGCVideoStreamInfo* pInfo = _activeVehicle->dynamicCameras()->currentStreamInstance();
if(pInfo) { if(pInfo) {
qCDebug(VideoManagerLog) << "Configure primary stream: " << pInfo->uri(); qCDebug(VideoManagerLog) << "Configure primary stream: " << pInfo->uri();
switch(pInfo->type()) { switch(pInfo->type()) {
...@@ -329,7 +336,7 @@ VideoManager::_updateSettings() ...@@ -329,7 +336,7 @@ VideoManager::_updateSettings()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
VideoManager::_restartVideo() VideoManager::restartVideo()
{ {
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
qCDebug(VideoManagerLog) << "Restart video streaming"; qCDebug(VideoManagerLog) << "Restart video streaming";
...@@ -350,13 +357,13 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle) ...@@ -350,13 +357,13 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle)
if(pCamera) { if(pCamera) {
pCamera->stopStream(); pCamera->stopStream();
} }
disconnect(_activeVehicle->dynamicCameras(), &QGCCameraManager::streamChanged, this, &VideoManager::_restartVideo); disconnect(_activeVehicle->dynamicCameras(), &QGCCameraManager::streamChanged, this, &VideoManager::restartVideo);
} }
} }
_activeVehicle = vehicle; _activeVehicle = vehicle;
if(_activeVehicle) { if(_activeVehicle) {
if(_activeVehicle->dynamicCameras()) { if(_activeVehicle->dynamicCameras()) {
connect(_activeVehicle->dynamicCameras(), &QGCCameraManager::streamChanged, this, &VideoManager::_restartVideo); connect(_activeVehicle->dynamicCameras(), &QGCCameraManager::streamChanged, this, &VideoManager::restartVideo);
QGCCameraControl* pCamera = _activeVehicle->dynamicCameras()->currentCameraInstance(); QGCCameraControl* pCamera = _activeVehicle->dynamicCameras()->currentCameraInstance();
if(pCamera) { if(pCamera) {
pCamera->resumeStream(); pCamera->resumeStream();
...@@ -364,7 +371,7 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle) ...@@ -364,7 +371,7 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle)
} }
} }
emit autoStreamConfiguredChanged(); emit autoStreamConfiguredChanged();
_restartVideo(); restartVideo();
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
......
/**************************************************************************** /****************************************************************************
* *
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
* *
* QGroundControl is licensed according to the terms in the file * QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory. * COPYING.md in the root of the source code directory.
...@@ -62,6 +62,7 @@ public: ...@@ -62,6 +62,7 @@ public:
double thermalHfov (); double thermalHfov ();
bool autoStreamConfigured(); bool autoStreamConfigured();
bool hasThermal (); bool hasThermal ();
void restartVideo ();
VideoReceiver* videoReceiver () { return _videoReceiver; } VideoReceiver* videoReceiver () { return _videoReceiver; }
VideoReceiver* thermalVideoReceiver () { return _thermalVideoReceiver; } VideoReceiver* thermalVideoReceiver () { return _thermalVideoReceiver; }
...@@ -99,7 +100,6 @@ private slots: ...@@ -99,7 +100,6 @@ private slots:
void _updateUVC (); void _updateUVC ();
void _setActiveVehicle (Vehicle* vehicle); void _setActiveVehicle (Vehicle* vehicle);
void _aspectRatioChanged (); void _aspectRatioChanged ();
void _restartVideo ();
private: private:
void _updateSettings (); void _updateSettings ();
......
/**************************************************************************** /****************************************************************************
* *
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
* *
* QGroundControl is licensed according to the terms in the file * QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory. * COPYING.md in the root of the source code directory.
...@@ -58,14 +58,13 @@ VideoReceiver::VideoReceiver(QObject* parent) ...@@ -58,14 +58,13 @@ VideoReceiver::VideoReceiver(QObject* parent)
, _streaming(false) , _streaming(false)
, _starting(false) , _starting(false)
, _stopping(false) , _stopping(false)
, _stop(true)
, _sink(nullptr) , _sink(nullptr)
, _tee(nullptr) , _tee(nullptr)
, _pipeline(nullptr) , _pipeline(nullptr)
, _pipelineStopRec(nullptr) , _pipelineStopRec(nullptr)
, _videoSink(nullptr) , _videoSink(nullptr)
, _socket(nullptr) , _restart_time_ms(1389)
, _serverPresent(false)
, _rtspTestInterval_ms(5000)
, _udpReconnect_us(5000000) , _udpReconnect_us(5000000)
#endif #endif
, _videoSurface(nullptr) , _videoSurface(nullptr)
...@@ -74,11 +73,12 @@ VideoReceiver::VideoReceiver(QObject* parent) ...@@ -74,11 +73,12 @@ VideoReceiver::VideoReceiver(QObject* parent)
, _videoSettings(nullptr) , _videoSettings(nullptr)
{ {
_videoSurface = new VideoSurface; _videoSurface = new VideoSurface;
_videoSettings = qgcApp()->toolbox()->settingsManager()->videoSettings(); _videoSettings = qgcApp()->toolbox()->settingsManager()->videoSettings();
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
setVideoDecoder(H264_SW);
_setVideoSink(_videoSurface->videoSink()); _setVideoSink(_videoSurface->videoSink());
_timer.setSingleShot(true); _restart_timer.setSingleShot(true);
connect(&_timer, &QTimer::timeout, this, &VideoReceiver::_timeout); connect(&_restart_timer, &QTimer::timeout, this, &VideoReceiver::_restart_timeout);
connect(this, &VideoReceiver::msgErrorReceived, this, &VideoReceiver::_handleError); connect(this, &VideoReceiver::msgErrorReceived, this, &VideoReceiver::_handleError);
connect(this, &VideoReceiver::msgEOSReceived, this, &VideoReceiver::_handleEOS); connect(this, &VideoReceiver::msgEOSReceived, this, &VideoReceiver::_handleEOS);
connect(this, &VideoReceiver::msgStateChangedReceived, this, &VideoReceiver::_handleStateChanged); connect(this, &VideoReceiver::msgStateChangedReceived, this, &VideoReceiver::_handleStateChanged);
...@@ -91,9 +91,6 @@ VideoReceiver::~VideoReceiver() ...@@ -91,9 +91,6 @@ VideoReceiver::~VideoReceiver()
{ {
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
stop(); stop();
if(_socket) {
delete _socket;
}
if (_videoSink) { if (_videoSink) {
gst_object_unref(_videoSink); gst_object_unref(_videoSink);
} }
...@@ -130,8 +127,7 @@ VideoReceiver::grabImage(QString imageFile) ...@@ -130,8 +127,7 @@ VideoReceiver::grabImage(QString imageFile)
static void static void
newPadCB(GstElement* element, GstPad* pad, gpointer data) newPadCB(GstElement* element, GstPad* pad, gpointer data)
{ {
gchar* name; gchar* name = gst_pad_get_name(pad);
name = gst_pad_get_name(pad);
//g_print("A new pad %s was created\n", name); //g_print("A new pad %s was created\n", name);
GstCaps* p_caps = gst_pad_get_pad_template_caps (pad); GstCaps* p_caps = gst_pad_get_pad_template_caps (pad);
gchar* description = gst_caps_to_string(p_caps); gchar* description = gst_caps_to_string(p_caps);
...@@ -145,67 +141,11 @@ newPadCB(GstElement* element, GstPad* pad, gpointer data) ...@@ -145,67 +141,11 @@ newPadCB(GstElement* element, GstPad* pad, gpointer data)
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if defined(QGC_GST_STREAMING)
void void
VideoReceiver::_connected() VideoReceiver::_restart_timeout()
{ {
//-- Server showed up. Now we start the stream. qgcApp()->toolbox()->videoManager()->restartVideo();
_timer.stop();
_socket->deleteLater();
_socket = nullptr;
if(_videoSettings->streamEnabled()->rawValue().toBool()) {
_serverPresent = true;
start();
}
} }
#endif
//-----------------------------------------------------------------------------
#if defined(QGC_GST_STREAMING)
void
VideoReceiver::_socketError(QAbstractSocket::SocketError socketError)
{
Q_UNUSED(socketError);
_socket->deleteLater();
_socket = nullptr;
//-- Try again in a while
if(_videoSettings->streamEnabled()->rawValue().toBool()) {
_timer.start(_rtspTestInterval_ms);
}
}
#endif
//-----------------------------------------------------------------------------
#if defined(QGC_GST_STREAMING)
void
VideoReceiver::_timeout()
{
//-- If socket is live, we got no connection nor a socket error
if(_socket) {
delete _socket;
_socket = nullptr;
}
if(_videoSettings->streamEnabled()->rawValue().toBool()) {
//-- RTSP will try to connect to the server. If it cannot connect,
// it will simply give up and never try again. Instead, we keep
// attempting a connection on this timer. Once a connection is
// found to be working, only then we actually start the stream.
QUrl url(_uri);
//-- If RTSP and no port is defined, set default RTSP port (554)
if(_uri.contains("rtsp://") && url.port() <= 0) {
url.setPort(554);
}
_socket = new QTcpSocket;
QNetworkProxy tempProxy;
tempProxy.setType(QNetworkProxy::DefaultProxy);
_socket->setProxy(tempProxy);
connect(_socket, static_cast<void (QTcpSocket::*)(QAbstractSocket::SocketError)>(&QTcpSocket::error), this, &VideoReceiver::_socketError);
connect(_socket, &QTcpSocket::connected, this, &VideoReceiver::_connected);
_socket->connectToHost(url.host(), static_cast<uint16_t>(url.port()));
_timer.start(_rtspTestInterval_ms);
}
}
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// When we finish our pipeline will look like this: // When we finish our pipeline will look like this:
...@@ -213,14 +153,12 @@ VideoReceiver::_timeout() ...@@ -213,14 +153,12 @@ VideoReceiver::_timeout()
// +-->queue-->decoder-->_videosink // +-->queue-->decoder-->_videosink
// | // |
// datasource-->demux-->parser-->tee // datasource-->demux-->parser-->tee
//
// ^ // ^
// | // |
// +-Here we will later link elements for recording // +-Here we will later link elements for recording
void void
VideoReceiver::start() VideoReceiver::start()
{ {
qCDebug(VideoReceiverLog) << "start():" << _uri;
if(qgcApp()->runningUnitTests()) { if(qgcApp()->runningUnitTests()) {
return; return;
} }
...@@ -229,18 +167,18 @@ VideoReceiver::start() ...@@ -229,18 +167,18 @@ VideoReceiver::start()
qCDebug(VideoReceiverLog) << "start() but not enabled/configured"; qCDebug(VideoReceiverLog) << "start() but not enabled/configured";
return; return;
} }
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
_stop = false; _stop = false;
qCDebug(VideoReceiverLog) << "start()"; qCDebug(VideoReceiverLog) << "start():" << _uri;
#if defined(QGC_GST_TAISYNC_ENABLED) && (defined(__android__) || defined(__ios__)) #if defined(QGC_GST_TAISYNC_ENABLED) && (defined(__android__) || defined(__ios__))
//-- Taisync on iOS or Android sends a raw h.264 stream //-- Taisync on iOS or Android sends a raw h.264 stream
bool isTaisyncUSB = qgcApp()->toolbox()->videoManager()->isTaisync(); bool isTaisyncUSB = qgcApp()->toolbox()->videoManager()->isTaisync();
#else #else
bool isTaisyncUSB = false; bool isTaisyncUSB = false;
#endif #endif
bool isUdp = _uri.contains("udp://") && !isTaisyncUSB; bool isUdp = _uri.contains("udp://") && !isTaisyncUSB;
bool isRtsp = _uri.contains("rtsp://") && !isTaisyncUSB;
bool isTCP = _uri.contains("tcp://") && !isTaisyncUSB; bool isTCP = _uri.contains("tcp://") && !isTaisyncUSB;
bool isMPEGTS = _uri.contains("mpegts://") && !isTaisyncUSB; bool isMPEGTS = _uri.contains("mpegts://") && !isTaisyncUSB;
...@@ -259,12 +197,6 @@ VideoReceiver::start() ...@@ -259,12 +197,6 @@ VideoReceiver::start()
_starting = true; _starting = true;
//-- For RTSP and TCP, check to see if server is there first
if(!_serverPresent && (isRtsp || isTCP)) {
_timer.start(100);
return;
}
bool running = false; bool running = false;
bool pipelineUp = false; bool pipelineUp = false;
...@@ -324,15 +256,15 @@ VideoReceiver::start() ...@@ -324,15 +256,15 @@ VideoReceiver::start()
} }
} else { } else {
if(!isTaisyncUSB) { if(!isTaisyncUSB) {
if ((demux = gst_element_factory_make("rtph264depay", "rtp-h264-depacketizer")) == nullptr) { if ((demux = gst_element_factory_make(_depayName, "rtp-depacketizer")) == nullptr) {
qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('rtph264depay')"; qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('" << _depayName << "')";
break; break;
} }
} }
} }
if ((parser = gst_element_factory_make("h264parse", "h264-parser")) == nullptr) { if ((parser = gst_element_factory_make(_parserName, "parser")) == nullptr) {
qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('h264parse')"; qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('" << _parserName << "')";
break; break;
} }
...@@ -348,8 +280,8 @@ VideoReceiver::start() ...@@ -348,8 +280,8 @@ VideoReceiver::start()
break; break;
} }
if ((decoder = gst_element_factory_make("avdec_h264", "h264-decoder")) == nullptr) { if ((decoder = gst_element_factory_make(_decoderName, "decoder")) == nullptr) {
qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('avdec_h264')"; qCritical() << "VideoReceiver::start() failed. Error with gst_element_factory_make('" << _decoderName << "')";
break; break;
} }
...@@ -525,7 +457,6 @@ VideoReceiver::_shutdownPipeline() { ...@@ -525,7 +457,6 @@ VideoReceiver::_shutdownPipeline() {
_pipeline = nullptr; _pipeline = nullptr;
delete _sink; delete _sink;
_sink = nullptr; _sink = nullptr;
_serverPresent = false;
_streaming = false; _streaming = false;
_recording = false; _recording = false;
_stopping = false; _stopping = false;
...@@ -540,7 +471,7 @@ void ...@@ -540,7 +471,7 @@ void
VideoReceiver::_handleError() { VideoReceiver::_handleError() {
qCDebug(VideoReceiverLog) << "Gstreamer error!"; qCDebug(VideoReceiverLog) << "Gstreamer error!";
stop(); stop();
start(); _restart_timer.start(_restart_time_ms);
} }
#endif #endif
...@@ -555,8 +486,7 @@ VideoReceiver::_handleEOS() { ...@@ -555,8 +486,7 @@ VideoReceiver::_handleEOS() {
_shutdownRecordingBranch(); _shutdownRecordingBranch();
} else { } else {
qWarning() << "VideoReceiver: Unexpected EOS!"; qWarning() << "VideoReceiver: Unexpected EOS!";
stop(); _handleError();
start();
} }
} }
#endif #endif
...@@ -646,6 +576,21 @@ VideoReceiver::_cleanupOldVideos() ...@@ -646,6 +576,21 @@ VideoReceiver::_cleanupOldVideos()
} }
#endif #endif
//-----------------------------------------------------------------------------
void
VideoReceiver::setVideoDecoder(VideoEncoding encoding)
{
if (encoding == H265_HW || encoding == H265_SW) {
_depayName = "rtph265depay";
_parserName = "h265parse";
_decoderName = "avdec_h265";
} else {
_depayName = "rtph264depay";
_parserName = "h264parse";
_decoderName = "avdec_h264";
}
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// When we finish our pipeline will look like this: // When we finish our pipeline will look like this:
// //
...@@ -682,7 +627,7 @@ VideoReceiver::startRecording(const QString &videoFile) ...@@ -682,7 +627,7 @@ VideoReceiver::startRecording(const QString &videoFile)
_sink = new Sink(); _sink = new Sink();
_sink->teepad = gst_element_get_request_pad(_tee, "src_%u"); _sink->teepad = gst_element_get_request_pad(_tee, "src_%u");
_sink->queue = gst_element_factory_make("queue", nullptr); _sink->queue = gst_element_factory_make("queue", nullptr);
_sink->parse = gst_element_factory_make("h264parse", nullptr); _sink->parse = gst_element_factory_make(_parserName, nullptr);
_sink->mux = gst_element_factory_make(kVideoMuxes[muxIdx], nullptr); _sink->mux = gst_element_factory_make(kVideoMuxes[muxIdx], nullptr);
_sink->filesink = gst_element_factory_make("filesink", nullptr); _sink->filesink = gst_element_factory_make("filesink", nullptr);
_sink->removing = false; _sink->removing = false;
...@@ -896,10 +841,10 @@ VideoReceiver::_updateTimer() ...@@ -896,10 +841,10 @@ VideoReceiver::_updateTimer()
{ {
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
if(_videoSurface) { if(_videoSurface) {
if(stopping() || starting()) { if(_stopping || _starting) {
return; return;
} }
if(streaming()) { if(_streaming) {
if(!_videoRunning) { if(!_videoRunning) {
_videoSurface->setLastFrame(0); _videoSurface->setLastFrame(0);
_videoRunning = true; _videoRunning = true;
...@@ -927,7 +872,7 @@ VideoReceiver::_updateTimer() ...@@ -927,7 +872,7 @@ VideoReceiver::_updateTimer()
_stop = false; _stop = false;
} }
} else { } else {
if(!_stop && !running() && !_uri.isEmpty() && _videoSettings->streamEnabled()->rawValue().toBool()) { if(!_stop && _running && !_uri.isEmpty() && _videoSettings->streamEnabled()->rawValue().toBool()) {
start(); start();
} }
} }
......
/**************************************************************************** /****************************************************************************
* *
* (c) 2009-2018 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
* *
* QGroundControl is licensed according to the terms in the file * QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory. * COPYING.md in the root of the source code directory.
...@@ -34,6 +34,13 @@ class VideoReceiver : public QObject ...@@ -34,6 +34,13 @@ class VideoReceiver : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
enum VideoEncoding {
H264_SW = 1,
H264_HW = 2,
H265_SW = 3,
H265_HW = 4
};
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
Q_PROPERTY(bool recording READ recording NOTIFY recordingChanged) Q_PROPERTY(bool recording READ recording NOTIFY recordingChanged)
#endif #endif
...@@ -47,11 +54,7 @@ public: ...@@ -47,11 +54,7 @@ public:
~VideoReceiver(); ~VideoReceiver();
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
virtual bool running () { return _running; }
virtual bool recording () { return _recording; } virtual bool recording () { return _recording; }
virtual bool streaming () { return _streaming; }
virtual bool starting () { return _starting; }
virtual bool stopping () { return _stopping; }
#endif #endif
virtual VideoSurface* videoSurface () { return _videoSurface; } virtual VideoSurface* videoSurface () { return _videoSurface; }
...@@ -64,6 +67,8 @@ public: ...@@ -64,6 +67,8 @@ public:
virtual void setShowFullScreen (bool show) { _showFullScreen = show; emit showFullScreenChanged(); } virtual void setShowFullScreen (bool show) { _showFullScreen = show; emit showFullScreenChanged(); }
void setVideoDecoder (VideoEncoding encoding);
signals: signals:
void videoRunningChanged (); void videoRunningChanged ();
void imageFileChanged (); void imageFileChanged ();
...@@ -86,9 +91,7 @@ public slots: ...@@ -86,9 +91,7 @@ public slots:
protected slots: protected slots:
virtual void _updateTimer (); virtual void _updateTimer ();
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
virtual void _timeout (); virtual void _restart_timeout ();
virtual void _connected ();
virtual void _socketError (QAbstractSocket::SocketError socketError);
virtual void _handleError (); virtual void _handleError ();
virtual void _handleEOS (); virtual void _handleEOS ();
virtual void _handleStateChanged (); virtual void _handleStateChanged ();
...@@ -132,14 +135,11 @@ protected: ...@@ -132,14 +135,11 @@ protected:
//-- Wait for Video Server to show up before starting //-- Wait for Video Server to show up before starting
QTimer _frameTimer; QTimer _frameTimer;
QTimer _timer; QTimer _restart_timer;
QTcpSocket* _socket; int _restart_time_ms;
bool _serverPresent;
int _rtspTestInterval_ms;
//-- RTSP UDP reconnect timeout //-- RTSP UDP reconnect timeout
uint64_t _udpReconnect_us; uint64_t _udpReconnect_us;
#endif #endif
QString _uri; QString _uri;
...@@ -149,5 +149,8 @@ protected: ...@@ -149,5 +149,8 @@ protected:
bool _videoRunning; bool _videoRunning;
bool _showFullScreen; bool _showFullScreen;
VideoSettings* _videoSettings; VideoSettings* _videoSettings;
const char* _depayName;
const char* _parserName;
const char* _decoderName;
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment