Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d9018321
Commit
d9018321
authored
Feb 21, 2020
by
Andrew Voznytsa
Browse files
Fix MPEG-2 TS support on Android and iOS
parent
ea9d4403
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/VideoStreaming/VideoReceiver.cc
View file @
d9018321
...
...
@@ -356,9 +356,17 @@ VideoReceiver::_makeSource(const QString& uri)
break
;
}
if
((
parser
=
gst_element_factory_make
(
"parsebin"
,
"parser"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_factory_make('parsebin')"
;
break
;
// FIXME: AV: Android does not determine MPEG2-TS via parsebin - have to explicitly state which demux to use
if
(
isTcpMPEGTS
||
isUdpMPEGTS
)
{
if
((
parser
=
gst_element_factory_make
(
"tsdemux"
,
"parser"
))
==
nullptr
)
{
qCritical
(
VideoReceiverLog
)
<<
"gst_element_factory_make('tsdemux') failed"
;
break
;
}
}
else
{
if
((
parser
=
gst_element_factory_make
(
"parsebin"
,
"parser"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_factory_make('parsebin')"
;
break
;
}
}
if
((
bin
=
gst_bin_new
(
"sourcebin"
))
==
nullptr
)
{
...
...
src/VideoStreaming/VideoStreaming.cc
View file @
d9018321
...
...
@@ -89,6 +89,7 @@ static void qt_gst_log(GstDebugCategory * category,
GST_PLUGIN_STATIC_DECLARE
(
rtpmanager
);
GST_PLUGIN_STATIC_DECLARE
(
isomp4
);
GST_PLUGIN_STATIC_DECLARE
(
matroska
);
GST_PLUGIN_STATIC_DECLARE
(
mpegtsdemux
);
GST_PLUGIN_STATIC_DECLARE
(
opengl
);
#if defined(__android__)
GST_PLUGIN_STATIC_DECLARE
(
androidmedia
);
...
...
@@ -162,6 +163,7 @@ void initializeVideoStreaming(int &argc, char* argv[], int gstDebuglevel)
GST_PLUGIN_STATIC_REGISTER
(
rtpmanager
);
GST_PLUGIN_STATIC_REGISTER
(
isomp4
);
GST_PLUGIN_STATIC_REGISTER
(
matroska
);
GST_PLUGIN_STATIC_REGISTER
(
mpegtsdemux
);
GST_PLUGIN_STATIC_REGISTER
(
opengl
);
#if defined(__android__)
...
...
src/VideoStreaming/VideoStreaming.pri
View file @
d9018321
...
...
@@ -89,6 +89,7 @@ LinuxBuild {
-lgstrtpmanager \
-lgstisomp4 \
-lgstmatroska \
-lgstmpegtsdemux \
-lgstandroidmedia \
-lgstopengl
...
...
@@ -102,7 +103,7 @@ LinuxBuild {
-lgstreamer-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 -lgstrtsp-1.0 -lgsttag-1.0 \
-lgstvideo-1.0 -lavformat -lavcodec -lavutil -lx264 -lavfilter -lswresample \
-lgstriff-1.0 -lgstcontroller-1.0 -lgstapp-1.0 \
-lgstsdp-1.0 -lbz2 -lgobject-2.0 \
-lgstsdp-1.0 -lbz2 -lgobject-2.0
-lgstmpegts-1.0
\
-Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl \
INCLUDEPATH += \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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