summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-21 03:04:00 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-21 03:04:00 +0200
commita60135c887aacdae071c3d9a316c7898d6469943 (patch)
treea588dcef8883310b738169ac05ed31c8048f9fdb
parent38e49d060d13ef592f457a5d6640d68a2d9c6b06 (diff)
parent43cd99e688860112aa0dce06e1adb7bde4a06edc (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
-rw-r--r--src/gsttools/qgstreamerplayersession.cpp6
-rw-r--r--src/multimedia/audio/qaudioprobe.cpp13
-rw-r--r--src/multimedia/camera/qcameraimageprocessing.cpp2
-rw-r--r--src/multimedia/controls/qcameralockscontrol.cpp3
-rw-r--r--src/multimedia/controls/qradiotunercontrol.cpp2
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/qaudioprobe.cpp51
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp22
7 files changed, 70 insertions, 29 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/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);
}
}
}