Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0f5be407
Commit
0f5be407
authored
Feb 03, 2020
by
Andrew Voznytsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to Qt-way to find number of seconds since 01.01.1970
parent
50a014cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
VideoReceiver.cc
src/VideoStreaming/VideoReceiver.cc
+2
-2
VideoReceiver.h
src/VideoStreaming/VideoReceiver.h
+1
-1
No files found.
src/VideoStreaming/VideoReceiver.cc
View file @
0f5be407
...
...
@@ -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
();
...
...
src/VideoStreaming/VideoReceiver.h
View file @
0f5be407
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment