summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/camera/dscameracontrol.h
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-04-07 14:24:51 +0200
committerYoann Lopes <yoann.lopes@digia.com>2014-07-11 18:47:12 +0200
commit389d66b3ed5e2d798e9fb124064523239c393ad8 (patch)
treee297dd513433e1f2c117083af1d0b46cb625865d /src/plugins/directshow/camera/dscameracontrol.h
parentf352e44df9907bbefe4c962a06c7a7c87516dd90 (diff)
DirectShow: Refactor camera backend.
Almost entire rewrite of the camera backend. It doesn't provide new features but is more stable and behave as it should. - Correctly report camera state and status - Correctly report if the camera is ready to capture - Emit imageExposed() signal - Save captured images in an appropriate directory - Images can be captured even without a viewport - Better error handling Removed the custom QVideoWidgetControl as it doesn't provide anything more than the QVideoWidget's renderer control fallback. Task-number: QTBUG-33782 Change-Id: I9baf6f83e7c69619f20a101921f7865a1c90d5e4 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins/directshow/camera/dscameracontrol.h')
-rw-r--r--src/plugins/directshow/camera/dscameracontrol.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/directshow/camera/dscameracontrol.h b/src/plugins/directshow/camera/dscameracontrol.h
index 5c7661643..36ab515bf 100644
--- a/src/plugins/directshow/camera/dscameracontrol.h
+++ b/src/plugins/directshow/camera/dscameracontrol.h
@@ -58,28 +58,21 @@ public:
DSCameraControl(QObject *parent = 0);
~DSCameraControl();
- void start();
- void stop();
- QCamera::State state() const;
+ QCamera::State state() const { return m_state; }
QCamera::CaptureModes captureMode() const { return m_captureMode; }
- void setCaptureMode(QCamera::CaptureModes mode)
- {
- if (m_captureMode != mode) {
- m_captureMode = mode;
- emit captureModeChanged(mode);
- }
- }
+ void setCaptureMode(QCamera::CaptureModes mode);
void setState(QCamera::State state);
- QCamera::Status status() const { return QCamera::UnavailableStatus; }
+ QCamera::Status status() const;
bool isCaptureModeSupported(QCamera::CaptureModes mode) const;
bool canChangeProperty(PropertyChangeType /* changeType */, QCamera::Status /* status */) const {return false; }
private:
DSCameraSession *m_session;
DSCameraService *m_service;
+ QCamera::State m_state;
QCamera::CaptureModes m_captureMode;
};