From 1918c7bfdfaef254c867d0b827b13a3793c6aa90 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 20 Sep 2013 16:21:26 +0200 Subject: [PATCH 1/5] Fix "conversion from 'double' to 'float'" warnings on MSVC2010. Change-Id: I209d76fa2d87ad2eb540c750b8c4efb865441aae Reviewed-by: Friedemann Kleint --- src/imports/multimedia/qsgvideonode_i420.cpp | 24 +++++++++---------- .../qpaintervideosurface.cpp | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/imports/multimedia/qsgvideonode_i420.cpp b/src/imports/multimedia/qsgvideonode_i420.cpp index dc0b60bb..f91fb5a0 100644 --- a/src/imports/multimedia/qsgvideonode_i420.cpp +++ b/src/imports/multimedia/qsgvideonode_i420.cpp @@ -194,25 +194,25 @@ QSGVideoMaterial_YUV420::QSGVideoMaterial_YUV420(const QVideoSurfaceFormat &form switch (format.yCbCrColorSpace()) { case QVideoSurfaceFormat::YCbCr_JPEG: m_colorMatrix = QMatrix4x4( - 1.0, 0.000, 1.402, -0.701, - 1.0, -0.344, -0.714, 0.529, - 1.0, 1.772, 0.000, -0.886, - 0.0, 0.000, 0.000, 1.0000); + 1.0f, 0.000f, 1.402f, -0.701f, + 1.0f, -0.344f, -0.714f, 0.529f, + 1.0f, 1.772f, 0.000f, -0.886f, + 0.0f, 0.000f, 0.000f, 1.0000f); break; case QVideoSurfaceFormat::YCbCr_BT709: case QVideoSurfaceFormat::YCbCr_xvYCC709: m_colorMatrix = QMatrix4x4( - 1.164, 0.000, 1.793, -0.5727, - 1.164, -0.534, -0.213, 0.3007, - 1.164, 2.115, 0.000, -1.1302, - 0.0, 0.000, 0.000, 1.0000); + 1.164f, 0.000f, 1.793f, -0.5727f, + 1.164f, -0.534f, -0.213f, 0.3007f, + 1.164f, 2.115f, 0.000f, -1.1302f, + 0.0f, 0.000f, 0.000f, 1.0000f); break; default: //BT 601: m_colorMatrix = QMatrix4x4( - 1.164, 0.000, 1.596, -0.8708, - 1.164, -0.392, -0.813, 0.5296, - 1.164, 2.017, 0.000, -1.081, - 0.0, 0.000, 0.000, 1.0000); + 1.164f, 0.000f, 1.596f, -0.8708f, + 1.164f, -0.392f, -0.813f, 0.5296f, + 1.164f, 2.017f, 0.000f, -1.081f, + 0.0f, 0.000f, 0.000f, 1.0000f); } setFlag(Blending, false); diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp index d9ad0438..30ebbded 100644 --- a/src/multimediawidgets/qpaintervideosurface.cpp +++ b/src/multimediawidgets/qpaintervideosurface.cpp @@ -466,25 +466,25 @@ void QVideoSurfaceGLPainter::updateColors(int brightness, int contrast, int hue, switch (m_colorSpace) { case QVideoSurfaceFormat::YCbCr_JPEG: colorSpaceMatrix = QMatrix4x4( - 1.0, 0.000, 1.402, -0.701, - 1.0, -0.344, -0.714, 0.529, - 1.0, 1.772, 0.000, -0.886, - 0.0, 0.000, 0.000, 1.0000); + 1.0f, 0.000f, 1.402f, -0.701f, + 1.0f, -0.344f, -0.714f, 0.529f, + 1.0f, 1.772f, 0.000f, -0.886f, + 0.0f, 0.000f, 0.000f, 1.0000f); break; case QVideoSurfaceFormat::YCbCr_BT709: case QVideoSurfaceFormat::YCbCr_xvYCC709: colorSpaceMatrix = QMatrix4x4( - 1.164, 0.000, 1.793, -0.5727, - 1.164, -0.534, -0.213, 0.3007, - 1.164, 2.115, 0.000, -1.1302, - 0.0, 0.000, 0.000, 1.0000); + 1.164f, 0.000f, 1.793f, -0.5727f, + 1.164f, -0.534f, -0.213f, 0.3007f, + 1.164f, 2.115f, 0.000f, -1.1302f, + 0.0f, 0.000f, 0.000f, 1.0000f); break; default: //BT 601: colorSpaceMatrix = QMatrix4x4( - 1.164, 0.000, 1.596, -0.8708, - 1.164, -0.392, -0.813, 0.5296, - 1.164, 2.017, 0.000, -1.081, - 0.0, 0.000, 0.000, 1.0000); + 1.164f, 0.000f, 1.596f, -0.8708f, + 1.164f, -0.392f, -0.813f, 0.5296f, + 1.164f, 2.017f, 0.000f, -1.081f, + 0.0f, 0.000f, 0.000f, 1.0000f); } m_colorMatrix = m_colorMatrix * colorSpaceMatrix; From 2162d9a2cc8f6be43604382ef03047986f52c3ce Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 26 Sep 2013 11:51:49 +0200 Subject: [PATCH 2/5] Android: fix plugin json metadata. Change-Id: I0f2feca44843760df13a938d9190daf2d447d645 Reviewed-by: Christian Stromme --- src/plugins/android/src/android_mediaservice.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/src/android_mediaservice.json b/src/plugins/android/src/android_mediaservice.json index a12be52b..df4bccb2 100644 --- a/src/plugins/android/src/android_mediaservice.json +++ b/src/plugins/android/src/android_mediaservice.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource"] + "Keys": ["androidmultimedia"], + "Services": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource"] } From 6914aa76a4fb9490ff334fa83511d77569095993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 26 Sep 2013 14:26:25 +0200 Subject: [PATCH 3/5] Android: Make sure the OpenSL plugin is included on Android. Change-Id: Ic46dd8afe50250bb30754ce12eda57138d05b81d Reviewed-by: Yoann Lopes --- src/multimedia/multimedia.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro index 54c6e0a9..41a66687 100644 --- a/src/multimedia/multimedia.pro +++ b/src/multimedia/multimedia.pro @@ -61,7 +61,8 @@ ANDROID_LIB_DEPENDENCIES = \ ANDROID_BUNDLED_FILES += \ lib/libQt5MultimediaQuick_p.so MODULE_PLUGIN_TYPES = \ - mediaservice + mediaservice \ + audio win32:LIBS += -luuid From bd30595975e55dc051d91da6c6795cecf47e6feb Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Fri, 27 Sep 2013 12:09:32 +0200 Subject: [PATCH 4/5] VideoOutput: take the video format's scanLineDirection into account. Task-number: QTBUG-30442 Change-Id: Ic950d66cb35a937ccf3862089e0060819b6d6f34 Reviewed-by: Andy Nichols --- src/imports/multimedia/qdeclarativevideooutput_render.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/imports/multimedia/qdeclarativevideooutput_render.cpp b/src/imports/multimedia/qdeclarativevideooutput_render.cpp index 96b979bc..002f50a6 100644 --- a/src/imports/multimedia/qdeclarativevideooutput_render.cpp +++ b/src/imports/multimedia/qdeclarativevideooutput_render.cpp @@ -174,6 +174,12 @@ void QDeclarativeVideoRendererBackend::updateGeometry() totalHeight, totalWidth); } } + + if (videoSurface()->surfaceFormat().scanLineDirection() == QVideoSurfaceFormat::BottomToTop) { + qreal top = m_sourceTextureRect.top(); + m_sourceTextureRect.setTop(m_sourceTextureRect.bottom()); + m_sourceTextureRect.setBottom(top); + } } QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode, From 329d9d4563445d785284a02983e237ff1a07f5dd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 27 Sep 2013 16:39:28 +0200 Subject: [PATCH 5/5] Fix lupdate warning in playlistparser. playlistfileparser.cpp:278: Class 'PLSParser' lacks Q_OBJECT macro. Change-Id: I062bd90b7cd5de82683dc02c6a6400855982a163 Reviewed-by: Yoann Lopes --- src/multimedia/playback/playlistfileparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/multimedia/playback/playlistfileparser.cpp b/src/multimedia/playback/playlistfileparser.cpp index b7b65c98..03d84444 100644 --- a/src/multimedia/playback/playlistfileparser.cpp +++ b/src/multimedia/playback/playlistfileparser.cpp @@ -176,6 +176,7 @@ private: class PLSParser : public ParserBase { + Q_OBJECT public: PLSParser(QObject *parent) : ParserBase(parent) @@ -275,7 +276,7 @@ Version=2 int entries = getValue(lineIndex, line).toInt(); int count = m_readFlags == 0 ? (m_count - 1) : m_count; if (entries != count) { - emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing playlist: %1, expected count = %2")). + emit error(QPlaylistFileParser::FormatError, tr("Error parsing playlist: %1, expected count = %2"). arg(line, QString::number(count))); } break;