Update to 5.4.1

This commit is contained in:
Jan Grulich 2015-02-24 16:40:41 +01:00
parent 50fa968627
commit a7e91cfce7
4 changed files with 482 additions and 566 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/qtmultimedia-opensource-src-5.3.2.tar.xz
/qtmultimedia-opensource-src-5.4.0.tar.xz
/qtmultimedia-opensource-src-5.4.1.tar.xz

View File

@ -1,102 +1,3 @@
From 108dda7a90bd0f0337358b0db47ae55acd16dea6 Mon Sep 17 00:00:00 2001
From: Yoann Lopes <yoann.lopes@theqtcompany.com>
Date: Thu, 20 Nov 2014 17:54:18 +0100
Subject: [PATCH 06/12] GStreamer: port to 1.0.
0.10 is still used by default.
To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake
for qtmultimedia.pro.
Contributions from:
Andrew den Exter <andrew.den.exter@qinetic.com.au>
Ilya Smelykh <ilya@videoexpertsgroup.com>
Jim Hodapp <jim.hodapp@canonical.com>
Sergio Schvezov <sergio.schvezov@canonical.com>
Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
---
config.tests/gstreamer/gstreamer.pro | 11 +-
config.tests/gstreamer_appsrc/gstreamer_appsrc.pro | 13 +-
.../gstreamer_encodingprofiles.pro | 13 +-
.../gstreamer_photography.pro | 15 +-
.../declarative-camera/declarative-camera.qml | 2 +-
qtmultimedia.pro | 26 +-
src/gsttools/gsttools.pro | 72 +-
src/gsttools/qgstappsrc.cpp | 29 +-
src/gsttools/qgstcodecsinfo.cpp | 8 +-
src/gsttools/qgstreameraudioprobecontrol.cpp | 47 +-
src/gsttools/qgstreamerbufferprobe.cpp | 174 +++++
src/gsttools/qgstreamerbushelper.cpp | 8 +
src/gsttools/qgstreamermirtexturerenderer.cpp | 351 +++++++++
src/gsttools/qgstreamervideoprobecontrol.cpp | 58 +-
src/gsttools/qgstreamervideorenderer.cpp | 3 +-
src/gsttools/qgstreamervideowidget.cpp | 29 +-
src/gsttools/qgstreamervideowindow.cpp | 105 ++-
src/gsttools/qgstutils.cpp | 785 ++++++++++++++++++++-
src/gsttools/qgstvideobuffer.cpp | 70 +-
src/gsttools/qgstvideorendererplugin.cpp | 53 ++
src/gsttools/qgstvideorenderersink.cpp | 605 ++++++++++++++++
src/gsttools/qvideosurfacegstsink.cpp | 232 +-----
src/multimedia/gsttools_headers/qgstappsrc_p.h | 3 +
.../qgstreameraudioprobecontrol_p.h | 13 +-
.../gsttools_headers/qgstreamerbufferprobe_p.h | 86 +++
.../qgstreamermirtexturerenderer_p.h | 102 +++
.../qgstreamervideoprobecontrol_p.h | 23 +-
.../gsttools_headers/qgstreamervideowindow_p.h | 9 +-
src/multimedia/gsttools_headers/qgstutils_p.h | 55 +-
.../gsttools_headers/qgstvideobuffer_p.h | 23 +-
.../gsttools_headers/qgstvideorendererplugin_p.h | 111 +++
.../gsttools_headers/qgstvideorenderersink_p.h | 183 +++++
.../gsttools_headers/qvideosurfacegstsink_p.h | 19 +-
src/multimedia/multimedia.pro | 2 +
.../qgstreameraudiodecoderserviceplugin.cpp | 89 +--
.../audiodecoder/qgstreameraudiodecodersession.cpp | 36 +-
.../audiodecoder/qgstreameraudiodecodersession.h | 2 +-
src/plugins/gstreamer/camerabin/camerabin.pro | 2 +-
.../gstreamer/camerabin/camerabincontainer.cpp | 2 +-
.../gstreamer/camerabin/camerabincontrol.cpp | 7 +-
.../gstreamer/camerabin/camerabinexposure.cpp | 8 +-
src/plugins/gstreamer/camerabin/camerabinflash.cpp | 8 +-
src/plugins/gstreamer/camerabin/camerabinfocus.cpp | 15 +-
.../gstreamer/camerabin/camerabinimagecapture.cpp | 146 ++--
.../gstreamer/camerabin/camerabinimagecapture.h | 50 +-
.../gstreamer/camerabin/camerabinimageencoder.cpp | 1 -
.../camerabin/camerabinimageprocessing.cpp | 8 +-
.../gstreamer/camerabin/camerabinimageprocessing.h | 7 +-
.../gstreamer/camerabin/camerabinmetadata.cpp | 5 +-
.../gstreamer/camerabin/camerabinrecorder.cpp | 9 +-
.../gstreamer/camerabin/camerabinservice.cpp | 7 +-
.../gstreamer/camerabin/camerabinsession.cpp | 339 ++++-----
src/plugins/gstreamer/common.pri | 22 +-
src/plugins/gstreamer/gstreamer.pro | 4 +-
.../gstreamer/mediacapture/mediacapturecamera.json | 2 +-
.../mediacapture/qgstreameraudioencode.cpp | 3 +-
.../mediacapture/qgstreamercaptureservice.cpp | 58 +-
.../mediacapture/qgstreamercaptureservice.h | 3 +
.../qgstreamercaptureserviceplugin.cpp | 90 +--
.../mediacapture/qgstreamercapturesession.cpp | 285 +++-----
.../mediacapture/qgstreamercapturesession.h | 19 +-
.../mediacapture/qgstreamervideoencode.cpp | 39 +-
src/plugins/gstreamer/mediaplayer/mediaplayer.pro | 1 -
.../mediaplayer/qgstreamerplayercontrol.cpp | 1 -
.../mediaplayer/qgstreamerplayerservice.cpp | 65 +-
.../mediaplayer/qgstreamerplayerservice.h | 5 +
.../mediaplayer/qgstreamerplayerserviceplugin.cpp | 88 +--
.../mediaplayer/qgstreamerplayersession.cpp | 238 ++++---
.../mediaplayer/qgstreamerplayersession.h | 19 +-
.../qcamerabackend/tst_qcamerabackend.cpp | 10 +-
.../tst_qmediaplayerbackend.cpp | 4 +-
71 files changed, 3661 insertions(+), 1374 deletions(-)
create mode 100644 src/gsttools/qgstreamerbufferprobe.cpp
create mode 100644 src/gsttools/qgstreamermirtexturerenderer.cpp
create mode 100644 src/gsttools/qgstvideorendererplugin.cpp
create mode 100644 src/gsttools/qgstvideorenderersink.cpp
create mode 100644 src/multimedia/gsttools_headers/qgstreamerbufferprobe_p.h
create mode 100644 src/multimedia/gsttools_headers/qgstreamermirtexturerenderer_p.h
create mode 100644 src/multimedia/gsttools_headers/qgstvideorendererplugin_p.h
create mode 100644 src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
diff --git a/config.tests/gstreamer/gstreamer.pro b/config.tests/gstreamer/gstreamer.pro
index 02a7e34..6b9843a 100644
--- a/config.tests/gstreamer/gstreamer.pro
@ -1512,7 +1413,7 @@ index a373dcc..8011349 100644
GstElement *QGstreamerVideoWindow::videoSink()
diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp
index 556fc03..65124c9 100644
index 1281d3f..86d9404 100644
--- a/src/gsttools/qgstutils.cpp
+++ b/src/gsttools/qgstutils.cpp
@@ -40,7 +40,14 @@
@ -1709,7 +1610,7 @@ index 556fc03..65124c9 100644
}
void QGstUtils::initializeGst()
@@ -576,10 +682,629 @@ QByteArray QGstUtils::cameraDriver(const QString &device, GstElementFactory *fac
@@ -578,10 +684,629 @@ QByteArray QGstUtils::cameraDriver(const QString &device, GstElementFactory *fac
return QByteArray();
}
@ -2340,7 +2241,7 @@ index 556fc03..65124c9 100644
gst_object_ref_sink(object);
#else
g_return_if_fail (GST_IS_OBJECT(object));
@@ -595,4 +1320,50 @@ void qt_gst_object_ref_sink(gpointer object)
@@ -597,4 +1322,50 @@ void qt_gst_object_ref_sink(gpointer object)
#endif
}
@ -5248,7 +5149,7 @@ index 969955f..388f2fd 100644
gst_object_unref(GST_OBJECT(factory));
return true;
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
index a4038c5..f916b58 100644
index 1ed663b..b62fbbf 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
@@ -140,8 +140,8 @@ CameraBinSession::CameraBinSession(GstElementFactory *sourceFactory, QObject *pa
@ -5366,11 +5267,12 @@ index a4038c5..f916b58 100644
}
return caps;
@@ -314,40 +289,40 @@ static GstCaps *resolutionToCaps(const QSize &resolution, const QPair<int, int>
@@ -314,28 +289,29 @@ static GstCaps *resolutionToCaps(const QSize &resolution, const QPair<int, int>
void CameraBinSession::setupCaptureResolution()
{
QSize resolution = m_imageEncodeControl->imageSettings().resolution();
- if (!resolution.isEmpty()) {
+ if (!resolution.isEmpty())
+ {
GstCaps *caps = resolutionToCaps(resolution);
#if CAMERABIN_DEBUG
@ -5406,6 +5308,11 @@ index a4038c5..f916b58 100644
+ gst_caps_unref(caps);
}
GstElement *mfw_v4lsrc = 0;
@@ -349,15 +325,14 @@ void CameraBinSession::setupCaptureResolution()
}
}
- resolution = m_viewfinderSettingsControl->resolution();
- if (!resolution.isEmpty()) {
+ if (!viewfinderResolution.isEmpty())
@ -5418,14 +5325,22 @@ index a4038c5..f916b58 100644
#endif
g_object_set(m_camerabin, VIEWFINDER_CAPS_PROPERTY, caps, NULL);
- gst_caps_unref(caps);
-
if (mfw_v4lsrc) {
int capMode = 0;
if (resolution == QSize(320, 240))
@@ -372,8 +347,8 @@ void CameraBinSession::setupCaptureResolution()
capMode = 5;
g_object_set(G_OBJECT(mfw_v4lsrc), "capture-mode", capMode, NULL);
}
- } else {
- g_object_set(m_camerabin, VIEWFINDER_CAPS_PROPERTY, NULL, NULL);
+ if (caps)
+ gst_caps_unref(caps);
+ if (caps)
+ gst_caps_unref(caps);
}
if (m_videoEncoder)
@@ -363,13 +338,17 @@ void CameraBinSession::setAudioCaptureCaps()
const qreal maxFps = m_viewfinderSettingsControl->maximumFrameRate();
@@ -399,13 +374,17 @@ void CameraBinSession::setAudioCaptureCaps()
if (sampleRate == -1 && channelCount == -1)
return;
@ -5444,7 +5359,7 @@ index a4038c5..f916b58 100644
if (sampleRate != -1)
gst_structure_set(structure, "rate", G_TYPE_INT, sampleRate, NULL);
if (channelCount != -1)
@@ -760,7 +739,7 @@ qint64 CameraBinSession::duration() const
@@ -796,7 +775,7 @@ qint64 CameraBinSession::duration() const
if (fileSink) {
GstFormat format = GST_FORMAT_TIME;
gint64 duration = 0;
@ -5453,7 +5368,7 @@ index a4038c5..f916b58 100644
gst_object_unref(GST_OBJECT(fileSink));
if (ret)
return duration / 1000000;
@@ -795,129 +774,57 @@ void CameraBinSession::setMetaData(const QMap<QByteArray, QVariant> &data)
@@ -831,129 +810,57 @@ void CameraBinSession::setMetaData(const QMap<QByteArray, QVariant> &data)
{
m_metaData = data;
@ -5622,7 +5537,7 @@ index a4038c5..f916b58 100644
m_cameraFocusControl->handleFocusMessage(gm);
#endif
}
@@ -1109,20 +1016,12 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
@@ -1145,20 +1052,12 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
if (frameSize.isEmpty()) {
caps = gst_caps_copy(supportedCaps);
} else {
@ -5649,7 +5564,7 @@ index a4038c5..f916b58 100644
caps = gst_caps_intersect(supportedCaps, filter);
gst_caps_unref(filter);
@@ -1133,7 +1032,7 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
@@ -1169,7 +1068,7 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
caps = gst_caps_make_writable(caps);
for (uint i=0; i<gst_caps_get_size(caps); i++) {
GstStructure *structure = gst_caps_get_structure(caps, i);
@ -5658,7 +5573,7 @@ index a4038c5..f916b58 100644
const GValue *oldRate = gst_structure_get_value(structure, "framerate");
GValue rate;
memset(&rate, 0, sizeof(rate));
@@ -1142,8 +1041,11 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
@@ -1178,8 +1077,11 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
gst_structure_remove_all_fields(structure);
gst_structure_set_value(structure, "framerate", &rate);
}
@ -5671,7 +5586,7 @@ index a4038c5..f916b58 100644
for (uint i=0; i<gst_caps_get_size(caps); i++) {
GstStructure *structure = gst_caps_get_structure(caps, i);
@@ -1154,7 +1056,7 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
@@ -1190,7 +1092,7 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
qSort(res.begin(), res.end(), rateLessThan);
#if CAMERABIN_DEBUG
@ -5680,7 +5595,7 @@ index a4038c5..f916b58 100644
qDebug() << res;
#endif
@@ -1213,31 +1115,24 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
@@ -1249,31 +1151,24 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
SUPPORTED_IMAGE_CAPTURE_CAPS_PROPERTY : SUPPORTED_VIDEO_CAPTURE_CAPS_PROPERTY,
&supportedCaps, NULL);
@ -5721,7 +5636,7 @@ index a4038c5..f916b58 100644
caps = gst_caps_intersect(supportedCaps, filter);
gst_caps_unref(filter);
}
@@ -1247,7 +1142,7 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
@@ -1283,7 +1178,7 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
caps = gst_caps_make_writable(caps);
for (uint i=0; i<gst_caps_get_size(caps); i++) {
GstStructure *structure = gst_caps_get_structure(caps, i);
@ -5730,7 +5645,7 @@ index a4038c5..f916b58 100644
const GValue *oldW = gst_structure_get_value(structure, "width");
const GValue *oldH = gst_structure_get_value(structure, "height");
GValue w;
@@ -1262,7 +1157,13 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
@@ -1298,7 +1193,13 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
gst_structure_set_value(structure, "width", &w);
gst_structure_set_value(structure, "height", &h);
}
@ -7643,6 +7558,3 @@ index 0a1441c..ddf438b 100644
QVERIFY2(qAbs(elapsed) < (qint64)500, QByteArray::number(elapsed).constData());
QCOMPARE(frame.width(), 160);
QCOMPARE(frame.height(), 120);
--
1.9.3

View File

@ -19,7 +19,7 @@
Summary: Qt5 - Multimedia support
Name: qt5-%{qt_module}
Version: 5.4.0
Version: 5.4.1
Release: 1%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
@ -199,6 +199,9 @@ popd
%changelog
* Tue Feb 24 2015 Jan Grulich <jgrulich@redhat.com> 5.4.1-1
- 5.4.1
* Thu Dec 11 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-1
- 5.4.0 (final) + backported gst1 support from dev/ branch

View File

@ -1 +1 @@
3a6a415813b54a54cf283a5e2906e012 qtmultimedia-opensource-src-5.4.0.tar.xz
7412a5c62da71b44b9f29e29fdc6af4d qtmultimedia-opensource-src-5.4.1.tar.xz