diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-28 03:03:25 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-28 03:03:31 +0200 |
commit | 6ce358e2b11fc8b160840a811bdced3643948a56 (patch) | |
tree | 951ce7953ad6a208f6f622e08d89db32d5309c3e | |
parent | d5babf5976fcf86af6cbbf2c5e354767d1f4c612 (diff) | |
parent | aa6abc4f262c7e3623df34810d6abdf810a8f047 (diff) |
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
15 files changed, 83 insertions, 36 deletions
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp index c83aaeb15..891eecbb0 100644 --- a/src/gsttools/qgstreamerplayersession.cpp +++ b/src/gsttools/qgstreamerplayersession.cpp @@ -1156,9 +1156,11 @@ bool QGstreamerPlayerSession::processBusMessage(const QGstreamerMessage &message #ifdef DEBUG_PLAYBIN QStringList states; - states << "GST_STATE_VOID_PENDING" << "GST_STATE_NULL" << "GST_STATE_READY" << "GST_STATE_PAUSED" << "GST_STATE_PLAYING"; + states << QStringLiteral("GST_STATE_VOID_PENDING") << QStringLiteral("GST_STATE_NULL") + << QStringLiteral("GST_STATE_READY") << QStringLiteral("GST_STATE_PAUSED") + << QStringLiteral("GST_STATE_PLAYING"); - qDebug() << QString("state changed: old: %1 new: %2 pending: %3") \ + qDebug() << QStringLiteral("state changed: old: %1 new: %2 pending: %3") \ .arg(states[oldState]) \ .arg(states[newState]) \ .arg(states[pending]); diff --git a/src/multimedia/audio/qaudioprobe.cpp b/src/multimedia/audio/qaudioprobe.cpp index b6fe86b11..7fb57242f 100644 --- a/src/multimedia/audio/qaudioprobe.cpp +++ b/src/multimedia/audio/qaudioprobe.cpp @@ -46,18 +46,7 @@ \brief The QAudioProbe class allows you to monitor audio being played or recorded. - \code - QAudioRecorder *recorder = new QAudioRecorder(); - QAudioProbe *probe = new QAudioProbe; - - // ... configure the audio recorder (skipped) - - connect(probe, SIGNAL(audioBufferProbed(QAudioBuffer)), this, SLOT(processBuffer(QAudioBuffer))); - - probe->setSource(recorder); // Returns true, hopefully. - - recorder->record(); // Now we can do things like calculating levels or performing an FFT - \endcode + \snippet multimedia-snippets/qaudioprobe.cpp desc \sa QVideoProbe, QMediaPlayer, QCamera */ diff --git a/src/multimedia/camera/qcameraimageprocessing.cpp b/src/multimedia/camera/qcameraimageprocessing.cpp index 0328f4a56..af6c22391 100644 --- a/src/multimedia/camera/qcameraimageprocessing.cpp +++ b/src/multimedia/camera/qcameraimageprocessing.cpp @@ -396,6 +396,6 @@ bool QCameraImageProcessing::isColorFilterSupported(QCameraImageProcessing::Colo } +QT_END_NAMESPACE #include "moc_qcameraimageprocessing.cpp" -QT_END_NAMESPACE diff --git a/src/multimedia/controls/qcameralockscontrol.cpp b/src/multimedia/controls/qcameralockscontrol.cpp index d8d6e61cd..436b3b9c9 100644 --- a/src/multimedia/controls/qcameralockscontrol.cpp +++ b/src/multimedia/controls/qcameralockscontrol.cpp @@ -122,7 +122,6 @@ QCameraLocksControl::~QCameraLocksControl() Signals the lock \a type \a status was changed with the specified \a reason. */ - +QT_END_NAMESPACE #include "moc_qcameralockscontrol.cpp" -QT_END_NAMESPACE diff --git a/src/multimedia/controls/qradiotunercontrol.cpp b/src/multimedia/controls/qradiotunercontrol.cpp index 8b9e865e1..ea2126319 100644 --- a/src/multimedia/controls/qradiotunercontrol.cpp +++ b/src/multimedia/controls/qradiotunercontrol.cpp @@ -339,6 +339,6 @@ QRadioTunerControl::~QRadioTunerControl() reflected with the \a connectionStatus. */ -#include "moc_qradiotunercontrol.cpp" QT_END_NAMESPACE +#include "moc_qradiotunercontrol.cpp" diff --git a/src/multimedia/doc/snippets/multimedia-snippets/qaudioprobe.cpp b/src/multimedia/doc/snippets/multimedia-snippets/qaudioprobe.cpp new file mode 100644 index 000000000..8543395f3 --- /dev/null +++ b/src/multimedia/doc/snippets/multimedia-snippets/qaudioprobe.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [desc] +QAudioRecorder *recorder = new QAudioRecorder(); +QAudioProbe *probe = new QAudioProbe; + +// ... configure the audio recorder (skipped) + +connect(probe, SIGNAL(audioBufferProbed(QAudioBuffer)), this, SLOT(processBuffer(QAudioBuffer))); + +probe->setSource(recorder); // Returns true, hopefully. + +recorder->record(); // Now we can do things like calculating levels or performing an FFT +//! [desc] diff --git a/src/multimedia/playback/qmediacontent.cpp b/src/multimedia/playback/qmediacontent.cpp index f61511f1c..6915ae7af 100644 --- a/src/multimedia/playback/qmediacontent.cpp +++ b/src/multimedia/playback/qmediacontent.cpp @@ -257,6 +257,12 @@ bool QMediaContent::isNull() const return d.constData() == nullptr; } +/*! + \since 5.14 + + Returns a QNetworkRequest that represents the resource for this media content. +*/ + QNetworkRequest QMediaContent::request() const { return (d && !d->requests.isEmpty()) ? d->requests.first() : QNetworkRequest(); diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index cfb4af63a..48db0335e 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -598,15 +598,15 @@ QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags): SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus))); connect(d->control, SIGNAL(error(int,QString)), SLOT(_q_error(int,QString))); - connect(d->control, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged(qint64))); - connect(d->control, SIGNAL(positionChanged(qint64)), SIGNAL(positionChanged(qint64))); - connect(d->control, SIGNAL(audioAvailableChanged(bool)), SIGNAL(audioAvailableChanged(bool))); - connect(d->control, SIGNAL(videoAvailableChanged(bool)), SIGNAL(videoAvailableChanged(bool))); - connect(d->control, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); - connect(d->control, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool))); - connect(d->control, SIGNAL(seekableChanged(bool)), SIGNAL(seekableChanged(bool))); - connect(d->control, SIGNAL(playbackRateChanged(qreal)), SIGNAL(playbackRateChanged(qreal))); - connect(d->control, SIGNAL(bufferStatusChanged(int)), SIGNAL(bufferStatusChanged(int))); + connect(d->control, &QMediaPlayerControl::durationChanged, this, &QMediaPlayer::durationChanged); + connect(d->control, &QMediaPlayerControl::positionChanged, this, &QMediaPlayer::positionChanged); + connect(d->control, &QMediaPlayerControl::audioAvailableChanged, this, &QMediaPlayer::audioAvailableChanged); + connect(d->control, &QMediaPlayerControl::videoAvailableChanged, this, &QMediaPlayer::videoAvailableChanged); + connect(d->control, &QMediaPlayerControl::volumeChanged, this, &QMediaPlayer::volumeChanged); + connect(d->control, &QMediaPlayerControl::mutedChanged, this, &QMediaPlayer::mutedChanged); + connect(d->control, &QMediaPlayerControl::seekableChanged, this, &QMediaPlayer::seekableChanged); + connect(d->control, &QMediaPlayerControl::playbackRateChanged, this, &QMediaPlayer::playbackRateChanged); + connect(d->control, &QMediaPlayerControl::bufferStatusChanged, this, &QMediaPlayer::bufferStatusChanged); d->state = d->control->state(); d->status = d->control->mediaStatus(); @@ -635,8 +635,8 @@ QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags): } } if (d->networkAccessControl != nullptr) { - connect(d->networkAccessControl, SIGNAL(configurationChanged(QNetworkConfiguration)), - this, SIGNAL(networkConfigurationChanged(QNetworkConfiguration))); + connect(d->networkAccessControl, &QMediaNetworkAccessControl::configurationChanged, + this, &QMediaPlayer::networkConfigurationChanged); } } } diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h index b0710cd27..617b0a1d9 100644 --- a/src/multimedia/video/qvideoframe.h +++ b/src/multimedia/video/qvideoframe.h @@ -86,7 +86,6 @@ public: Format_AYUV444_Premultiplied, Format_YUV444, Format_YUV420P, - Format_YUV422P, Format_YV12, Format_UYVY, Format_YUYV, @@ -103,6 +102,7 @@ public: Format_CameraRaw, Format_AdobeDng, + Format_YUV422P, // ### Qt 6: reorder #ifndef Q_QDOC NPixelFormats, diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro index 7fcaadbc2..813d102cb 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro @@ -11,7 +11,7 @@ PLUGIN_CLASS_NAME = MockServicePlugin1 load(qt_plugin) DESTDIR = ../$${PLUGIN_TYPE} -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { DESTDIR = ../debug/$${PLUGIN_TYPE} } else { diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro index 4ac001ec9..f2ac3291d 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro @@ -11,7 +11,7 @@ PLUGIN_CLASS_NAME = MockServicePlugin2 load(qt_plugin) DESTDIR = ../$${PLUGIN_TYPE} -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { DESTDIR = ../debug/$${PLUGIN_TYPE} } else { diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro index 34cd2fed1..51f87d9da 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro @@ -11,7 +11,7 @@ PLUGIN_CLASS_NAME = MockServicePlugin3 load(qt_plugin) DESTDIR = ../$${PLUGIN_TYPE} -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { DESTDIR = ../debug/$${PLUGIN_TYPE} } else { diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro index 0900bfc40..c3834ab03 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro @@ -11,7 +11,7 @@ PLUGIN_CLASS_NAME = MockServicePlugin4 load(qt_plugin) DESTDIR = ../$${PLUGIN_TYPE} -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { DESTDIR = ../debug/$${PLUGIN_TYPE} } else { diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro index 37f287f9d..b273c6b15 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro @@ -11,7 +11,7 @@ PLUGIN_CLASS_NAME = MockServicePlugin5 load(qt_plugin) DESTDIR = ../$${PLUGIN_TYPE} -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { DESTDIR = ../debug/$${PLUGIN_TYPE} } else { diff --git a/tests/auto/unit/qmediaserviceprovider/test/test.pro b/tests/auto/unit/qmediaserviceprovider/test/test.pro index 2cf78c100..94f7f259a 100644 --- a/tests/auto/unit/qmediaserviceprovider/test/test.pro +++ b/tests/auto/unit/qmediaserviceprovider/test/test.pro @@ -5,7 +5,7 @@ QT += multimedia-private testlib SOURCES += ../tst_qmediaserviceprovider.cpp -win32 { +win32:debug_and_release { CONFIG(debug, debug|release) { TARGET = ../../debug/tst_qmediaserviceprovider } else { |