summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-05-12 15:28:33 +0200
committerLars Knoll <lars.knoll@qt.io>2021-05-19 18:11:15 +0000
commit520850e77332f6a341b40ad954de98c86c9f34b9 (patch)
tree1d348513c8d643123ecf97a4d02ce0465542152b /examples
parentc9b9de6473474fe77b6e32232a461feb995939c2 (diff)
Cleanup the QMediaEncoder backend architecture
QPlatformMediaEncoder should not be a QObject, as with the other backend classes. Instead, the class now tracks some state to simplify the implementation of the platform dependent code and emits the signals for the frontend. Change-Id: Iec45638de4333cb9e88f89c448194b49a5de0e1e Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/audiorecorder/audiorecorder.cpp3
-rw-r--r--examples/multimediawidgets/camera/camera.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/multimedia/audiorecorder/audiorecorder.cpp b/examples/multimedia/audiorecorder/audiorecorder.cpp
index 8dc271ee0..c8932f968 100644
--- a/examples/multimedia/audiorecorder/audiorecorder.cpp
+++ b/examples/multimedia/audiorecorder/audiorecorder.cpp
@@ -123,8 +123,7 @@ AudioRecorder::AudioRecorder()
connect(m_audioEncoder, &QMediaEncoder::durationChanged, this, &AudioRecorder::updateProgress);
connect(m_audioEncoder, &QMediaEncoder::statusChanged, this, &AudioRecorder::updateStatus);
connect(m_audioEncoder, &QMediaEncoder::stateChanged, this, &AudioRecorder::onStateChanged);
- connect(m_audioEncoder, QOverload<QMediaEncoder::Error>::of(&QMediaEncoder::error), this,
- &AudioRecorder::displayErrorMessage);
+ connect(m_audioEncoder, &QMediaEncoder::errorChanged, this, &AudioRecorder::displayErrorMessage);
}
void AudioRecorder::updateProgress(qint64 duration)
diff --git a/examples/multimediawidgets/camera/camera.cpp b/examples/multimediawidgets/camera/camera.cpp
index 864e24eac..38f4427fa 100644
--- a/examples/multimediawidgets/camera/camera.cpp
+++ b/examples/multimediawidgets/camera/camera.cpp
@@ -118,8 +118,7 @@ void Camera::setCamera(const QCameraInfo &cameraInfo)
m_captureSession.setImageCapture(m_imageCapture);
connect(m_mediaEncoder.data(), &QMediaEncoder::durationChanged, this, &Camera::updateRecordTime);
- connect(m_mediaEncoder.data(), QOverload<QMediaEncoder::Error>::of(&QMediaEncoder::error),
- this, &Camera::displayRecorderError);
+ connect(m_mediaEncoder.data(), &QMediaEncoder::errorChanged, this, &Camera::displayRecorderError);
connect(ui->exposureCompensation, &QAbstractSlider::valueChanged, this, &Camera::setExposureCompensation);