From 226f802fb04de6b135a0214674ce77643ba479c4 Mon Sep 17 00:00:00 2001 From: Roland Rossgotterer Date: Sat, 23 Mar 2019 13:25:54 +0100 Subject: Add source url to 'decoding error' warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, QSoundEffect logged a warning if the source could not be decoded, but without mentioning the source it tried to decode. When using multiple QSoundEffects in one application, adding the source to the warning will help to find the one causing the decode error. Change-Id: I4c6bbdfe4a62f650b64ab951bcc637febedae98e Reviewed-by: VaL Doroshchuk Reviewed-by: André Hartmann --- src/multimedia/audio/qsoundeffect_pulse_p.cpp | 2 +- src/multimedia/audio/qsoundeffect_qaudio_p.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/multimedia') diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp index bbaf405b6..4a2e30185 100644 --- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp @@ -744,7 +744,7 @@ void QSoundEffectPrivate::sampleReady() void QSoundEffectPrivate::decoderError() { - qWarning("QSoundEffect(pulseaudio): Error decoding source"); + qWarning("QSoundEffect(pulseaudio): Error decoding source %ls", qUtf16Printable(m_source.toString())); disconnect(m_sample, &QSample::error, this, &QSoundEffectPrivate::decoderError); bool playingDirty = false; if (m_playing) { diff --git a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp index d7a19eeec..13df416f3 100644 --- a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp +++ b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp @@ -344,7 +344,7 @@ void PrivateSoundSource::sampleReady() void PrivateSoundSource::decoderError() { - qWarning("QSoundEffect(qaudio): Error decoding source"); + qWarning("QSoundEffect(qaudio): Error decoding source %ls", qUtf16Printable(m_url.toString())); disconnect(m_sample, &QSample::ready, this, &PrivateSoundSource::sampleReady); disconnect(m_sample, &QSample::error, this, &PrivateSoundSource::decoderError); m_playing = false; -- cgit v1.2.3 From c296df781d9fa445bb4b1fcbb6f340e0d1db0c3a Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Thu, 17 Jan 2019 09:24:50 +0100 Subject: Fix QCameraInfo to be invalid if camera failed to find device Since QCameraInfo uses deviceControl and infoControl to get info about camera, it needs to clear these controls if the camera failed to find a device by name. Change-Id: I1404f70234f978fa4568b6c883a5676f61e08145 Reviewed-by: Oliver Wolff (cherry picked from commit 42932e1a9dfd6699763b336f552e46f9b1ff30c9) --- src/multimedia/camera/qcamera.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/multimedia') diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp index c7d64155c..bd3f30739 100644 --- a/src/multimedia/camera/qcamera.cpp +++ b/src/multimedia/camera/qcamera.cpp @@ -362,9 +362,17 @@ QCamera::QCamera(const QByteArray& deviceName, QObject *parent): // The camera should not be used if device with requested name does not exist. if (!found) { - if (d->service && d->control) - d->service->releaseControl(d->control); + if (d->service) { + if (d->control) + d->service->releaseControl(d->control); + if (d->deviceControl) + d->service->releaseControl(d->deviceControl); + if (d->infoControl) + d->service->releaseControl(d->infoControl); + } d->control = nullptr; + d->deviceControl = nullptr; + d->infoControl = nullptr; d->error = QCamera::ServiceMissingError; d->errorString = QCamera::tr("The camera service is missing"); } -- cgit v1.2.3