summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.cpp4
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.h4
-rw-r--r--src/plugins/winrt/qwinrtcameraimagecapturecontrol.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp
index 19b718cdd..b0446cd57 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameracontrol.cpp
@@ -775,10 +775,10 @@ QCameraLocksControl *QWinRTCameraControl::cameraLocksControl() const
return d->cameraLocksControl;
}
-IMediaCapture *QWinRTCameraControl::handle() const
+Microsoft::WRL::ComPtr<ABI::Windows::Media::Capture::IMediaCapture> QWinRTCameraControl::handle() const
{
Q_D(const QWinRTCameraControl);
- return d->capture.Get();
+ return d->capture;
}
void QWinRTCameraControl::onBufferRequested()
diff --git a/src/plugins/winrt/qwinrtcameracontrol.h b/src/plugins/winrt/qwinrtcameracontrol.h
index b3c86adf9..1c0cbd808 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.h
+++ b/src/plugins/winrt/qwinrtcameracontrol.h
@@ -40,6 +40,8 @@
#include <QtMultimedia/QCameraControl>
#include <QtCore/qt_windows.h>
+#include <wrl.h>
+
namespace ABI {
namespace Windows {
namespace Media {
@@ -90,7 +92,7 @@ public:
QCameraFocusControl *cameraFocusControl() const;
QCameraLocksControl *cameraLocksControl() const;
- ABI::Windows::Media::Capture::IMediaCapture *handle() const;
+ Microsoft::WRL::ComPtr<ABI::Windows::Media::Capture::IMediaCapture> handle() const;
bool setFocus(QCameraFocus::FocusModes mode);
bool setFocusPoint(const QPointF &point);
diff --git a/src/plugins/winrt/qwinrtcameraimagecapturecontrol.cpp b/src/plugins/winrt/qwinrtcameraimagecapturecontrol.cpp
index ae67e33f4..67f12f264 100644
--- a/src/plugins/winrt/qwinrtcameraimagecapturecontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameraimagecapturecontrol.cpp
@@ -147,7 +147,7 @@ int QWinRTCameraImageCaptureControl::capture(const QString &fileName)
Q_D(QWinRTCameraImageCaptureControl);
++d->currentCaptureId;
- IMediaCapture *capture = d->cameraControl->handle();
+ ComPtr<IMediaCapture> capture = d->cameraControl->handle();
if (!capture) {
emit error(d->currentCaptureId, QCameraImageCapture::NotReadyError, tr("Camera not ready"));
return -1;