From ce560e8abcb13f5f9ddef0858b55199d144dadb5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 11 Sep 2019 14:18:27 +0200 Subject: Fix building with namespaced Qt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I690fa71f171b821098d33ce5482c9de467b645d5 Reviewed-by: Jörg Bornemann --- src/multimedia/camera/qcameraimageprocessing.cpp | 2 +- src/multimedia/controls/qcameralockscontrol.cpp | 3 +-- src/multimedia/controls/qradiotunercontrol.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/multimedia/camera/qcameraimageprocessing.cpp b/src/multimedia/camera/qcameraimageprocessing.cpp index c2cefeae7..27b7f05bd 100644 --- a/src/multimedia/camera/qcameraimageprocessing.cpp +++ b/src/multimedia/camera/qcameraimageprocessing.cpp @@ -400,6 +400,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" -- cgit v1.2.3 From 81e87e34c444404c79a7365e490607c35dc0c661 Mon Sep 17 00:00:00 2001 From: Mariana Meireles Date: Wed, 11 Sep 2019 15:33:58 +0200 Subject: Extract QAudioProbe code snippet Adding the code to a snippet file Change-Id: Iee3a24a1d2f28bc8863cf321b0b55c0459708995 Reviewed-by: Venugopal Shivashankar --- src/multimedia/audio/qaudioprobe.cpp | 13 +----- .../snippets/multimedia-snippets/qaudioprobe.cpp | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 src/multimedia/doc/snippets/multimedia-snippets/qaudioprobe.cpp 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/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] -- cgit v1.2.3 From 2ac9cac9e009d18968e68af1fc501c04eb2cffb3 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 18 Sep 2019 11:06:16 +0200 Subject: QMediaPlayer: use new connect syntax Only the Q_PRIVATE_SLOTs remain. Change-Id: Id3daf8275e8510a99a7089d4a537d06a123b6a27 Reviewed-by: VaL Doroshchuk --- src/multimedia/playback/qmediaplayer.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index bfc8bcdc3..6f8cbd6ed 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -595,15 +595,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(); @@ -632,8 +632,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); } } } -- cgit v1.2.3 From 43cd99e688860112aa0dce06e1adb7bde4a06edc Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Thu, 19 Sep 2019 08:05:22 +0200 Subject: MultimediaGstTools: fix string warnings when defining DEBUG_PLAYBIN Change-Id: I0069b96f00830cd441b60bef5847b1543ba2c1af Reviewed-by: VaL Doroshchuk --- src/gsttools/qgstreamerplayersession.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp index ff171f4b2..2d1814a9d 100644 --- a/src/gsttools/qgstreamerplayersession.cpp +++ b/src/gsttools/qgstreamerplayersession.cpp @@ -1143,9 +1143,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]); -- cgit v1.2.3