Unverified Commit 4fdc5f5f authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #8385 from andrewvoznytsa/pr-mobile-mpeg2-ts-fix

Fix MPEG-2 TS support on Android and iOS
parents bd2cb72c d9018321
...@@ -359,9 +359,17 @@ VideoReceiver::_makeSource(const QString& uri) ...@@ -359,9 +359,17 @@ VideoReceiver::_makeSource(const QString& uri)
break; break;
} }
if ((parser = gst_element_factory_make("parsebin", "parser")) == nullptr) { // FIXME: AV: Android does not determine MPEG2-TS via parsebin - have to explicitly state which demux to use
qCritical() << "VideoReceiver::_makeSource() failed. Error with gst_element_factory_make('parsebin')"; if (isTcpMPEGTS || isUdpMPEGTS) {
break; 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) { if ((bin = gst_bin_new("sourcebin")) == nullptr) {
......
...@@ -89,6 +89,7 @@ static void qt_gst_log(GstDebugCategory * category, ...@@ -89,6 +89,7 @@ static void qt_gst_log(GstDebugCategory * category,
GST_PLUGIN_STATIC_DECLARE(rtpmanager); GST_PLUGIN_STATIC_DECLARE(rtpmanager);
GST_PLUGIN_STATIC_DECLARE(isomp4); GST_PLUGIN_STATIC_DECLARE(isomp4);
GST_PLUGIN_STATIC_DECLARE(matroska); GST_PLUGIN_STATIC_DECLARE(matroska);
GST_PLUGIN_STATIC_DECLARE(mpegtsdemux);
GST_PLUGIN_STATIC_DECLARE(opengl); GST_PLUGIN_STATIC_DECLARE(opengl);
#if defined(__android__) #if defined(__android__)
GST_PLUGIN_STATIC_DECLARE(androidmedia); GST_PLUGIN_STATIC_DECLARE(androidmedia);
...@@ -162,6 +163,7 @@ void initializeVideoStreaming(int &argc, char* argv[], int gstDebuglevel) ...@@ -162,6 +163,7 @@ void initializeVideoStreaming(int &argc, char* argv[], int gstDebuglevel)
GST_PLUGIN_STATIC_REGISTER(rtpmanager); GST_PLUGIN_STATIC_REGISTER(rtpmanager);
GST_PLUGIN_STATIC_REGISTER(isomp4); GST_PLUGIN_STATIC_REGISTER(isomp4);
GST_PLUGIN_STATIC_REGISTER(matroska); GST_PLUGIN_STATIC_REGISTER(matroska);
GST_PLUGIN_STATIC_REGISTER(mpegtsdemux);
GST_PLUGIN_STATIC_REGISTER(opengl); GST_PLUGIN_STATIC_REGISTER(opengl);
#if defined(__android__) #if defined(__android__)
......
...@@ -89,6 +89,7 @@ LinuxBuild { ...@@ -89,6 +89,7 @@ LinuxBuild {
-lgstrtpmanager \ -lgstrtpmanager \
-lgstisomp4 \ -lgstisomp4 \
-lgstmatroska \ -lgstmatroska \
-lgstmpegtsdemux \
-lgstandroidmedia \ -lgstandroidmedia \
-lgstopengl -lgstopengl
...@@ -102,7 +103,7 @@ LinuxBuild { ...@@ -102,7 +103,7 @@ LinuxBuild {
-lgstreamer-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 -lgstrtsp-1.0 -lgsttag-1.0 \ -lgstreamer-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 -lgstrtsp-1.0 -lgsttag-1.0 \
-lgstvideo-1.0 -lavformat -lavcodec -lavutil -lx264 -lavfilter -lswresample \ -lgstvideo-1.0 -lavformat -lavcodec -lavutil -lx264 -lavfilter -lswresample \
-lgstriff-1.0 -lgstcontroller-1.0 -lgstapp-1.0 \ -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 \ -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl \
INCLUDEPATH += \ INCLUDEPATH += \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment