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
256fed26
Commit
256fed26
authored
Jul 21, 2017
by
dheideman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flight display: Fixed TypeErrors on startup without gstream installed
parent
317636e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
+9
-7
No files found.
src/FlightDisplay/FlightDisplayViewVideo.qml
View file @
256fed26
...
...
@@ -25,11 +25,13 @@ Item {
id
:
root
property
double
_ar
:
QGroundControl
.
settingsManager
.
videoSettings
.
aspectRatio
.
rawValue
property
bool
_showGrid
:
QGroundControl
.
settingsManager
.
videoSettings
.
gridLines
.
rawValue
>
0
property
var
_videoReceiver
:
QGroundControl
.
videoManager
.
videoReceiver
Rectangle
{
id
:
noVideo
anchors.fill
:
parent
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
visible
:
!
QGroundControl
.
videoManager
.
videoReceiver
.
videoRunning
visible
:
!
(
_videoReceiver
&&
_videoReceiver
.
videoRunning
)
QGCLabel
{
text
:
qsTr
(
"
WAITING FOR VIDEO
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
...
...
@@ -41,20 +43,20 @@ Item {
Rectangle
{
anchors.fill
:
parent
color
:
"
black
"
visible
:
QGroundControl
.
videoManager
.
videoReceiver
.
videoRunning
visible
:
_videoReceiver
&&
_
videoReceiver
.
videoRunning
QGCVideoBackground
{
id
:
videoContent
height
:
parent
.
height
width
:
_ar
!=
0.0
?
height
*
_ar
:
parent
.
width
anchors.centerIn
:
parent
receiver
:
QGroundControl
.
videoManager
.
videoReceiver
display
:
QGroundControl
.
videoManager
.
videoReceiver
.
videoSurface
visible
:
QGroundControl
.
videoManager
.
videoReceiver
.
videoRunning
receiver
:
_
videoReceiver
display
:
_videoReceiver
&&
_
videoReceiver
.
videoSurface
visible
:
_videoReceiver
&&
_
videoReceiver
.
videoRunning
Connections
{
target
:
QGroundControl
.
videoManager
.
videoReceiver
target
:
_
videoReceiver
onImageFileChanged
:
{
videoContent
.
grabToImage
(
function
(
result
)
{
if
(
!
result
.
saveToFile
(
QGroundControl
.
videoManager
.
videoReceiver
.
imageFile
))
{
if
(
!
result
.
saveToFile
(
_
videoReceiver
.
imageFile
))
{
console
.
error
(
'
Error capturing video frame
'
);
}
});
...
...
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