summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/audiodecoder
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-10-16 14:15:23 +0200
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-10-20 08:32:36 +0000
commit3d3d2a4967ba079a3e6df82cdc89f839865e6649 (patch)
tree360305944a20b4637fde5f96ac77fed5be3e2aa6 /src/plugins/gstreamer/audiodecoder
parent0cf41ef53f7b336509ed7d1ae6518655276af70f (diff)
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 <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/gstreamer/audiodecoder')
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
index 6afee9433..f919bb1f7 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