From bc3c17e0f880585512a616220508b7998bfa6f33 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 22 Oct 2015 10:20:09 -0500 Subject: [PATCH] try to el6's gstreamer-0.10.29 (QTBUG-48939) --- qt5-qtmultimedia.spec | 6 ++ qtmultimedia-opensource-src-5.5.1-el6.patch | 97 +++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 qtmultimedia-opensource-src-5.5.1-el6.patch diff --git a/qt5-qtmultimedia.spec b/qt5-qtmultimedia.spec index f7f768f..7f81b13 100644 --- a/qt5-qtmultimedia.spec +++ b/qt5-qtmultimedia.spec @@ -34,6 +34,10 @@ License: LGPLv2 with exceptions or GPLv3 with exceptions Url: http://www.qt.io Source0: http://download.qt.io/official_releases/qt/5.5/%{version}%{?prerelease:-%{prerelease}}/submodules/%{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}.tar.xz +# try to support el6's older gstreamer-0.10.29 +# https://bugreports.qt.io/browse/QTBUG-48939 +Patch1: qtmultimedia-opensource-src-5.5.1-el6.patch + BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} BuildRequires: pkgconfig(alsa) @@ -90,6 +94,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} +%patch1 -p1 -b .el6 + %build mkdir %{_target_platform} diff --git a/qtmultimedia-opensource-src-5.5.1-el6.patch b/qtmultimedia-opensource-src-5.5.1-el6.patch new file mode 100644 index 0000000..4126544 --- /dev/null +++ b/qtmultimedia-opensource-src-5.5.1-el6.patch @@ -0,0 +1,97 @@ +diff -up qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstreamervideooverlay.cpp.el6 qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstreamervideooverlay.cpp +--- qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstreamervideooverlay.cpp.el6 2015-10-12 23:35:43.000000000 -0500 ++++ qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstreamervideooverlay.cpp 2015-10-22 10:14:22.129635875 -0500 +@@ -146,6 +146,7 @@ GstElement *QGstreamerVideoOverlay::find + } + } + ++#if GST_CHECK_VERSION(0,10,31) + // If none of the known video sinks are available, try to find one that implements the + // GstVideoOverlay interface and has autoplugging rank. + GList *list = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO, +@@ -170,6 +171,7 @@ GstElement *QGstreamerVideoOverlay::find + gst_plugin_feature_list_free(list); + + return choice; ++#endif + } + + GstElement *QGstreamerVideoOverlay::videoSink() const +diff -up qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstutils.cpp.el6 qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstutils.cpp +--- qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstutils.cpp.el6 2015-10-12 23:35:43.000000000 -0500 ++++ qtmultimedia-opensource-src-5.5.1/src/gsttools/qgstutils.cpp 2015-10-22 09:49:55.726563754 -0500 +@@ -782,7 +782,9 @@ static const ColorFormat qt_colorLookup[ + { QImage::Format_RGBX8888, GST_VIDEO_FORMAT_RGBx }, + { QImage::Format_RGBA8888, GST_VIDEO_FORMAT_RGBA }, + { QImage::Format_RGB888 , GST_VIDEO_FORMAT_RGB }, ++#if GST_CHECK_VERSION(0,30,0) + { QImage::Format_RGB16 , GST_VIDEO_FORMAT_RGB16 } ++#endif + }; + + } +@@ -1212,6 +1214,7 @@ void QGstUtils::setMetaData(GstElement * + tagValue.toDouble(), + NULL); + break; ++#if GST_CHECK_VERSION(0,10,31) + case QVariant::DateTime: { + QDateTime date = tagValue.toDateTime().toLocalTime(); + gst_tag_setter_add_tags(GST_TAG_SETTER(element), +@@ -1223,6 +1226,7 @@ void QGstUtils::setMetaData(GstElement * + NULL); + break; + } ++#endif + default: + break; + } +diff -up qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp.el6 qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp +--- qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp.el6 2015-10-12 23:35:43.000000000 -0500 ++++ qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp 2015-10-22 09:49:55.726563754 -0500 +@@ -70,9 +70,13 @@ QMultimedia::SupportEstimate QGstreamerA + + static bool isDecoderOrDemuxer(GstElementFactory *factory) + { ++#if GST_CHECK_VERSION(0,10,31) + return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DEMUXER) + || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER + | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO); ++#else ++ return false; ++#endif + } + + void QGstreamerAudioDecoderServicePlugin::updateSupportedMimeTypes() const +diff -up qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp.el6 qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +--- qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp.el6 2015-10-12 23:35:42.000000000 -0500 ++++ qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp 2015-10-22 09:53:38.620573847 -0500 +@@ -113,8 +113,12 @@ QMultimedia::SupportEstimate QGstreamerC + + static bool isEncoderOrMuxer(GstElementFactory *factory) + { ++#if GST_CHECK_VERSION(0,10,31) + return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_MUXER) + || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_ENCODER); ++#else ++ return false; ++#endif + } + + void QGstreamerCaptureServicePlugin::updateSupportedMimeTypes() const +diff -up qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp.el6 qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp +--- qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp.el6 2015-10-12 23:35:42.000000000 -0500 ++++ qtmultimedia-opensource-src-5.5.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp 2015-10-22 09:52:40.403569549 -0500 +@@ -83,8 +83,12 @@ QMultimedia::SupportEstimate QGstreamerP + + static bool isDecoderOrDemuxer(GstElementFactory *factory) + { ++#if GST_CHECK_VERSION(0,10,31) + return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DEMUXER) + || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER); ++#else ++ return false; ++#endif + } + + void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const