summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Stromme <christian.stromme@qt.io>2016-11-22 18:57:30 +0100
committerChristian Stromme <christian.stromme@qt.io>2017-05-03 13:29:38 +0000
commit960fbf083be4391314e8fe36994a133763dbbe7d (patch)
tree53820fa8f16e383877b7943b86dd187d6bf7f99e /src
parentc50fb7493753606cd436b08d33022f9b789dd2ea (diff)
DirectShow: Expose the camera control interfacev5.9.0-beta4
The interface is needed to implement Qt's camera control classes. Change-Id: I468527dd1f5e9e7a0f8868f0b7addc3c069adf54 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/directshow/camera/dscamerasession.cpp20
-rw-r--r--src/plugins/directshow/camera/dscamerasession.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp
index 40e54a94..3f1187ba 100644
--- a/src/plugins/directshow/camera/dscamerasession.cpp
+++ b/src/plugins/directshow/camera/dscamerasession.cpp
@@ -334,6 +334,26 @@ void DSCameraSession::setImageProcessingParameter(
}
}
+bool DSCameraSession::getCameraControlInterface(IAMCameraControl **cameraControl) const
+{
+ if (!m_sourceFilter) {
+ qCDebug(qtDirectShowPlugin, "getCameraControlInterface failed: No capture filter!");
+ return false;
+ }
+
+ if (!cameraControl) {
+ qCDebug(qtDirectShowPlugin, "getCameraControlInterface failed: Invalid out argument!");
+ return false;
+ }
+
+ if (FAILED(m_sourceFilter->QueryInterface(IID_IAMCameraControl, reinterpret_cast<void **>(cameraControl)))) {
+ qCDebug(qtDirectShowPlugin, "getCameraControlInterface failed: Querying camera control failed!");
+ return false;
+ }
+
+ return true;
+}
+
bool DSCameraSession::load()
{
unload();
diff --git a/src/plugins/directshow/camera/dscamerasession.h b/src/plugins/directshow/camera/dscamerasession.h
index 37730736..6b6cb49b 100644
--- a/src/plugins/directshow/camera/dscamerasession.h
+++ b/src/plugins/directshow/camera/dscamerasession.h
@@ -118,6 +118,8 @@ public:
QCameraImageProcessingControl::ProcessingParameter,
const QVariant &);
+ bool getCameraControlInterface(IAMCameraControl **cameraControl) const;
+
Q_SIGNALS:
void statusChanged(QCamera::Status);
void imageExposed(int id);