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
b8ad6544
Commit
b8ad6544
authored
Dec 10, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stream configuration test
parent
c2879665
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
VideoManager.cc
src/FlightDisplay/VideoManager.cc
+3
-1
VideoSettings.cc
src/Settings/VideoSettings.cc
+8
-4
No files found.
src/FlightDisplay/VideoManager.cc
View file @
b8ad6544
...
...
@@ -238,8 +238,9 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle)
}
//-- Video Stream Discovery
connect
(
_activeVehicle
,
&
Vehicle
::
mavlinkMessageReceived
,
this
,
&
VideoManager
::
_vehicleMessageReceived
);
qCDebug
(
VideoManagerLog
)
<<
"Requesting video stream info"
;
_activeVehicle
->
sendMavCommand
(
0
,
// Target component
MAV_COMP_ID_ALL
,
// Target component
MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION
,
// Command id
false
,
// ShowError
1
,
// First camera only
...
...
@@ -254,6 +255,7 @@ VideoManager::_vehicleMessageReceived(const mavlink_message_t& message)
//-- For now we only handle one stream. There is no UI to pick different streams.
if
(
message
.
msgid
==
MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION
)
{
mavlink_msg_video_stream_information_decode
(
&
message
,
&
_streamInfo
);
qCDebug
(
VideoManagerLog
)
<<
"Received video stream info:"
<<
_streamInfo
.
uri
;
_restartVideo
();
emit
aspectRatioChanged
();
}
...
...
src/Settings/VideoSettings.cc
View file @
b8ad6544
...
...
@@ -137,18 +137,22 @@ bool VideoSettings::streamConfigured(void)
}
//-- If UDP, check if port is set
if
(
vSource
==
videoSourceUDP
)
{
qCDebug
(
VideoManagerLog
)
<<
"Testing configuration for UDP Stream:"
<<
udpPort
()
->
rawValue
().
toInt
();
return
udpPort
()
->
rawValue
().
toInt
()
!=
0
;
}
//-- If RTSP, check for URL
if
(
vSource
==
videoSourceRTSP
)
{
qCDebug
(
VideoManagerLog
)
<<
"Testing configuration for RTSP Stream:"
<<
rtspUrl
()
->
rawValue
().
toString
();
return
!
rtspUrl
()
->
rawValue
().
toString
().
isEmpty
();
}
//-- If Auto, check for URL
if
(
vSource
==
videoSourceAuto
)
{
return
!
rtspUrl
()
->
rawValue
().
toString
().
isEmpty
();
//-- If TCP, check for URL
if
(
vSource
==
videoSourceTCP
)
{
qCDebug
(
VideoManagerLog
)
<<
"Testing configuration for TCP Stream:"
<<
tcpUrl
()
->
rawValue
().
toString
();
return
!
tcpUrl
()
->
rawValue
().
toString
().
isEmpty
();
}
//-- If Auto, check for received URL
if
(
vSource
==
videoSourceTCP
)
{
if
(
vSource
==
videoSourceAuto
)
{
qCDebug
(
VideoManagerLog
)
<<
"Testing configuration for Auto Stream:"
<<
qgcApp
()
->
toolbox
()
->
videoManager
()
->
autoURL
();
return
!
qgcApp
()
->
toolbox
()
->
videoManager
()
->
autoURL
().
isEmpty
();
}
return
false
;
...
...
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