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
ae63bfe1
Commit
ae63bfe1
authored
Apr 29, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only report missing video stream when relevant
parent
3c877924
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+6
-4
QGCCameraControl.h
src/Camera/QGCCameraControl.h
+1
-1
No files found.
src/Camera/QGCCameraControl.cc
View file @
ae63bfe1
...
...
@@ -1491,7 +1491,7 @@ QGCCameraControl::handleVideoInfo(const mavlink_video_stream_information_t* vi)
{
qCDebug
(
CameraControlLog
)
<<
"handleVideoInfo:"
<<
vi
->
stream_id
<<
vi
->
uri
;
_expectedCount
=
vi
->
count
;
if
(
!
_findStream
(
vi
->
stream_id
))
{
if
(
!
_findStream
(
vi
->
stream_id
,
false
))
{
qCDebug
(
CameraControlLog
)
<<
"Create stream handler for stream ID:"
<<
vi
->
stream_id
;
QGCVideoStreamInfo
*
pStream
=
new
QGCVideoStreamInfo
(
this
,
vi
);
QQmlEngine
::
setObjectOwnership
(
pStream
,
QQmlEngine
::
CppOwnership
);
...
...
@@ -1640,7 +1640,7 @@ QGCCameraControl::_requestStreamStatus(uint8_t streamID)
//-----------------------------------------------------------------------------
QGCVideoStreamInfo
*
QGCCameraControl
::
_findStream
(
uint8_t
id
)
QGCCameraControl
::
_findStream
(
uint8_t
id
,
bool
report
)
{
for
(
int
i
=
0
;
i
<
_streams
.
count
();
i
++
)
{
if
(
_streams
[
i
])
{
...
...
@@ -1654,7 +1654,9 @@ QGCCameraControl::_findStream(uint8_t id)
}
}
}
qWarning
()
<<
"Stream id not found:"
<<
id
;
if
(
report
)
{
qWarning
()
<<
"Stream id not found:"
<<
id
;
}
return
nullptr
;
}
...
...
@@ -1676,7 +1678,7 @@ QGCCameraControl::_streamTimeout()
}
for
(
uint8_t
i
=
0
;
i
<
_expectedCount
;
i
++
)
{
//-- Stream ID starts at 1
if
(
!
_findStream
(
i
+
1
))
{
if
(
!
_findStream
(
i
+
1
,
false
))
{
_requestStreamInfo
(
i
+
1
);
return
;
}
...
...
src/Camera/QGCCameraControl.h
View file @
ae63bfe1
...
...
@@ -292,7 +292,7 @@ protected:
virtual
void
_setCameraMode
(
CameraMode
mode
);
virtual
void
_requestStreamInfo
(
uint8_t
streamID
);
virtual
void
_requestStreamStatus
(
uint8_t
streamID
);
virtual
QGCVideoStreamInfo
*
_findStream
(
uint8_t
streamID
);
virtual
QGCVideoStreamInfo
*
_findStream
(
uint8_t
streamID
,
bool
report
=
true
);
protected
slots
:
virtual
void
_initWhenReady
();
...
...
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