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
5153a30a
Commit
5153a30a
authored
Dec 12, 2019
by
Andrew Voznytsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to statically linked qmlglsink if system does not have preinstalled one
parent
2ed4a27f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
11 deletions
+65
-11
qgroundcontrol.pro
qgroundcontrol.pro
+7
-0
qmlglsink.pri
qmlglsink.pri
+30
-0
VideoStreaming.cc
src/VideoStreaming/VideoStreaming.cc
+21
-8
VideoStreaming.pri
src/VideoStreaming/VideoStreaming.pri
+7
-3
No files found.
qgroundcontrol.pro
View file @
5153a30a
...
...
@@ -331,6 +331,13 @@ contains (DEFINES, QGC_DISABLE_PAIRING) {
DEFINES
+=
QGC_ENABLE_PAIRING
}
#
#
Add
qmlglsink
(
libs
/
gst
-
plugins
-
good
/
ext
/
qt
)
#
include
(
qmlglsink
.
pri
)
#
#
External
library
configuration
#
...
...
qmlglsink.pri
0 → 100644
View file @
5153a30a
LinuxBuild {
DEFINES += HAVE_QT_X11 HAVE_QT_EGLFS HAVE_QT_WAYLAND
} else:MacBuild {
DEFINES += HAVE_QT_MAC
} else:iOSBuild {
DEFINES += HAVE_QT_IOS
} else:WindowsBuild {
DEFINES += HAVE_QT_WIN32
LIBS += opengl32.lib
} else:AndroidBuild {
DEFINES += HAVE_QT_ANDROID
}
SOURCES += \
libs/gst-plugins-good/ext/qt/gstplugin.cc \
libs/gst-plugins-good/ext/qt/gstqtglutility.cc \
libs/gst-plugins-good/ext/qt/gstqsgtexture.cc \
libs/gst-plugins-good/ext/qt/gstqtsink.cc \
libs/gst-plugins-good/ext/qt/gstqtsrc.cc \
libs/gst-plugins-good/ext/qt/qtwindow.cc \
libs/gst-plugins-good/ext/qt/qtitem.cc
HEADERS += \
libs/gst-plugins-good/ext/qt/gstqsgtexture.h \
libs/gst-plugins-good/ext/qt/gstqtgl.h \
libs/gst-plugins-good/ext/qt/gstqtglutility.h \
libs/gst-plugins-good/ext/qt/gstqtsink.h \
libs/gst-plugins-good/ext/qt/gstqtsrc.h \
libs/gst-plugins-good/ext/qt/qtwindow.h \
libs/gst-plugins-good/ext/qt/qtitem.h
src/VideoStreaming/VideoStreaming.cc
View file @
5153a30a
...
...
@@ -43,10 +43,12 @@
GST_PLUGIN_STATIC_DECLARE
(
rtpmanager
);
GST_PLUGIN_STATIC_DECLARE
(
isomp4
);
GST_PLUGIN_STATIC_DECLARE
(
matroska
);
GST_PLUGIN_STATIC_DECLARE
(
opengl
);
#endif
#if defined(__android__)
GST_PLUGIN_STATIC_DECLARE
(
androidmedia
);
#endif
GST_PLUGIN_STATIC_DECLARE
(
qmlgl
);
G_END_DECLS
#endif
...
...
@@ -158,21 +160,32 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu
GST_PLUGIN_STATIC_REGISTER
(
matroska
);
GST_PLUGIN_STATIC_REGISTER
(
androidmedia
);
#endif
#else
Q_UNUSED
(
argc
);
Q_UNUSED
(
argv
);
Q_UNUSED
(
logpath
);
Q_UNUSED
(
debuglevel
);
#if defined(__mobile__)
GST_PLUGIN_STATIC_REGISTER
(
opengl
);
#endif
/* the plugin must be loaded before loading the qml file to register the
* GstGLVideoItem qml item
* FIXME Add a QQmlExtensionPlugin into qmlglsink to register GstGLVideoItem
* with the QML engine, then remove this */
GstElement
*
sink
=
gst_element_factory_make
(
"qmlglsink"
,
NULL
);
if
(
sink
!=
NULL
)
{
GstElement
*
sink
=
gst_element_factory_make
(
"qmlglsink"
,
nullptr
);
if
(
sink
==
nullptr
)
{
GST_PLUGIN_STATIC_REGISTER
(
qmlgl
);
sink
=
gst_element_factory_make
(
"qmlglsink"
,
nullptr
);
}
if
(
sink
!=
nullptr
)
{
gst_object_unref
(
sink
);
sink
=
NULL
;
sink
=
nullptr
;
}
else
{
qCritical
()
<<
"unable to find qmlglsink - you need to build it yourself and add to GST_PLUGIN_PATH"
;
}
#else
Q_UNUSED
(
argc
);
Q_UNUSED
(
argv
);
Q_UNUSED
(
logpath
);
Q_UNUSED
(
debuglevel
);
#endif
}
src/VideoStreaming/VideoStreaming.pri
View file @
5153a30a
...
...
@@ -12,9 +12,10 @@
#
LinuxBuild {
QT += x11extras waylandclient
CONFIG += link_pkgconfig
packagesExist(gstreamer-1.0) {
PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0
PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0
gstreamer-gl-1.0
CONFIG += VideoEnabled
}
} else:MacBuild {
...
...
@@ -39,10 +40,11 @@ LinuxBuild {
exists($$GST_ROOT) {
CONFIG += VideoEnabled
LIBS += -L$$GST_ROOT/lib -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
LIBS += -L$$GST_ROOT/lib -lgstreamer-1.0 -lgst
gl-1.0 -lgst
video-1.0 -lgstbase-1.0
LIBS += -lglib-2.0 -lintl -lgobject-2.0
INCLUDEPATH += \
$$GST_ROOT/include \
$$GST_ROOT/include/gstreamer-1.0 \
$$GST_ROOT/include/glib-2.0 \
$$GST_ROOT/lib/gstreamer-1.0/include \
...
...
@@ -86,10 +88,12 @@ LinuxBuild {
-lgstrtpmanager \
-lgstisomp4 \
-lgstmatroska \
-lgstandroidmedia
-lgstandroidmedia \
-lgstopengl
# Rest of GStreamer dependencies
LIBS += -L$$GST_ROOT/lib \
-lgraphene-1.0 -ljpeg -lpng16 \
-lgstfft-1.0 -lm \
-lgstnet-1.0 -lgio-2.0 \
-lgstphotography-1.0 -lgstgl-1.0 -lEGL \
...
...
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