diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-05-12 15:28:33 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-05-19 18:11:15 +0000 |
commit | 520850e77332f6a341b40ad954de98c86c9f34b9 (patch) | |
tree | 1d348513c8d643123ecf97a4d02ce0465542152b /examples | |
parent | c9b9de6473474fe77b6e32232a461feb995939c2 (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.cpp | 3 | ||||
-rw-r--r-- | examples/multimediawidgets/camera/camera.cpp | 3 |
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); |