Commit 0f5be407 authored by Andrew Voznytsa's avatar Andrew Voznytsa

Switch to Qt-way to find number of seconds since 01.01.1970

parent 50a014cd
......@@ -959,7 +959,7 @@ VideoReceiver::_videoSinkProbe(GstPad* pad, GstPadProbeInfo* info, gpointer user
void
VideoReceiver::_noteVideoSinkFrame()
{
_lastFrameTime = time(nullptr);
_lastFrameTime = QDateTime::currentSecsSinceEpoch();
}
#endif
......@@ -1033,7 +1033,7 @@ VideoReceiver::_updateTimer()
timeout = _videoSettings->rtspTimeout()->rawValue().toUInt();
}
const time_t now = time(nullptr);
const qint64 now = QDateTime::currentSecsSinceEpoch();
if(now - _lastFrameTime > timeout) {
stop();
......
......@@ -138,7 +138,7 @@ protected:
GstElement* _pipelineStopRec;
GstElement* _videoSink;
guint64 _lastFrameId;
time_t _lastFrameTime;
qint64 _lastFrameTime;
//-- Wait for Video Server to show up before starting
QTimer _frameTimer;
......
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