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
49e012ae
Commit
49e012ae
authored
Aug 30, 2016
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build fix for when GStreamer is not present.
parent
fefada33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
VideoManager.cc
src/FlightDisplay/VideoManager.cc
+11
-4
VideoReceiver.cc
src/VideoStreaming/VideoReceiver.cc
+2
-0
No files found.
src/FlightDisplay/VideoManager.cc
View file @
49e012ae
...
...
@@ -22,7 +22,10 @@ static const char* kVideoSourceKey = "VideoSource";
static
const
char
*
kVideoUDPPortKey
=
"VideoUDPPort"
;
static
const
char
*
kVideoRTSPUrlKey
=
"VideoRTSPUrl"
;
static
const
char
*
kUDPStream
=
"UDP Video Stream"
;
#if defined(QGC_GST_STREAMING)
static
const
char
*
kRTSPStream
=
"RTSP Video Stream"
;
#endif
static
const
char
*
kNoVideo
=
"No Video Available"
;
QGC_LOGGING_CATEGORY
(
VideoManagerLog
,
"VideoManagerLog"
)
...
...
@@ -97,6 +100,8 @@ VideoManager::uvcEnabled()
void
VideoManager
::
setVideoSource
(
QString
vSource
)
{
if
(
vSource
==
kNoVideo
)
return
;
_videoSource
=
vSource
;
QSettings
settings
;
settings
.
setValue
(
kVideoSourceKey
,
vSource
);
...
...
@@ -115,7 +120,7 @@ VideoManager::setVideoSource(QString vSource)
emit
isGStreamerChanged
();
qCDebug
(
VideoManagerLog
)
<<
"New Video Source:"
<<
vSource
;
/*
* Not working. Requires restart for now
* Not working. Requires restart for now
. (Undef KRTSP/kUDP above when enabling this)
if(isGStreamer())
_updateVideo();
*/
...
...
@@ -137,7 +142,7 @@ VideoManager::setUdpPort(quint16 port)
settings
.
setValue
(
kVideoUDPPortKey
,
port
);
emit
udpPortChanged
();
/*
* Not working. Requires restart for now
* Not working. Requires restart for now
. (Undef KRTSP/kUDP above when enabling this)
if(_videoSource == kUDPStream)
_updateVideo();
*/
...
...
@@ -152,7 +157,7 @@ VideoManager::setRtspURL(QString url)
settings
.
setValue
(
kVideoRTSPUrlKey
,
url
);
emit
rtspURLChanged
();
/*
* Not working. Requires restart for now
* Not working. Requires restart for now
. (Undef KRTSP/kUDP above when enabling this)
if(_videoSource == kRTSPStream)
_updateVideo();
*/
...
...
@@ -174,6 +179,8 @@ VideoManager::videoSourceList()
_videoSourceList
.
append
(
cameraInfo
.
description
());
}
#endif
if
(
_videoSourceList
.
count
()
==
0
)
_videoSourceList
.
append
(
kNoVideo
);
return
_videoSourceList
;
}
...
...
@@ -218,8 +225,8 @@ void VideoManager::_updateVideo()
delete
_videoSurface
;
_videoSurface
=
new
VideoSurface
;
_videoReceiver
=
new
VideoReceiver
(
this
);
_videoReceiver
->
setVideoSink
(
_videoSurface
->
videoSink
());
#if defined(QGC_GST_STREAMING)
_videoReceiver
->
setVideoSink
(
_videoSurface
->
videoSink
());
if
(
_videoSource
==
kUDPStream
)
_videoReceiver
->
setUri
(
QStringLiteral
(
"udp://0.0.0.0:%1"
).
arg
(
_udpPort
));
else
...
...
src/VideoStreaming/VideoReceiver.cc
View file @
49e012ae
...
...
@@ -49,6 +49,7 @@ void VideoReceiver::setVideoSink(GstElement* sink)
}
#endif
#if defined(QGC_GST_STREAMING)
static
void
newPadCB
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
)
{
gchar
*
name
;
...
...
@@ -63,6 +64,7 @@ static void newPadCB(GstElement * element, GstPad* pad, gpointer data)
qCritical
()
<<
"newPadCB : failed to link elements
\n
"
;
g_free
(
name
);
}
#endif
void
VideoReceiver
::
start
()
{
...
...
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