summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediacapture
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-12-14 16:53:36 +0100
committerLars Knoll <lars.knoll@qt.io>2021-01-20 15:08:51 +0000
commit9c2aecc77b4a4d9734024642556644ab9ca14b7f (patch)
tree507105a5a1d588b72d0fa5926c70a979f29be578 /src/plugins/gstreamer/mediacapture
parent397cb94d6882940114cb6c96a88e8ac0b64203a4 (diff)
Remove gstreamer-0.10 code paths
In fact, require gstreamer 1.12 as the minimum version. Change-Id: Iad7239dc3907ffceca1454b80f982f8f04aea518 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture')
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp7
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp12
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h2
3 files changed, 0 insertions, 21 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
index 2a2dec60a..65f885d80 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
@@ -119,15 +119,8 @@ 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 4363f6d3b..26d0999db 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp
@@ -358,11 +358,7 @@ GstElement *QGstreamerCaptureSession::buildVideoPreview()
void QGstreamerCaptureSession::probeCaps(GstCaps *caps)
{
-#if GST_CHECK_VERSION(1,0,0)
gst_video_info_from_caps(&m_previewInfo, caps);
-#else
- Q_UNUSED(caps);
-#endif
}
bool QGstreamerCaptureSession::probeBuffer(GstBuffer *buffer)
@@ -378,11 +374,7 @@ bool QGstreamerCaptureSession::probeBuffer(GstBuffer *buffer)
m_passImage = false;
-#if GST_CHECK_VERSION(1,0,0)
QImage img = QGstUtils::bufferToImage(buffer, m_previewInfo);
-#else
- QImage img = QGstUtils::bufferToImage(buffer);
-#endif
if (img.isNull())
return true;
@@ -415,15 +407,11 @@ static gboolean saveImageFilter(GstElement *element,
if (!fileName.isEmpty()) {
QFile f(fileName);
if (f.open(QFile::WriteOnly)) {
-#if GST_CHECK_VERSION(1,0,0)
GstMapInfo info;
if (gst_buffer_map(buffer, &info, GST_MAP_READ)) {
f.write(reinterpret_cast<const char *>(info.data), info.size);
gst_buffer_unmap(buffer, &info);
}
-#else
- f.write(reinterpret_cast<const char *>(buffer->data), buffer->size);
-#endif
f.close();
static QMetaMethod savedSignal = QMetaMethod::fromSignal(&QGstreamerCaptureSession::imageSaved);
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
index e0c9107a7..4e54ecc15 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
@@ -228,9 +228,7 @@ private:
GstElement *m_encodeBin;
-#if GST_CHECK_VERSION(1,0,0)
GstVideoInfo m_previewInfo;
-#endif
public:
bool m_passImage;