diff options
Diffstat (limited to 'src/multimedia/platform')
12 files changed, 211 insertions, 212 deletions
diff --git a/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol.cpp b/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol.cpp index d8ad36d8d..ffb99b250 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol.cpp +++ b/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol.cpp @@ -52,8 +52,8 @@ QAndroidCameraExposureControl::QAndroidCameraExposureControl(QAndroidCameraSessi , m_exposureCompensationStep(0.0) , m_requestedExposureCompensation(0.0) , m_actualExposureCompensation(0.0) - , m_requestedExposureMode(QCameraExposure::ExposureAuto) - , m_actualExposureMode(QCameraExposure::ExposureAuto) + , m_requestedExposureMode(QCamera::ExposureAuto) + , m_actualExposureMode(QCamera::ExposureAuto) { connect(m_session, SIGNAL(opened()), this, SLOT(onCameraOpened())); @@ -147,7 +147,7 @@ bool QAndroidCameraExposureControl::setValue(ExposureParameter parameter, const } } else if (parameter == QPlatformCameraExposure::ExposureMode) { - QCameraExposure::ExposureMode expMode = value.value<QCameraExposure::ExposureMode>(); + QCamera::ExposureMode expMode = value.value<QCamera::ExposureMode>(); if (m_requestedExposureMode != expMode) { m_requestedExposureMode = expMode; emit requestedValueChanged(QPlatformCameraExposure::ExposureMode); @@ -161,57 +161,57 @@ bool QAndroidCameraExposureControl::setValue(ExposureParameter parameter, const QString sceneMode; switch (m_requestedExposureMode) { - case QCameraExposure::ExposureAuto: + case QCamera::ExposureAuto: sceneMode = QLatin1String("auto"); break; - case QCameraExposure::ExposureSports: + case QCamera::ExposureSports: sceneMode = QLatin1String("sports"); break; - case QCameraExposure::ExposurePortrait: + case QCamera::ExposurePortrait: sceneMode = QLatin1String("portrait"); break; - case QCameraExposure::ExposureBeach: + case QCamera::ExposureBeach: sceneMode = QLatin1String("beach"); break; - case QCameraExposure::ExposureSnow: + case QCamera::ExposureSnow: sceneMode = QLatin1String("snow"); break; - case QCameraExposure::ExposureNight: + case QCamera::ExposureNight: sceneMode = QLatin1String("night"); break; - case QCameraExposure::ExposureAction: + case QCamera::ExposureAction: sceneMode = QLatin1String("action"); break; - case QCameraExposure::ExposureLandscape: + case QCamera::ExposureLandscape: sceneMode = QLatin1String("landscape"); break; - case QCameraExposure::ExposureNightPortrait: + case QCamera::ExposureNightPortrait: sceneMode = QLatin1String("night-portrait"); break; - case QCameraExposure::ExposureTheatre: + case QCamera::ExposureTheatre: sceneMode = QLatin1String("theatre"); break; - case QCameraExposure::ExposureSunset: + case QCamera::ExposureSunset: sceneMode = QLatin1String("sunset"); break; - case QCameraExposure::ExposureSteadyPhoto: + case QCamera::ExposureSteadyPhoto: sceneMode = QLatin1String("steadyphoto"); break; - case QCameraExposure::ExposureFireworks: + case QCamera::ExposureFireworks: sceneMode = QLatin1String("fireworks"); break; - case QCameraExposure::ExposureParty: + case QCamera::ExposureParty: sceneMode = QLatin1String("party"); break; - case QCameraExposure::ExposureCandlelight: + case QCamera::ExposureCandlelight: sceneMode = QLatin1String("candlelight"); break; - case QCameraExposure::ExposureBarcode: + case QCamera::ExposureBarcode: sceneMode = QLatin1String("barcode"); break; default: sceneMode = QLatin1String("auto"); - m_actualExposureMode = QCameraExposure::ExposureAuto; + m_actualExposureMode = QCamera::ExposureAuto; break; } @@ -243,37 +243,37 @@ void QAndroidCameraExposureControl::onCameraOpened() for (int i = 0; i < sceneModes.size(); ++i) { const QString &sceneMode = sceneModes.at(i); if (sceneMode == QLatin1String("auto")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureAuto); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureAuto); else if (sceneMode == QLatin1String("beach")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureBeach); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureBeach); else if (sceneMode == QLatin1String("night")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureNight); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureNight); else if (sceneMode == QLatin1String("portrait")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposurePortrait); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposurePortrait); else if (sceneMode == QLatin1String("snow")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureSnow); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureSnow); else if (sceneMode == QLatin1String("sports")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureSports); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureSports); else if (sceneMode == QLatin1String("action")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureAction); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureAction); else if (sceneMode == QLatin1String("landscape")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureLandscape); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureLandscape); else if (sceneMode == QLatin1String("night-portrait")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureNightPortrait); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureNightPortrait); else if (sceneMode == QLatin1String("theatre")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureTheatre); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureTheatre); else if (sceneMode == QLatin1String("sunset")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureSunset); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureSunset); else if (sceneMode == QLatin1String("steadyphoto")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureSteadyPhoto); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureSteadyPhoto); else if (sceneMode == QLatin1String("fireworks")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureFireworks); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureFireworks); else if (sceneMode == QLatin1String("party")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureParty); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureParty); else if (sceneMode == QLatin1String("candlelight")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureCandlelight); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureCandlelight); else if (sceneMode == QLatin1String("barcode")) - m_supportedExposureModes << QVariant::fromValue(QCameraExposure::ExposureBarcode); + m_supportedExposureModes << QVariant::fromValue(QCamera::ExposureBarcode); } emit parameterRangeChanged(QPlatformCameraExposure::ExposureMode); } @@ -288,31 +288,31 @@ void QAndroidCameraExposureControl::onCameraOpened() for (int i = 0; i < flashModes.size(); ++i) { const QString &flashMode = flashModes.at(i); if (flashMode == QLatin1String("off")) - m_supportedFlashModes << QCameraExposure::FlashOff; + m_supportedFlashModes << QCamera::FlashOff; else if (flashMode == QLatin1String("auto")) - m_supportedFlashModes << QCameraExposure::FlashAuto; + m_supportedFlashModes << QCamera::FlashAuto; else if (flashMode == QLatin1String("on")) - m_supportedFlashModes << QCameraExposure::FlashOn; + m_supportedFlashModes << QCamera::FlashOn; else if (flashMode == QLatin1String("torch")) torchModeSupported = true; } if (!m_supportedFlashModes.contains(m_flashMode)) - m_flashMode = QCameraExposure::FlashOff; + m_flashMode = QCamera::FlashOff; setFlashMode(m_flashMode); } -QCameraExposure::FlashMode QAndroidCameraExposureControl::flashMode() const +QCamera::FlashMode QAndroidCameraExposureControl::flashMode() const { return m_flashMode; } -void QAndroidCameraExposureControl::setFlashMode(QCameraExposure::FlashMode mode) +void QAndroidCameraExposureControl::setFlashMode(QCamera::FlashMode mode) { if (!m_session->camera()) { - m_flashMode = QCameraExposure::FlashOff; + m_flashMode = QCamera::FlashOff; return; } @@ -323,9 +323,9 @@ void QAndroidCameraExposureControl::setFlashMode(QCameraExposure::FlashMode mode m_flashMode = mode; QString flashMode; - if (mode == QCameraExposure::FlashAuto) + if (mode == QCamera::FlashAuto) flashMode = QLatin1String("auto"); - else if (mode == QCameraExposure::FlashOn) + else if (mode == QCamera::FlashOn) flashMode = QLatin1String("on"); else // FlashOff flashMode = QLatin1String("off"); @@ -333,7 +333,7 @@ void QAndroidCameraExposureControl::setFlashMode(QCameraExposure::FlashMode mode m_session->camera()->setFlashMode(flashMode); } -bool QAndroidCameraExposureControl::isFlashModeSupported(QCameraExposure::FlashMode mode) const +bool QAndroidCameraExposureControl::isFlashModeSupported(QCamera::FlashMode mode) const { return m_session->camera() ? m_supportedFlashModes.contains(mode) : false; } @@ -344,21 +344,21 @@ bool QAndroidCameraExposureControl::isFlashReady() const return true; } -QCameraExposure::TorchMode QAndroidCameraExposureControl::torchMode() const +QCamera::TorchMode QAndroidCameraExposureControl::torchMode() const { - return torchEnabled ? QCameraExposure::TorchOn : QCameraExposure::TorchOff; + return torchEnabled ? QCamera::TorchOn : QCamera::TorchOff; } -void QAndroidCameraExposureControl::setTorchMode(QCameraExposure::TorchMode mode) +void QAndroidCameraExposureControl::setTorchMode(QCamera::TorchMode mode) { auto *camera = m_session->camera(); if (!camera || !torchModeSupported) return; - if (mode == QCameraExposure::TorchOn) { + if (mode == QCamera::TorchOn) { camera->setFlashMode(QLatin1String("torch")); torchEnabled = true; - } else if (mode == QCameraExposure::TorchOff) { + } else if (mode == QCamera::TorchOff) { // if torch was enabled, it first needs to be turned off before restoring the flash mode camera->setFlashMode(QLatin1String("off")); setFlashMode(m_flashMode); @@ -366,11 +366,11 @@ void QAndroidCameraExposureControl::setTorchMode(QCameraExposure::TorchMode mode } } -bool QAndroidCameraExposureControl::isTorchModeSupported(QCameraExposure::TorchMode mode) const +bool QAndroidCameraExposureControl::isTorchModeSupported(QCamera::TorchMode mode) const { - if (mode == QCameraExposure::TorchAuto) + if (mode == QCamera::TorchAuto) return false; - else if (mode == QCameraExposure::TorchOn) + else if (mode == QCamera::TorchOn) return torchModeSupported; else return true; diff --git a/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol_p.h b/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol_p.h index 5c818d14a..510a9a764 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol_p.h +++ b/src/multimedia/platform/android/mediacapture/qandroidcameraexposurecontrol_p.h @@ -70,14 +70,14 @@ public: QVariant actualValue(ExposureParameter parameter) const override; bool setValue(ExposureParameter parameter, const QVariant& value) override; - QCameraExposure::FlashMode flashMode() const override; - void setFlashMode(QCameraExposure::FlashMode mode) override; - bool isFlashModeSupported(QCameraExposure::FlashMode mode) const override; + QCamera::FlashMode flashMode() const override; + void setFlashMode(QCamera::FlashMode mode) override; + bool isFlashModeSupported(QCamera::FlashMode mode) const override; bool isFlashReady() const override; - QCameraExposure::TorchMode torchMode() const override; - void setTorchMode(QCameraExposure::TorchMode mode) override; - bool isTorchModeSupported(QCameraExposure::TorchMode mode) const override; + QCamera::TorchMode torchMode() const override; + void setTorchMode(QCamera::TorchMode mode) override; + bool isTorchModeSupported(QCamera::TorchMode mode) const override; private Q_SLOTS: void onCameraOpened(); @@ -94,11 +94,11 @@ private: qreal m_requestedExposureCompensation; qreal m_actualExposureCompensation; - QCameraExposure::ExposureMode m_requestedExposureMode; - QCameraExposure::ExposureMode m_actualExposureMode; + QCamera::ExposureMode m_requestedExposureMode; + QCamera::ExposureMode m_actualExposureMode; - QList<QCameraExposure::FlashMode> m_supportedFlashModes; - QCameraExposure::FlashMode m_flashMode; + QList<QCamera::FlashMode> m_supportedFlashModes; + QCamera::FlashMode m_flashMode; bool torchModeSupported = false; bool torchEnabled = false; diff --git a/src/multimedia/platform/darwin/camera/avfcameraexposure.mm b/src/multimedia/platform/darwin/camera/avfcameraexposure.mm index dd5e47f9a..53499aa1f 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraexposure.mm +++ b/src/multimedia/platform/darwin/camera/avfcameraexposure.mm @@ -132,20 +132,20 @@ bool qt_exposure_bias_equal(AVCaptureDevice *captureDevice, qreal bias) // Converters: -bool qt_convert_exposure_mode(AVCaptureDevice *captureDevice, QCameraExposure::ExposureMode mode, +bool qt_convert_exposure_mode(AVCaptureDevice *captureDevice, QCamera::ExposureMode mode, AVCaptureExposureMode &avMode) { // Test if mode supported and convert. Q_ASSERT(captureDevice); - if (mode == QCameraExposure::ExposureAuto) { + if (mode == QCamera::ExposureAuto) { if ([captureDevice isExposureModeSupported:AVCaptureExposureModeContinuousAutoExposure]) { avMode = AVCaptureExposureModeContinuousAutoExposure; return true; } } - if (mode == QCameraExposure::ExposureManual) { + if (mode == QCamera::ExposureManual) { if ([captureDevice isExposureModeSupported:AVCaptureExposureModeCustom]) { avMode = AVCaptureExposureModeCustom; return true; @@ -293,10 +293,10 @@ QVariantList AVFCameraExposure::supportedParameterRange(ExposureParameter parame *continuous = true; } else if (parameter == QPlatformCameraExposure::ExposureMode) { if ([captureDevice isExposureModeSupported:AVCaptureExposureModeCustom]) - parameterRange << QVariant::fromValue(QCameraExposure::ExposureManual); + parameterRange << QVariant::fromValue(QCamera::ExposureManual); if ([captureDevice isExposureModeSupported:AVCaptureExposureModeContinuousAutoExposure]) - parameterRange << QVariant::fromValue(QCameraExposure::ExposureAuto); + parameterRange << QVariant::fromValue(QCamera::ExposureAuto); } #else Q_UNUSED(parameter); @@ -340,8 +340,8 @@ QVariant AVFCameraExposure::actualValue(ExposureParameter parameter) const if (parameter == QPlatformCameraExposure::ExposureMode) { // This code expects exposureMode to be continuous by default ... if (captureDevice.exposureMode == AVCaptureExposureModeContinuousAutoExposure) - return QVariant::fromValue(QCameraExposure::ExposureAuto); - return QVariant::fromValue(QCameraExposure::ExposureManual); + return QVariant::fromValue(QCamera::ExposureAuto); + return QVariant::fromValue(QCamera::ExposureManual); } if (parameter == QPlatformCameraExposure::ExposureCompensation) @@ -383,14 +383,14 @@ bool AVFCameraExposure::setValue(ExposureParameter parameter, const QVariant &va bool AVFCameraExposure::setExposureMode(const QVariant &value) { #ifdef Q_OS_IOS - if (!value.canConvert<QCameraExposure::ExposureMode>()) { + if (!value.canConvert<QCamera::ExposureMode>()) { qDebugCamera() << Q_FUNC_INFO << "invalid exposure mode value," - << "QCameraExposure::ExposureMode expected"; + << "QCamera::ExposureMode expected"; return false; } - const QCameraExposure::ExposureMode qtMode = value.value<QCameraExposure::ExposureMode>(); - if (qtMode != QCameraExposure::ExposureAuto && qtMode != QCameraExposure::ExposureManual) { + const QCamera::ExposureMode qtMode = value.value<QCamera::ExposureMode>(); + if (qtMode != QCamera::ExposureAuto && qtMode != QCamera::ExposureManual) { qDebugCamera() << Q_FUNC_INFO << "exposure mode not supported"; return false; } @@ -472,7 +472,7 @@ bool AVFCameraExposure::setShutterSpeed(const QVariant &value) { #ifdef Q_OS_IOS if (value.isNull()) - return setExposureMode(QVariant::fromValue(QCameraExposure::ExposureAuto)); + return setExposureMode(QVariant::fromValue(QCamera::ExposureAuto)); if (!value.canConvert<qreal>()) { qDebugCamera() << Q_FUNC_INFO << "invalid shutter speed" @@ -519,7 +519,7 @@ bool AVFCameraExposure::setISO(const QVariant &value) { #ifdef Q_OS_IOS if (value.isNull()) - return setExposureMode(QVariant::fromValue(QCameraExposure::ExposureAuto)); + return setExposureMode(QVariant::fromValue(QCamera::ExposureAuto)); if (!value.canConvert<int>()) { qDebugCamera() << Q_FUNC_INFO << "invalid ISO value, int expected"; @@ -632,7 +632,7 @@ void AVFCameraExposure::cameraActiveChanged(bool active) } if (!m_requestedMode.isNull()) { - QCameraExposure::ExposureMode qtMode = m_requestedMode.value<QCameraExposure::ExposureMode>(); + QCamera::ExposureMode qtMode = m_requestedMode.value<QCamera::ExposureMode>(); AVCaptureExposureMode avMode = AVCaptureExposureModeContinuousAutoExposure; if (!qt_convert_exposure_mode(captureDevice, qtMode, avMode)) { qDebugCamera() << Q_FUNC_INFO << "requested exposure mode is not supported"; @@ -685,12 +685,12 @@ void AVFCameraExposure::cameraActiveChanged(bool active) -QCameraExposure::FlashMode AVFCameraExposure::flashMode() const +QCamera::FlashMode AVFCameraExposure::flashMode() const { return m_flashMode; } -void AVFCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) +void AVFCameraExposure::setFlashMode(QCamera::FlashMode mode) { if (m_flashMode == mode) return; @@ -708,13 +708,13 @@ void AVFCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) applyFlashSettings(); } -bool AVFCameraExposure::isFlashModeSupported(QCameraExposure::FlashMode mode) const +bool AVFCameraExposure::isFlashModeSupported(QCamera::FlashMode mode) const { - if (mode == QCameraExposure::FlashOff) + if (mode == QCamera::FlashOff) return true; - else if (mode == QCameraExposure::FlashOn) + else if (mode == QCamera::FlashOn) return isFlashSupported; - else //if (mode == QCameraExposure::FlashAuto) + else //if (mode == QCamera::FlashAuto) return isFlashAutoSupported; } @@ -743,12 +743,12 @@ bool AVFCameraExposure::isFlashReady() const return true; } -QCameraExposure::TorchMode AVFCameraExposure::torchMode() const +QCamera::TorchMode AVFCameraExposure::torchMode() const { return m_torchMode; } -void AVFCameraExposure::setTorchMode(QCameraExposure::TorchMode mode) +void AVFCameraExposure::setTorchMode(QCamera::TorchMode mode) { if (m_torchMode == mode) return; @@ -766,13 +766,13 @@ void AVFCameraExposure::setTorchMode(QCameraExposure::TorchMode mode) applyFlashSettings(); } -bool AVFCameraExposure::isTorchModeSupported(QCameraExposure::TorchMode mode) const +bool AVFCameraExposure::isTorchModeSupported(QCamera::TorchMode mode) const { - if (mode == QCameraExposure::TorchOff) + if (mode == QCamera::TorchOff) return true; - else if (mode == QCameraExposure::TorchOn) + else if (mode == QCamera::TorchOn) return isTorchSupported; - else //if (mode == QCameraExposure::TorchAuto) + else //if (mode == QCamera::TorchAuto) return isTorchAutoSupported; } @@ -794,7 +794,7 @@ void AVFCameraExposure::applyFlashSettings() const AVFConfigurationLock lock(captureDevice); if (captureDevice.hasFlash) { - if (m_flashMode == QCameraExposure::FlashOff) { + if (m_flashMode == QCamera::FlashOff) { captureDevice.flashMode = AVCaptureFlashModeOff; } else { #ifdef Q_OS_IOS @@ -803,15 +803,15 @@ void AVFCameraExposure::applyFlashSettings() return; } #endif - if (m_flashMode == QCameraExposure::FlashOn) + if (m_flashMode == QCamera::FlashOn) captureDevice.flashMode = AVCaptureFlashModeOn; - else if (m_flashMode == QCameraExposure::FlashAuto) + else if (m_flashMode == QCamera::FlashAuto) captureDevice.flashMode = AVCaptureFlashModeAuto; } } if (captureDevice.hasTorch) { - if (m_torchMode == QCameraExposure::TorchOff) { + if (m_torchMode == QCamera::TorchOff) { captureDevice.torchMode = AVCaptureTorchModeOff; } else { #ifdef Q_OS_IOS @@ -820,9 +820,9 @@ void AVFCameraExposure::applyFlashSettings() return; } #endif - if (m_torchMode == QCameraExposure::TorchOn) + if (m_torchMode == QCamera::TorchOn) captureDevice.torchMode = AVCaptureTorchModeOn; - else if (m_torchMode == QCameraExposure::TorchAuto) + else if (m_torchMode == QCamera::TorchAuto) captureDevice.torchMode = AVCaptureTorchModeAuto; } } diff --git a/src/multimedia/platform/darwin/camera/avfcameraexposure_p.h b/src/multimedia/platform/darwin/camera/avfcameraexposure_p.h index 22477f857..e432d377f 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraexposure_p.h +++ b/src/multimedia/platform/darwin/camera/avfcameraexposure_p.h @@ -52,7 +52,7 @@ // #include <private/qplatformcameraexposure_p.h> -#include <QtMultimedia/qcameraexposure.h> +#include <QtMultimedia/qcamera.h> #include <QtCore/qglobal.h> @@ -75,14 +75,14 @@ public: QVariant actualValue(ExposureParameter parameter) const override; bool setValue(ExposureParameter parameter, const QVariant &value) override; - QCameraExposure::FlashMode flashMode() const override; - void setFlashMode(QCameraExposure::FlashMode mode) override; - bool isFlashModeSupported(QCameraExposure::FlashMode mode) const override; + QCamera::FlashMode flashMode() const override; + void setFlashMode(QCamera::FlashMode mode) override; + bool isFlashModeSupported(QCamera::FlashMode mode) const override; bool isFlashReady() const override; - QCameraExposure::TorchMode torchMode() const override; - void setTorchMode(QCameraExposure::TorchMode mode) override; - bool isTorchModeSupported(QCameraExposure::TorchMode mode) const override; + QCamera::TorchMode torchMode() const override; + void setTorchMode(QCamera::TorchMode mode) override; + bool isTorchModeSupported(QCamera::TorchMode mode) const override; private Q_SLOTS: void cameraActiveChanged(bool active); @@ -108,8 +108,8 @@ private: bool isFlashAutoSupported = false; bool isTorchSupported = false; bool isTorchAutoSupported = false; - QCameraExposure::FlashMode m_flashMode = QCameraExposure::FlashOff; - QCameraExposure::TorchMode m_torchMode = QCameraExposure::TorchOff; + QCamera::FlashMode m_flashMode = QCamera::FlashOff; + QCamera::TorchMode m_torchMode = QCamera::TorchOff; }; QT_END_NAMESPACE diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure.cpp b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure.cpp index 70c25f518..a65c58f7f 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure.cpp +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure.cpp @@ -149,42 +149,42 @@ QVariant QGstreamerCameraExposure::actualValue(ExposureParameter parameter) cons switch (sceneMode) { case GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT: - return QVariant::fromValue(QCameraExposure::ExposurePortrait); + return QVariant::fromValue(QCamera::ExposurePortrait); case GST_PHOTOGRAPHY_SCENE_MODE_SPORT: - return QVariant::fromValue(QCameraExposure::ExposureSports); + return QVariant::fromValue(QCamera::ExposureSports); case GST_PHOTOGRAPHY_SCENE_MODE_NIGHT: - return QVariant::fromValue(QCameraExposure::ExposureNight); + return QVariant::fromValue(QCamera::ExposureNight); case GST_PHOTOGRAPHY_SCENE_MODE_MANUAL: - return QVariant::fromValue(QCameraExposure::ExposureManual); + return QVariant::fromValue(QCamera::ExposureManual); case GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE: - return QVariant::fromValue(QCameraExposure::ExposureLandscape); + return QVariant::fromValue(QCamera::ExposureLandscape); case GST_PHOTOGRAPHY_SCENE_MODE_SNOW: - return QVariant::fromValue(QCameraExposure::ExposureSnow); + return QVariant::fromValue(QCamera::ExposureSnow); case GST_PHOTOGRAPHY_SCENE_MODE_BEACH: - return QVariant::fromValue(QCameraExposure::ExposureBeach); + return QVariant::fromValue(QCamera::ExposureBeach); case GST_PHOTOGRAPHY_SCENE_MODE_ACTION: - return QVariant::fromValue(QCameraExposure::ExposureAction); + return QVariant::fromValue(QCamera::ExposureAction); case GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT: - return QVariant::fromValue(QCameraExposure::ExposureNightPortrait); + return QVariant::fromValue(QCamera::ExposureNightPortrait); case GST_PHOTOGRAPHY_SCENE_MODE_THEATRE: - return QVariant::fromValue(QCameraExposure::ExposureTheatre); + return QVariant::fromValue(QCamera::ExposureTheatre); case GST_PHOTOGRAPHY_SCENE_MODE_SUNSET: - return QVariant::fromValue(QCameraExposure::ExposureSunset); + return QVariant::fromValue(QCamera::ExposureSunset); case GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO: - return QVariant::fromValue(QCameraExposure::ExposureSteadyPhoto); + return QVariant::fromValue(QCamera::ExposureSteadyPhoto); case GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS: - return QVariant::fromValue(QCameraExposure::ExposureFireworks); + return QVariant::fromValue(QCamera::ExposureFireworks); case GST_PHOTOGRAPHY_SCENE_MODE_PARTY: - return QVariant::fromValue(QCameraExposure::ExposureParty); + return QVariant::fromValue(QCamera::ExposureParty); case GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT: - return QVariant::fromValue(QCameraExposure::ExposureCandlelight); + return QVariant::fromValue(QCamera::ExposureCandlelight); case GST_PHOTOGRAPHY_SCENE_MODE_BARCODE: - return QVariant::fromValue(QCameraExposure::ExposureBarcode); + return QVariant::fromValue(QCamera::ExposureBarcode); //no direct mapping available so mapping to auto mode case GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP: case GST_PHOTOGRAPHY_SCENE_MODE_AUTO: default: - return QVariant::fromValue(QCameraExposure::ExposureAuto); + return QVariant::fromValue(QCamera::ExposureAuto); } } default: @@ -219,61 +219,61 @@ bool QGstreamerCameraExposure::setValue(ExposureParameter parameter, const QVari break; case QPlatformCameraExposure::ExposureMode: { - QCameraExposure::ExposureMode mode = value.value<QCameraExposure::ExposureMode>(); + QCamera::ExposureMode mode = value.value<QCamera::ExposureMode>(); GstPhotographySceneMode sceneMode; gst_photography_get_scene_mode(m_camera->photography(), &sceneMode); switch (mode) { - case QCameraExposure::ExposureManual: + case QCamera::ExposureManual: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_MANUAL; break; - case QCameraExposure::ExposurePortrait: + case QCamera::ExposurePortrait: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT; break; - case QCameraExposure::ExposureSports: + case QCamera::ExposureSports: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_SPORT; break; - case QCameraExposure::ExposureNight: + case QCamera::ExposureNight: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_NIGHT; break; - case QCameraExposure::ExposureAuto: + case QCamera::ExposureAuto: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_AUTO; break; - case QCameraExposure::ExposureLandscape: + case QCamera::ExposureLandscape: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE; break; - case QCameraExposure::ExposureSnow: + case QCamera::ExposureSnow: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_SNOW; break; - case QCameraExposure::ExposureBeach: + case QCamera::ExposureBeach: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_BEACH; break; - case QCameraExposure::ExposureAction: + case QCamera::ExposureAction: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_ACTION; break; - case QCameraExposure::ExposureNightPortrait: + case QCamera::ExposureNightPortrait: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT; break; - case QCameraExposure::ExposureTheatre: + case QCamera::ExposureTheatre: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_THEATRE; break; - case QCameraExposure::ExposureSunset: + case QCamera::ExposureSunset: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_SUNSET; break; - case QCameraExposure::ExposureSteadyPhoto: + case QCamera::ExposureSteadyPhoto: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO; break; - case QCameraExposure::ExposureFireworks: + case QCamera::ExposureFireworks: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS; break; - case QCameraExposure::ExposureParty: + case QCamera::ExposureParty: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_PARTY; break; - case QCameraExposure::ExposureCandlelight: + case QCamera::ExposureCandlelight: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT; break; - case QCameraExposure::ExposureBarcode: + case QCamera::ExposureBarcode: sceneMode = GST_PHOTOGRAPHY_SCENE_MODE_BARCODE; break; default: @@ -306,33 +306,33 @@ bool QGstreamerCameraExposure::setValue(ExposureParameter parameter, const QVari return false; } -QCameraExposure::FlashMode QGstreamerCameraExposure::flashMode() const +QCamera::FlashMode QGstreamerCameraExposure::flashMode() const { #if QT_CONFIG(gstreamer_photography) if (hasPhotography) { GstPhotographyFlashMode flashMode; gst_photography_get_flash_mode(m_camera->photography(), &flashMode); - QCameraExposure::FlashMode mode; + QCamera::FlashMode mode; switch (flashMode) { default: case GST_PHOTOGRAPHY_FLASH_MODE_AUTO: - mode = QCameraExposure::FlashAuto; + mode = QCamera::FlashAuto; break; case GST_PHOTOGRAPHY_FLASH_MODE_OFF: - mode = QCameraExposure::FlashOff; + mode = QCamera::FlashOff; break; case GST_PHOTOGRAPHY_FLASH_MODE_ON: - mode = QCameraExposure::FlashOn; + mode = QCamera::FlashOn; break; } return mode; } #endif - return QCameraExposure::FlashAuto; + return QCamera::FlashAuto; } -void QGstreamerCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) +void QGstreamerCameraExposure::setFlashMode(QCamera::FlashMode mode) { Q_UNUSED(mode); @@ -342,13 +342,13 @@ void QGstreamerCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) gst_photography_get_flash_mode(m_camera->photography(), &flashMode); switch (mode) { - case QCameraExposure::FlashAuto: + case QCamera::FlashAuto: flashMode = GST_PHOTOGRAPHY_FLASH_MODE_AUTO; break; - case QCameraExposure::FlashOff: + case QCamera::FlashOff: flashMode = GST_PHOTOGRAPHY_FLASH_MODE_OFF; break; - case QCameraExposure::FlashOn: + case QCamera::FlashOn: flashMode = GST_PHOTOGRAPHY_FLASH_MODE_ON; break; } @@ -358,14 +358,14 @@ void QGstreamerCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) #endif } -bool QGstreamerCameraExposure::isFlashModeSupported(QCameraExposure::FlashMode mode) const +bool QGstreamerCameraExposure::isFlashModeSupported(QCamera::FlashMode mode) const { #if QT_CONFIG(gstreamer_photography) if (hasPhotography) return true; #endif - return mode == QCameraExposure::FlashAuto; + return mode == QCamera::FlashAuto; } bool QGstreamerCameraExposure::isFlashReady() const diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure_p.h b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure_p.h index dd8ba34de..ecbd72e77 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure_p.h +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercameraexposure_p.h @@ -72,9 +72,9 @@ public: QVariant actualValue(ExposureParameter parameter) const override; bool setValue(ExposureParameter parameter, const QVariant &value) override; - QCameraExposure::FlashMode flashMode() const override; - void setFlashMode(QCameraExposure::FlashMode mode) override; - bool isFlashModeSupported(QCameraExposure::FlashMode mode) const override; + QCamera::FlashMode flashMode() const override; + void setFlashMode(QCamera::FlashMode mode) override; + bool isFlashModeSupported(QCamera::FlashMode mode) const override; bool isFlashReady() const override; diff --git a/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol.cpp b/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol.cpp index 4f5698b9d..63b0aade6 100644 --- a/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol.cpp +++ b/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE BbCameraExposureControl::BbCameraExposureControl(BbCameraSession *session, QObject *parent) : QPlatformCameraExposure(parent) , m_session(session) - , m_requestedExposureMode(QCameraExposure::ExposureAuto) + , m_requestedExposureMode(QCamera::ExposureAuto) { connect(m_session, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(statusChanged(QCamera::Status))); } @@ -101,22 +101,22 @@ QVariantList BbCameraExposureControl::supportedParameterRange(ExposureParameter for (int i = 0; i < supported; ++i) { switch (modes[i]) { case CAMERA_SCENE_AUTO: - exposureModes << QVariant::fromValue(QCameraExposure::ExposureAuto); + exposureModes << QVariant::fromValue(QCamera::ExposureAuto); break; case CAMERA_SCENE_SPORTS: - exposureModes << QVariant::fromValue(QCameraExposure::ExposureSports); + exposureModes << QVariant::fromValue(QCamera::ExposureSports); break; case CAMERA_SCENE_CLOSEUP: - exposureModes << QVariant::fromValue(QCameraExposure::ExposurePortrait); + exposureModes << QVariant::fromValue(QCamera::ExposurePortrait); break; case CAMERA_SCENE_ACTION: - exposureModes << QVariant::fromValue(QCameraExposure::ExposureSports); + exposureModes << QVariant::fromValue(QCamera::ExposureSports); break; case CAMERA_SCENE_BEACHANDSNOW: - exposureModes << QVariant::fromValue(QCameraExposure::ExposureBeach) << QVariant::fromValue(QCameraExposure::ExposureSnow); + exposureModes << QVariant::fromValue(QCamera::ExposureBeach) << QVariant::fromValue(QCamera::ExposureSnow); break; case CAMERA_SCENE_NIGHT: - exposureModes << QVariant::fromValue(QCameraExposure::ExposureNight); + exposureModes << QVariant::fromValue(QCamera::ExposureNight); break; default: break; } @@ -151,18 +151,18 @@ QVariant BbCameraExposureControl::actualValue(ExposureParameter parameter) const switch (sceneMode) { case CAMERA_SCENE_AUTO: - return QVariant::fromValue(QCameraExposure::ExposureAuto); + return QVariant::fromValue(QCamera::ExposureAuto); case CAMERA_SCENE_SPORTS: - return QVariant::fromValue(QCameraExposure::ExposureSports); + return QVariant::fromValue(QCamera::ExposureSports); case CAMERA_SCENE_CLOSEUP: - return QVariant::fromValue(QCameraExposure::ExposurePortrait); + return QVariant::fromValue(QCamera::ExposurePortrait); case CAMERA_SCENE_ACTION: - return QVariant::fromValue(QCameraExposure::ExposureSports); + return QVariant::fromValue(QCamera::ExposureSports); case CAMERA_SCENE_BEACHANDSNOW: - return (m_requestedExposureMode == QCameraExposure::ExposureBeach ? QVariant::fromValue(QCameraExposure::ExposureBeach) - : QVariant::fromValue(QCameraExposure::ExposureSnow)); + return (m_requestedExposureMode == QCamera::ExposureBeach ? QVariant::fromValue(QCamera::ExposureBeach) + : QVariant::fromValue(QCamera::ExposureSnow)); case CAMERA_SCENE_NIGHT: - return QVariant::fromValue(QCameraExposure::ExposureNight); + return QVariant::fromValue(QCamera::ExposureNight); default: break; } @@ -181,26 +181,26 @@ bool BbCameraExposureControl::setValue(ExposureParameter parameter, const QVaria camera_scenemode_t sceneMode = CAMERA_SCENE_DEFAULT; if (value.isValid()) { - m_requestedExposureMode = value.value<QCameraExposure::ExposureMode>(); + m_requestedExposureMode = value.value<QCamera::ExposureMode>(); emit requestedValueChanged(QPlatformCameraExposure::ExposureMode); switch (m_requestedExposureMode) { - case QCameraExposure::ExposureAuto: + case QCamera::ExposureAuto: sceneMode = CAMERA_SCENE_AUTO; break; - case QCameraExposure::ExposureSports: + case QCamera::ExposureSports: sceneMode = CAMERA_SCENE_SPORTS; break; - case QCameraExposure::ExposurePortrait: + case QCamera::ExposurePortrait: sceneMode = CAMERA_SCENE_CLOSEUP; break; - case QCameraExposure::ExposureBeach: + case QCamera::ExposureBeach: sceneMode = CAMERA_SCENE_BEACHANDSNOW; break; - case QCameraExposure::ExposureSnow: + case QCamera::ExposureSnow: sceneMode = CAMERA_SCENE_BEACHANDSNOW; break; - case QCameraExposure::ExposureNight: + case QCamera::ExposureNight: sceneMode = CAMERA_SCENE_NIGHT; break; default: @@ -227,12 +227,12 @@ void BbCameraExposureControl::statusChanged(QCamera::Status status) emit parameterRangeChanged(QPlatformCameraExposure::ExposureMode); } -QCameraExposure::FlashModes BbCameraExposureControl::flashMode() const +QCamera::FlashModes BbCameraExposureControl::flashMode() const { return m_flashMode; } -void BbCameraExposureControl::setFlashMode(QCameraExposure::FlashModes mode) +void BbCameraExposureControl::setFlashMode(QCamera::FlashModes mode) { if (m_flashMode == mode) return; @@ -240,7 +240,7 @@ void BbCameraExposureControl::setFlashMode(QCameraExposure::FlashModes mode) if (m_session->status() != QCamera::ActiveStatus) // can only be changed when viewfinder is active return; -// if (m_flashMode == QCameraExposure::FlashVideoLight) { +// if (m_flashMode == QCamera::FlashVideoLight) { // const camera_error_t result = camera_config_videolight(m_session->handle(), CAMERA_VIDEOLIGHT_OFF); // if (result != CAMERA_EOK) // qWarning() << "Unable to switch off video light:" << result; @@ -248,7 +248,7 @@ void BbCameraExposureControl::setFlashMode(QCameraExposure::FlashModes mode) m_flashMode = mode; -// if (m_flashMode == QCameraExposure::FlashVideoLight) { +// if (m_flashMode == QCamera::FlashVideoLight) { // const camera_error_t result = camera_config_videolight(m_session->handle(), CAMERA_VIDEOLIGHT_ON); // if (result != CAMERA_EOK) // qWarning() << "Unable to switch on video light:" << result; @@ -256,11 +256,11 @@ void BbCameraExposureControl::setFlashMode(QCameraExposure::FlashModes mode) { camera_flashmode_t flashMode = CAMERA_FLASH_AUTO; - if (m_flashMode == QCameraExposure::FlashAuto) + if (m_flashMode == QCamera::FlashAuto) flashMode = CAMERA_FLASH_AUTO; - else if (mode == QCameraExposure::FlashOff) + else if (mode == QCamera::FlashOff) flashMode = CAMERA_FLASH_OFF; - else if (mode == QCameraExposure::FlashOn) + else if (mode == QCamera::FlashOn) flashMode = CAMERA_FLASH_ON; const camera_error_t result = camera_config_flash(m_session->handle(), flashMode); @@ -269,9 +269,9 @@ void BbCameraExposureControl::setFlashMode(QCameraExposure::FlashModes mode) } } -bool BbCameraExposureControl::isFlashModeSupported(QCameraExposure::FlashModes mode) const +bool BbCameraExposureControl::isFlashModeSupported(QCamera::FlashModes mode) const { - // ### Videolight maps to QCameraExposure::TorchOn. + // ### Videolight maps to QCamera::TorchOn. // bool supportsVideoLight = false; // if (m_session->handle() != CAMERA_HANDLE_INVALID) { // supportsVideoLight = camera_has_feature(m_session->handle(), CAMERA_FEATURE_VIDEOLIGHT); diff --git a/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol_p.h b/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol_p.h index fec8bf526..60ffcd0f0 100644 --- a/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol_p.h +++ b/src/multimedia/platform/qnx/camera/bbcameraexposurecontrol_p.h @@ -69,9 +69,9 @@ public: QVariant actualValue(ExposureParameter parameter) const override; bool setValue(ExposureParameter parameter, const QVariant& value) override; - QCameraExposure::FlashMode flashMode() const override; - void setFlashMode(QCameraExposure::FlashMode mode) override; - bool isFlashModeSupported(QCameraExposure::FlashMode mode) const override; + QCamera::FlashMode flashMode() const override; + void setFlashMode(QCamera::FlashMode mode) override; + bool isFlashModeSupported(QCamera::FlashMode mode) const override; bool isFlashReady() const override; private Q_SLOTS: @@ -79,9 +79,9 @@ private Q_SLOTS: private: BbCameraSession *m_session; - QCameraExposure::ExposureMode m_requestedExposureMode; + QCamera::ExposureMode m_requestedExposureMode; - QCameraExposure::FlashMode m_flashMode = QCameraExposure::FlashAuto; + QCamera::FlashMode m_flashMode = QCamera::FlashAuto; }; QT_END_NAMESPACE diff --git a/src/multimedia/platform/qplatformcameraexposure.cpp b/src/multimedia/platform/qplatformcameraexposure.cpp index 9b2207cbd..d5bf56fa7 100644 --- a/src/multimedia/platform/qplatformcameraexposure.cpp +++ b/src/multimedia/platform/qplatformcameraexposure.cpp @@ -87,7 +87,7 @@ QPlatformCameraExposure::QPlatformCameraExposure(QObject *parent) Accepted power range is [0..1.0], with 0 value means no light and 1.0 corresponds to full torch power. - This value is only used in the \l{QCameraExposure::FlashVideolight}{torch flash mode}. + This value is only used in the \l{QCamera::FlashVideolight}{torch flash mode}. \value ExposureMode Camera exposure mode. */ diff --git a/src/multimedia/platform/qplatformcameraexposure_p.h b/src/multimedia/platform/qplatformcameraexposure_p.h index 76a7c04c7..11c709e24 100644 --- a/src/multimedia/platform/qplatformcameraexposure_p.h +++ b/src/multimedia/platform/qplatformcameraexposure_p.h @@ -54,7 +54,6 @@ #include <QtCore/qobject.h> #include <QtMultimedia/qtmultimediaglobal.h> -#include <QtMultimedia/qcameraexposure.h> #include <QtMultimedia/qcamera.h> #include <QtMultimedia/qmediaenumdebug.h> @@ -85,13 +84,13 @@ public: virtual QVariant actualValue(ExposureParameter parameter) const = 0; virtual bool setValue(ExposureParameter parameter, const QVariant& value) = 0; - virtual QCameraExposure::FlashMode flashMode() const = 0; - virtual void setFlashMode(QCameraExposure::FlashMode mode) = 0; - virtual bool isFlashModeSupported(QCameraExposure::FlashMode mode) const = 0; + virtual QCamera::FlashMode flashMode() const = 0; + virtual void setFlashMode(QCamera::FlashMode mode) = 0; + virtual bool isFlashModeSupported(QCamera::FlashMode mode) const = 0; - virtual QCameraExposure::TorchMode torchMode() const { return QCameraExposure::TorchOff; } - virtual void setTorchMode(QCameraExposure::TorchMode /*mode*/) {} - virtual bool isTorchModeSupported(QCameraExposure::TorchMode mode) const { return mode == QCameraExposure::TorchOff; } + virtual QCamera::TorchMode torchMode() const { return QCamera::TorchOff; } + virtual void setTorchMode(QCamera::TorchMode /*mode*/) {} + virtual bool isTorchModeSupported(QCamera::TorchMode mode) const { return mode == QCamera::TorchOff; } virtual bool isFlashReady() const = 0; diff --git a/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure.cpp b/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure.cpp index 548d78d9f..e5ec4cf83 100644 --- a/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure.cpp +++ b/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure.cpp @@ -78,16 +78,16 @@ bool QWindowsCameraExposure::setValue(ExposureParameter parameter, const QVarian return false; } -QCameraExposure::FlashMode QWindowsCameraExposure::flashMode() const +QCamera::FlashMode QWindowsCameraExposure::flashMode() const { - return QCameraExposure::FlashOff; + return QCamera::FlashOff; } -void QWindowsCameraExposure::setFlashMode(QCameraExposure::FlashMode mode) +void QWindowsCameraExposure::setFlashMode(QCamera::FlashMode mode) { } -bool QWindowsCameraExposure::isFlashModeSupported(QCameraExposure::FlashMode mode) const +bool QWindowsCameraExposure::isFlashModeSupported(QCamera::FlashMode mode) const { return false; } @@ -97,16 +97,16 @@ bool QWindowsCameraExposure::isFlashReady() const return false; } -QCameraExposure::TorchMode QWindowsCameraExposure::torchMode() const +QCamera::TorchMode QWindowsCameraExposure::torchMode() const { - return QCameraExposure::TorchOff; + return QCamera::TorchOff; } -void QWindowsCameraExposure::setTorchMode(QCameraExposure::TorchMode mode) +void QWindowsCameraExposure::setTorchMode(QCamera::TorchMode mode) { } -bool QWindowsCameraExposure::isTorchModeSupported(QCameraExposure::TorchMode mode) const +bool QWindowsCameraExposure::isTorchModeSupported(QCamera::TorchMode mode) const { return false; } diff --git a/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure_p.h b/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure_p.h index 9fecdd53e..aa2b4c421 100644 --- a/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure_p.h +++ b/src/multimedia/platform/windows/mediacapture/qwindowscameraexposure_p.h @@ -70,14 +70,14 @@ public: QVariant actualValue(ExposureParameter parameter) const override; bool setValue(ExposureParameter parameter, const QVariant& value) override; - QCameraExposure::FlashMode flashMode() const override; - void setFlashMode(QCameraExposure::FlashMode mode) override; - bool isFlashModeSupported(QCameraExposure::FlashMode mode) const override; + QCamera::FlashMode flashMode() const override; + void setFlashMode(QCamera::FlashMode mode) override; + bool isFlashModeSupported(QCamera::FlashMode mode) const override; bool isFlashReady() const override; - QCameraExposure::TorchMode torchMode() const override; - void setTorchMode(QCameraExposure::TorchMode mode) override; - bool isTorchModeSupported(QCameraExposure::TorchMode mode) const override; + QCamera::TorchMode torchMode() const override; + void setTorchMode(QCamera::TorchMode mode) override; + bool isTorchModeSupported(QCamera::TorchMode mode) const override; private: QWindowsCameraSession *m_session; |