diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/multimedia/plugins.qmltypes | 10 | ||||
-rw-r--r-- | src/imports/multimedia/qdeclarativecamera.cpp | 6 | ||||
-rw-r--r-- | src/imports/multimedia/qdeclarativecamera_p.h | 5 | ||||
-rw-r--r-- | src/multimedia/camera/qcamera.cpp | 9 | ||||
-rw-r--r-- | src/multimedia/camera/qcamera.h | 5 | ||||
-rw-r--r-- | src/plugins/avfoundation/camera/avfcameracontrol.mm | 8 | ||||
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp | 2 |
7 files changed, 8 insertions, 37 deletions
diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes index 3e3298969..2450865d5 100644 --- a/src/imports/multimedia/plugins.qmltypes +++ b/src/imports/multimedia/plugins.qmltypes @@ -342,10 +342,7 @@ Module { name: "Error" values: { "NoError": 0, - "CameraError": 1, - "InvalidRequestError": 2, - "ServiceMissingError": 3, - "NotSupportedFeatureError": 4 + "CameraError": 1 } } Enum { @@ -626,10 +623,7 @@ Module { name: "Error" values: { "NoError": 0, - "CameraError": 1, - "InvalidRequestError": 2, - "ServiceMissingError": 3, - "NotSupportedFeatureError": 4 + "CameraError": 1 } } Enum { diff --git a/src/imports/multimedia/qdeclarativecamera.cpp b/src/imports/multimedia/qdeclarativecamera.cpp index f36c0c6af..769c0960f 100644 --- a/src/imports/multimedia/qdeclarativecamera.cpp +++ b/src/imports/multimedia/qdeclarativecamera.cpp @@ -738,12 +738,6 @@ void QDeclarativeCamera::setDigitalZoom(qreal value) No errors have occurred. \value Camera.CameraError An error has occurred. - \value Camera.InvalidRequestError - System resources do not support the requested functionality. - \value Camera.ServiceMissingError - No camera service available. - \value Camera.NotSupportedFeatureError - The feature is not supported. \sa errorOccurred, errorString */ diff --git a/src/imports/multimedia/qdeclarativecamera_p.h b/src/imports/multimedia/qdeclarativecamera_p.h index 62454aeb6..f2cb38b51 100644 --- a/src/imports/multimedia/qdeclarativecamera_p.h +++ b/src/imports/multimedia/qdeclarativecamera_p.h @@ -164,10 +164,7 @@ public: enum Error { NoError = QCamera::NoError, - CameraError = QCamera::CameraError, - InvalidRequestError = QCamera::InvalidRequestError, - ServiceMissingError = QCamera::ServiceMissingError, - NotSupportedFeatureError = QCamera::NotSupportedFeatureError + CameraError = QCamera::CameraError }; enum FlashMode { diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp index a4af35510..6efe844d8 100644 --- a/src/multimedia/camera/qcamera.cpp +++ b/src/multimedia/camera/qcamera.cpp @@ -113,7 +113,7 @@ void QCameraPrivate::setState(QCamera::State newState) unsetError(); if (!control) { - _q_error(QCamera::ServiceMissingError, QCamera::tr("The camera service is missing")); + _q_error(QCamera::CameraError, QCamera::tr("The camera service is missing")); return; } @@ -196,7 +196,7 @@ void QCameraPrivate::initControls() control = nullptr; deviceControl = nullptr; - error = QCamera::ServiceMissingError; + error = QCamera::CameraError; errorString = QCamera::tr("The camera service is missing"); } } @@ -340,7 +340,7 @@ QCamera::QCamera(const QByteArray& deviceName, QObject *parent): } d->control = nullptr; d->deviceControl = nullptr; - d->error = QCamera::ServiceMissingError; + d->error = QCamera::CameraError; d->errorString = QCamera::tr("The camera service is missing"); } } @@ -1139,9 +1139,6 @@ void QCamera::unlock() \value NoError No errors have occurred. \value CameraError An error has occurred. - \value InvalidRequestError System resource doesn't support requested functionality. - \value ServiceMissingError No camera service available. - \value NotSupportedFeatureError The feature is not supported. */ /*! diff --git a/src/multimedia/camera/qcamera.h b/src/multimedia/camera/qcamera.h index b90cb7ec9..13e88b576 100644 --- a/src/multimedia/camera/qcamera.h +++ b/src/multimedia/camera/qcamera.h @@ -124,10 +124,7 @@ public: enum Error { NoError, - CameraError, - InvalidRequestError, - ServiceMissingError, - NotSupportedFeatureError + CameraError }; enum LockStatus diff --git a/src/plugins/avfoundation/camera/avfcameracontrol.mm b/src/plugins/avfoundation/camera/avfcameracontrol.mm index b36e4935d..a6bc91995 100644 --- a/src/plugins/avfoundation/camera/avfcameracontrol.mm +++ b/src/plugins/avfoundation/camera/avfcameracontrol.mm @@ -112,19 +112,13 @@ void AVFCameraControl::setCaptureMode(QCamera::CaptureModes mode) if (m_captureMode == mode) return; - if (!isCaptureModeSupported(mode)) { - Q_EMIT error(QCamera::NotSupportedFeatureError, tr("Requested capture mode is not supported")); - return; - } - m_captureMode = mode; Q_EMIT captureModeChanged(mode); } bool AVFCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const { - //all the capture modes are supported, including QCamera::CaptureStillImage | QCamera::CaptureVideo - return (mode & (QCamera::CaptureStillImage | QCamera::CaptureVideo)) == mode; + return true; } bool AVFCameraControl::canChangeProperty(QCameraControl::PropertyChangeType changeType, QCamera::Status status) const diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp index 601a09e31..5afbdd7cf 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp @@ -122,8 +122,6 @@ void QGstreamerCameraControl::setState(QCamera::State state) #endif } break; - default: - emit error(QCamera::NotSupportedFeatureError, tr("State not supported.")); } updateStatus(); |