diff --git a/0007-Fixed-revisions-of-camera-related-meta-objects.patch b/0007-Fixed-revisions-of-camera-related-meta-objects.patch new file mode 100644 index 0000000..5b0699b --- /dev/null +++ b/0007-Fixed-revisions-of-camera-related-meta-objects.patch @@ -0,0 +1,100 @@ +From 99f6cf5f282c0d3d7192d5e87b745873e159c93d Mon Sep 17 00:00:00 2001 +From: Marco Benelli +Date: Tue, 15 Sep 2015 13:37:57 +0200 +Subject: [PATCH 07/11] Fixed revisions of camera-related meta objects. + +Change-Id: I91fe90122d53ce12322cecac8282ef9622869b71 +Reviewed-by: Yoann Lopes +--- + src/imports/multimedia/multimedia.cpp | 6 +++--- + src/imports/multimedia/plugins.qmltypes | 20 ++++++++++++++------ + 2 files changed, 17 insertions(+), 9 deletions(-) + +diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp +index 652359f..4b31068 100644 +--- a/src/imports/multimedia/multimedia.cpp ++++ b/src/imports/multimedia/multimedia.cpp +@@ -97,7 +97,7 @@ public: + trUtf8("CameraImageProcessing is provided by Camera")); + + // 5.2 types +- qmlRegisterRevision(uri, 5, 2); ++ qmlRegisterType(uri, 5, 2, "VideoOutput"); + + // 5.3 types + // Nothing changed, but adding "import QtMultimedia 5.3" in QML will fail unless at +@@ -106,13 +106,13 @@ public: + + // 5.4 types + qmlRegisterSingletonType(uri, 5, 4, "QtMultimedia", multimedia_global_object); +- qmlRegisterRevision(uri, 5, 4); ++ qmlRegisterType(uri, 5, 4, "Camera"); + qmlRegisterUncreatableType(uri, 5, 4, "CameraViewfinder", + trUtf8("CameraViewfinder is provided by Camera")); + + // 5.5 types + qmlRegisterUncreatableType(uri, 5, 5, "CameraImageProcessing", trUtf8("CameraImageProcessing is provided by Camera")); +- qmlRegisterRevision(uri, 5, 5); ++ qmlRegisterType(uri, 5, 5, "Camera"); + + qmlRegisterType(); + qmlRegisterType(); +diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes +index d01c988..53d7cb4 100644 +--- a/src/imports/multimedia/plugins.qmltypes ++++ b/src/imports/multimedia/plugins.qmltypes +@@ -1,4 +1,4 @@ +-import QtQuick.tooling 1.1 ++import QtQuick.tooling 1.2 + + // This file describes the plugin-supplied types contained in the library. + // It is used for QML tooling purposes only. +@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1 + // 'qmlplugindump -nonrelocatable QtMultimedia 5.5' + + Module { ++ dependencies: ["QtQuick 2.0"] + Component { + name: "QAbstractVideoFilter" + prototype: "QObject" +@@ -244,8 +245,12 @@ Module { + Component { + name: "QDeclarativeCamera" + prototype: "QObject" +- exports: ["QtMultimedia/Camera 5.0"] +- exportMetaObjectRevisions: [0] ++ exports: [ ++ "QtMultimedia/Camera 5.0", ++ "QtMultimedia/Camera 5.4", ++ "QtMultimedia/Camera 5.5" ++ ] ++ exportMetaObjectRevisions: [0, 1, 2] + Enum { + name: "Position" + values: { +@@ -517,7 +522,7 @@ Module { + name: "supportedViewfinderFrameRateRanges" + revision: 2 + type: "QJSValue" +- Parameter { name: "resolution"; type: "QSize" } ++ Parameter { name: "resolution"; type: "QJSValue" } + } + Method { name: "supportedViewfinderFrameRateRanges"; revision: 2; type: "QJSValue" } + } +@@ -1497,8 +1502,11 @@ Module { + name: "QDeclarativeVideoOutput" + defaultProperty: "data" + prototype: "QQuickItem" +- exports: ["QtMultimedia/VideoOutput 5.0"] +- exportMetaObjectRevisions: [0] ++ exports: [ ++ "QtMultimedia/VideoOutput 5.0", ++ "QtMultimedia/VideoOutput 5.2" ++ ] ++ exportMetaObjectRevisions: [0, 2] + Enum { + name: "FillMode" + values: { +-- +1.9.3 + diff --git a/0010-Fix-signal-slot-declaration-in-QVideoOutputOrientati.patch b/0010-Fix-signal-slot-declaration-in-QVideoOutputOrientati.patch new file mode 100644 index 0000000..ee8e688 --- /dev/null +++ b/0010-Fix-signal-slot-declaration-in-QVideoOutputOrientati.patch @@ -0,0 +1,32 @@ +From 0cf41ef53f7b336509ed7d1ae6518655276af70f Mon Sep 17 00:00:00 2001 +From: Yoann Lopes +Date: Tue, 29 Sep 2015 16:03:15 +0200 +Subject: [PATCH 10/11] Fix signal/slot declaration in + QVideoOutputOrientationHandler. + +Change-Id: I03cdd677feaf06ac2d61682cab46232f983e6494 +Reviewed-by: Christian Stromme +--- + src/multimedia/video/qvideooutputorientationhandler_p.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/multimedia/video/qvideooutputorientationhandler_p.h b/src/multimedia/video/qvideooutputorientationhandler_p.h +index 14a0c4a..28629ad 100644 +--- a/src/multimedia/video/qvideooutputorientationhandler_p.h ++++ b/src/multimedia/video/qvideooutputorientationhandler_p.h +@@ -48,10 +48,10 @@ public: + + int currentOrientation() const; + +-signals: ++Q_SIGNALS: + void orientationChanged(int angle); + +-private slots: ++private Q_SLOTS: + void screenOrientationChanged(Qt::ScreenOrientation orientation); + + private: +-- +1.9.3 + diff --git a/0011-GStreamer-fix-compilation-with-version-0.10.31.patch b/0011-GStreamer-fix-compilation-with-version-0.10.31.patch new file mode 100644 index 0000000..b66338d --- /dev/null +++ b/0011-GStreamer-fix-compilation-with-version-0.10.31.patch @@ -0,0 +1,445 @@ +From 3d3d2a4967ba079a3e6df82cdc89f839865e6649 Mon Sep 17 00:00:00 2001 +From: Yoann Lopes +Date: Fri, 16 Oct 2015 14:15:23 +0200 +Subject: [PATCH 11/11] GStreamer: fix compilation with version < 0.10.31. + +Qt 5.4 and earlier required GStreamer 0.10.24 as minimum version. +Qt 5.5 added code that requires 0.10.31, this code is now ifdef'd +and we now support again 0.10.24. + +Task-number: QTBUG-48353 +Change-Id: Ie708a33c0515874b003ce26a3400475075d316ca +Reviewed-by: Christian Stromme +--- + src/gsttools/qgstreamervideooverlay.cpp | 15 +++-- + src/gsttools/qgstutils.cpp | 69 +++++++++++++++++++++- + src/gsttools/qvideosurfacegstsink.cpp | 31 +++++++++- + src/multimedia/gsttools_headers/qgstutils_p.h | 2 + + .../gsttools_headers/qvideosurfacegstsink_p.h | 5 ++ + .../qgstreameraudiodecoderserviceplugin.cpp | 10 +++- + .../qgstreamercapturemetadatacontrol.cpp | 2 - + .../qgstreamercaptureserviceplugin.cpp | 7 +++ + .../mediacapture/qgstreamercapturesession.cpp | 16 ++--- + .../mediaplayer/qgstreamermetadataprovider.cpp | 5 +- + .../mediaplayer/qgstreamerplayerserviceplugin.cpp | 7 +++ + .../mediaplayer/qgstreamerplayersession.cpp | 8 +-- + 12 files changed, 147 insertions(+), 30 deletions(-) + +diff --git a/src/gsttools/qgstreamervideooverlay.cpp b/src/gsttools/qgstreamervideooverlay.cpp +index 1dcedbc..06f93ef 100644 +--- a/src/gsttools/qgstreamervideooverlay.cpp ++++ b/src/gsttools/qgstreamervideooverlay.cpp +@@ -148,9 +148,7 @@ GstElement *QGstreamerVideoOverlay::findBestVideoSink() const + + // 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, +- GST_RANK_MARGINAL); +- ++ GList *list = qt_gst_video_sinks(); + for (GList *item = list; item != NULL; item = item->next) { + GstElementFactory *f = GST_ELEMENT_FACTORY(item->data); + +@@ -242,12 +240,17 @@ void QGstreamerVideoOverlay::setRenderRectangle(const QRect &rect) + h = rect.height(); + } + +-#if !GST_CHECK_VERSION(1,0,0) ++#if GST_CHECK_VERSION(1,0,0) ++ if (m_videoSink && GST_IS_VIDEO_OVERLAY(m_videoSink)) ++ gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(m_videoSink), x, y, w, h); ++#elif GST_CHECK_VERSION(0, 10, 29) + if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) + gst_x_overlay_set_render_rectangle(GST_X_OVERLAY(m_videoSink), x, y , w , h); + #else +- if (m_videoSink && GST_IS_VIDEO_OVERLAY(m_videoSink)) +- gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(m_videoSink), x, y, w, h); ++ Q_UNUSED(x) ++ Q_UNUSED(y) ++ Q_UNUSED(w) ++ Q_UNUSED(h) + #endif + } + +diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp +index b13038c..50a5623 100644 +--- a/src/gsttools/qgstutils.cpp ++++ b/src/gsttools/qgstutils.cpp +@@ -774,6 +774,7 @@ QSet QGstUtils::supportedMimeTypes(bool (*isValidFactory)(GstElementFac + return supportedMimeTypes; + } + ++#if GST_CHECK_VERSION(1, 0, 0) + namespace { + + struct ColorFormat { QImage::Format imageFormat; GstVideoFormat gstFormat; }; +@@ -786,6 +787,7 @@ static const ColorFormat qt_colorLookup[] = + }; + + } ++#endif + + #if GST_CHECK_VERSION(1,0,0) + QImage QGstUtils::bufferToImage(GstBuffer *buffer, const GstVideoInfo &videoInfo) +@@ -1212,6 +1214,7 @@ void QGstUtils::setMetaData(GstElement *element, const QMap(g_type_class_peek_parent(g_class)); + +- GstVideoSinkClass *video_sink_class = reinterpret_cast(g_class); +- video_sink_class->show_frame = QVideoSurfaceGstSink::show_frame; +- + GstBaseSinkClass *base_sink_class = reinterpret_cast(g_class); + base_sink_class->get_caps = QVideoSurfaceGstSink::get_caps; + base_sink_class->set_caps = QVideoSurfaceGstSink::set_caps; +@@ -387,6 +384,14 @@ void QVideoSurfaceGstSink::class_init(gpointer g_class, gpointer class_data) + base_sink_class->stop = QVideoSurfaceGstSink::stop; + base_sink_class->unlock = QVideoSurfaceGstSink::unlock; + ++#if GST_CHECK_VERSION(0, 10, 25) ++ GstVideoSinkClass *video_sink_class = reinterpret_cast(g_class); ++ video_sink_class->show_frame = QVideoSurfaceGstSink::show_frame; ++#else ++ base_sink_class->preroll = QVideoSurfaceGstSink::preroll; ++ base_sink_class->render = QVideoSurfaceGstSink::render; ++#endif ++ + GstElementClass *element_class = reinterpret_cast(g_class); + element_class->change_state = QVideoSurfaceGstSink::change_state; + +@@ -674,10 +679,30 @@ gboolean QVideoSurfaceGstSink::unlock(GstBaseSink *base) + return TRUE; + } + ++#if GST_CHECK_VERSION(0, 10, 25) + GstFlowReturn QVideoSurfaceGstSink::show_frame(GstVideoSink *base, GstBuffer *buffer) + { + VO_SINK(base); + return sink->delegate->render(buffer); + } ++#else ++GstFlowReturn QVideoSurfaceGstSink::preroll(GstBaseSink *base, GstBuffer *buffer) ++{ ++ VO_SINK(base); ++ gboolean showPrerollFrame = true; ++ g_object_get(G_OBJECT(sink), "show-preroll-frame", &showPrerollFrame, NULL); ++ ++ if (showPrerollFrame) ++ return sink->delegate->render(buffer); ++ ++ return GST_FLOW_OK; ++} ++ ++GstFlowReturn QVideoSurfaceGstSink::render(GstBaseSink *base, GstBuffer *buffer) ++{ ++ VO_SINK(base); ++ return sink->delegate->render(buffer); ++} ++#endif + + QT_END_NAMESPACE +diff --git a/src/multimedia/gsttools_headers/qgstutils_p.h b/src/multimedia/gsttools_headers/qgstutils_p.h +index 31fb858..cf677c3 100644 +--- a/src/multimedia/gsttools_headers/qgstutils_p.h ++++ b/src/multimedia/gsttools_headers/qgstutils_p.h +@@ -150,6 +150,8 @@ gboolean qt_gst_element_query_position(GstElement *element, GstFormat format, gi + gboolean qt_gst_element_query_duration(GstElement *element, GstFormat format, gint64 *cur); + GstCaps *qt_gst_caps_normalize(GstCaps *caps); + const gchar *qt_gst_element_get_factory_name(GstElement *element); ++gboolean qt_gst_caps_can_intersect(const GstCaps * caps1, const GstCaps * caps2); ++GList *qt_gst_video_sinks(); + + QDebug operator <<(QDebug debug, GstCaps *caps); + +diff --git a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h +index a1ef561..9c04b98 100644 +--- a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h ++++ b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h +@@ -157,7 +157,12 @@ private: + + static gboolean unlock(GstBaseSink *sink); + ++#if GST_CHECK_VERSION(0, 10, 25) + static GstFlowReturn show_frame(GstVideoSink *sink, GstBuffer *buffer); ++#else ++ static GstFlowReturn preroll(GstBaseSink *sink, GstBuffer *buffer); ++ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer); ++#endif + + private: + QVideoSurfaceGstDelegate *delegate; +diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp +index 6afee94..f919bb1 100644 +--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp ++++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp +@@ -70,9 +70,15 @@ QMultimedia::SupportEstimate QGstreamerAudioDecoderServicePlugin::hasSupport(con + + 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); ++ || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER ++ | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO); ++#else ++ return (factory ++ && (qstrcmp(factory->details.klass, "Codec/Decoder/Audio") == 0 ++ || qstrcmp(factory->details.klass, "Codec/Demux") == 0)); ++#endif + } + + void QGstreamerAudioDecoderServicePlugin::updateSupportedMimeTypes() const +diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp +index 0018209..fca38ec 100644 +--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp ++++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp +@@ -77,9 +77,7 @@ static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys() + metadataKeys->insert(QMediaMetaData::AlbumTitle, GST_TAG_ALBUM); + metadataKeys->insert(QMediaMetaData::AlbumArtist, GST_TAG_ARTIST); + metadataKeys->insert(QMediaMetaData::ContributingArtist, GST_TAG_PERFORMER); +-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) + metadataKeys->insert(QMediaMetaData::Composer, GST_TAG_COMPOSER); +-#endif + //metadataKeys->insert(QMediaMetaData::Conductor, 0); + //metadataKeys->insert(QMediaMetaData::Lyrics, 0); + //metadataKeys->insert(QMediaMetaData::Mood, 0); +diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +index a9c66f8..8cbdb67 100644 +--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp ++++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +@@ -113,8 +113,15 @@ QMultimedia::SupportEstimate QGstreamerCaptureServicePlugin::hasSupport(const QS + + 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 (factory ++ && (qstrcmp(factory->details.klass, "Codec/Encoder/Audio") == 0 ++ || qstrcmp(factory->details.klass, "Codec/Encoder/Video") == 0 ++ || qstrcmp(factory->details.klass, "Codec/Muxer") == 0 )); ++#endif + } + + void QGstreamerCaptureServicePlugin::updateSupportedMimeTypes() const +diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp +index 77d8987..31ffa50 100644 +--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp ++++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp +@@ -628,12 +628,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo + } + + dumpGraph( QString("rebuild_graph_%1_%2").arg(m_pipelineMode).arg(newMode) ); ++#ifdef QT_GST_CAPTURE_DEBUG + if (m_encodeBin) { + QString fileName = QString("rebuild_graph_encode_%1_%2").arg(m_pipelineMode).arg(newMode); +-#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) +- _gst_debug_bin_to_dot_file(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1()); +-#endif ++ GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1()); + } ++#endif + + if (ok) { + addAudioBufferProbe(); +@@ -657,12 +657,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo + + void QGstreamerCaptureSession::dumpGraph(const QString &fileName) + { +-#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) +- _gst_debug_bin_to_dot_file(GST_BIN(m_pipeline), +- GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES), +- fileName.toLatin1()); ++#ifdef QT_GST_CAPTURE_DEBUG ++ GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_pipeline), ++ GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES), ++ fileName.toLatin1()); + #else +- Q_UNUSED(fileName); ++ Q_UNUSED(fileName) + #endif + } + +diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp +index ac0fe2a..fdf4306 100644 +--- a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp ++++ b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp +@@ -76,13 +76,10 @@ static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys() + + // Music + metadataKeys->insert(GST_TAG_ALBUM, QMediaMetaData::AlbumTitle); +-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 25) ++#if GST_CHECK_VERSION(0, 10, 25) + metadataKeys->insert(GST_TAG_ALBUM_ARTIST, QMediaMetaData::AlbumArtist); + #endif + metadataKeys->insert(GST_TAG_ARTIST, QMediaMetaData::ContributingArtist); +-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) +- metadataKeys->insert(GST_TAG_COMPOSER, QMediaMetaData::Composer); +-#endif + //metadataKeys->insert(0, QMediaMetaData::Conductor); + //metadataKeys->insert(0, QMediaMetaData::Lyrics); + //metadataKeys->insert(0, QMediaMetaData::Mood); +diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp +index 004d561..b895c4d 100644 +--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp ++++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp +@@ -83,8 +83,15 @@ QMultimedia::SupportEstimate QGstreamerPlayerServicePlugin::hasSupport(const QSt + + 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 (factory ++ && (qstrcmp(factory->details.klass, "Codec/Decoder/Audio") == 0 ++ || qstrcmp(factory->details.klass, "Codec/Decoder/Video") == 0 ++ || qstrcmp(factory->details.klass, "Codec/Demux") == 0 )); ++#endif + } + + void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const +diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp +index 4dce341..c3d20e7 100644 +--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp ++++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp +@@ -388,7 +388,7 @@ QMediaTimeRange QGstreamerPlayerSession::availablePlaybackRanges() const + if (duration() <= 0) + return ranges; + +-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 31) ++#if GST_CHECK_VERSION(0, 10, 31) + //GST_FORMAT_TIME would be more appropriate, but unfortunately it's not supported. + //with GST_FORMAT_PERCENT media is treated as encoded with constant bitrate. + GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT); +@@ -1637,7 +1637,7 @@ void QGstreamerPlayerSession::updateMuted() + } + } + +-#if (GST_VERSION_MAJOR == 0) && ((GST_VERSION_MINOR < 10) || (GST_VERSION_MICRO < 33)) ++#if !GST_CHECK_VERSION(0, 10, 33) + static gboolean factory_can_src_any_caps (GstElementFactory *factory, const GstCaps *caps) + { + GList *templates; +@@ -1653,7 +1653,7 @@ static gboolean factory_can_src_any_caps (GstElementFactory *factory, const GstC + if (templ->direction == GST_PAD_SRC) { + GstCaps *templcaps = gst_static_caps_get(&templ->static_caps); + +- if (gst_caps_can_intersect(caps, templcaps)) { ++ if (qt_gst_caps_can_intersect(caps, templcaps)) { + gst_caps_unref(templcaps); + return TRUE; + } +@@ -1685,7 +1685,7 @@ GstAutoplugSelectResult QGstreamerPlayerSession::handleAutoplugSelect(GstBin *bi + GstCaps *sinkCaps = gst_pad_get_caps(sinkPad); + #endif + +-#if (GST_VERSION_MAJOR == 0) && ((GST_VERSION_MINOR < 10) || (GST_VERSION_MICRO < 33)) ++#if !GST_CHECK_VERSION(0, 10, 33) + if (!factory_can_src_any_caps(factory, sinkCaps)) + #else + if (!gst_element_factory_can_src_any_caps(factory, sinkCaps)) +-- +1.9.3 + diff --git a/qt5-qtmultimedia.spec b/qt5-qtmultimedia.spec index 1dc9246..8e199d1 100644 --- a/qt5-qtmultimedia.spec +++ b/qt5-qtmultimedia.spec @@ -19,9 +19,7 @@ ## define prerelease rc1 -%if (0%{?fedora} && 0%{?fedora} < 21) || (0%{?rhel} && 0%{?rhel} > 6) %global gst 0.10 -%endif %if 0%{?fedora} > 20 %global gst 1.0 @@ -30,16 +28,17 @@ Summary: Qt5 - Multimedia support Name: qt5-%{qt_module} Version: 5.5.1 -Release: 3%{?dist} +Release: 4%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details 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 +## upstream patches +Patch7: 0007-Fixed-revisions-of-camera-related-meta-objects.patch +Patch10: 0010-Fix-signal-slot-declaration-in-QVideoOutputOrientati.patch +Patch11: 0011-GStreamer-fix-compilation-with-version-0.10.31.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -48,7 +47,7 @@ BuildRequires: pkgconfig(alsa) %if "%{?gst}" == "0.10" BuildRequires: pkgconfig(gstreamer-interfaces-0.10) %endif -BuildRequires: pkgconfig(gstreamer-%{gst}) >= 0.10.31 +BuildRequires: pkgconfig(gstreamer-%{gst}) >= 0.10.24 BuildRequires: pkgconfig(gstreamer-app-%{gst}) BuildRequires: pkgconfig(gstreamer-audio-%{gst}) BuildRequires: pkgconfig(gstreamer-base-%{gst}) @@ -99,7 +98,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} -%patch1 -p1 -b .el6 +%patch7 -p1 -b .0007 +%patch10 -p1 -b .0010 +%patch11 -p1 -b .0011 %build @@ -196,6 +197,9 @@ popd %changelog +* Mon Oct 26 2015 Rex Dieter 5.5.1-4 +- pull in upstream fixes, QTBUG-48939 in particular + * Thu Oct 22 2015 Rex Dieter 5.5.1-3 - drop gst support on el6 (QTBUG-48939) diff --git a/qtmultimedia-opensource-src-5.5.1-el6.patch b/qtmultimedia-opensource-src-5.5.1-el6.patch deleted file mode 100644 index 4126544..0000000 --- a/qtmultimedia-opensource-src-5.5.1-el6.patch +++ /dev/null @@ -1,97 +0,0 @@ -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