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