summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp')
-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