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
17a591ac
Commit
17a591ac
authored
Apr 10, 2020
by
Matej Frančeškin
Committed by
Andrew Voznytsa
Apr 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix video start/stop/restart on error
parent
42c15ee2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
166 deletions
+184
-166
CustomVideoManager.cc
custom-example/src/CustomVideoManager.cc
+2
-2
CustomVideoManager.h
custom-example/src/CustomVideoManager.h
+1
-1
VideoManager.cc
src/VideoManager/VideoManager.cc
+171
-150
VideoManager.h
src/VideoManager/VideoManager.h
+10
-13
No files found.
custom-example/src/CustomVideoManager.cc
View file @
17a591ac
...
...
@@ -20,10 +20,10 @@ CustomVideoManager::CustomVideoManager(QGCApplication* app, QGCToolbox* toolbox)
//-----------------------------------------------------------------------------
void
CustomVideoManager
::
_updateSettings
()
CustomVideoManager
::
_updateSettings
(
unsigned
id
)
{
if
(
!
_videoSettings
||
!
_videoReceiver
)
return
;
VideoManager
::
_updateSettings
();
VideoManager
::
_updateSettings
(
id
);
}
custom-example/src/CustomVideoManager.h
View file @
17a591ac
...
...
@@ -23,6 +23,6 @@ public:
CustomVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
protected:
void
_updateSettings
();
void
_updateSettings
(
unsigned
id
);
};
src/VideoManager/VideoManager.cc
View file @
17a591ac
This diff is collapsed.
Click to expand it.
src/VideoManager/VideoManager.h
View file @
17a591ac
...
...
@@ -88,8 +88,8 @@ public:
// FIXME: AV: they should be removed after finishing multiple video stream support
// new arcitecture does not assume direct access to video receiver from QML side, even if it works for now
virtual
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
virtual
VideoReceiver
*
thermalVideoReceiver
()
{
return
_
thermalVideoReceiver
;
}
virtual
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
[
0
]
;
}
virtual
VideoReceiver
*
thermalVideoReceiver
()
{
return
_
videoReceiver
[
1
]
;
}
#if defined(QGC_DISABLE_UVC)
virtual
bool
uvcEnabled
()
{
return
false
;
}
...
...
@@ -142,11 +142,11 @@ protected:
friend
class
FinishVideoInitialization
;
void
_initVideo
();
bool
_updateSettings
();
bool
_updateVideoUri
(
const
QString
&
uri
);
bool
_updateThermalVideoUri
(
const
QString
&
uri
);
bool
_updateSettings
(
unsigned
id
);
bool
_updateVideoUri
(
unsigned
id
,
const
QString
&
uri
);
void
_cleanupOldVideos
();
void
_restartVideo
();
void
_restartAllVideos
();
void
_restartVideo
(
unsigned
id
);
void
_startReceiver
(
unsigned
id
);
void
_stopReceiver
(
unsigned
id
);
...
...
@@ -155,18 +155,15 @@ protected:
QString
_imageFile
;
SubtitleWriter
_subtitleWriter
;
bool
_isTaisync
=
false
;
VideoReceiver
*
_videoReceiver
=
nullptr
;
VideoReceiver
*
_videoReceiver
[
2
]
=
{
nullptr
,
nullptr
};
void
*
_videoSink
[
2
]
=
{
nullptr
,
nullptr
};
QString
_videoUri
[
2
];
bool
_videoStarted
[
2
]
=
{
false
,
false
};
QAtomicInteger
<
bool
>
_streaming
=
false
;
QAtomicInteger
<
bool
>
_decoding
=
false
;
QAtomicInteger
<
bool
>
_recording
=
false
;
QAtomicInteger
<
quint32
>
_videoSize
=
0
;
VideoReceiver
*
_thermalVideoReceiver
=
nullptr
;
bool
_enableVideoRestart
=
false
;
void
*
_videoSink
=
nullptr
;
void
*
_thermalVideoSink
=
nullptr
;
VideoSettings
*
_videoSettings
=
nullptr
;
QString
_videoUri
;
QString
_thermalVideoUri
;
QString
_videoSourceID
;
bool
_fullScreen
=
false
;
Vehicle
*
_activeVehicle
=
nullptr
;
...
...
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