diff options
author | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2016-04-15 08:33:42 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2016-04-22 11:44:45 +0000 |
commit | a0a20157efab21c07f327c70bd8603b5973f9a39 (patch) | |
tree | a2092133497002d2cc701991966209bc5024acba /src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp | |
parent | 65c9e24c10c7fe715c897572d8f3e5210ea13e07 (diff) |
winrt: fix camera control after move to xaml thread
Camera control management has to happen inside the xaml thread,
otherwise the behavior is undefined. This results in ie. the first
capture not working due to synchronization issues.
When (de-)activating the videoRenderer we have to switch to the UI
thread first.
In addition add focus for Windows 10 (Mobile), previously it was compiled
for Windows Phone 8.1 only. On desktop this might return no focus mode
to be supported, but API-wise this is available.
Task-number: QTBUG-47803
Change-Id: I9b345ebc82502fc6e00aede43b9096893cd0ad53
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp')
-rw-r--r-- | src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp b/src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp index fe07581c9..796a36f55 100644 --- a/src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp +++ b/src/plugins/winrt/qwinrtcameravideorenderercontrol.cpp @@ -48,7 +48,7 @@ #include "qwinrtcameracontrol.h" -#ifdef Q_OS_WINPHONE +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) #include <Windows.Security.ExchangeActiveSyncProvisioning.h> using namespace ABI::Windows::Security::ExchangeActiveSyncProvisioning; #endif @@ -58,7 +58,7 @@ using namespace Microsoft::WRL::Wrappers; QT_BEGIN_NAMESPACE -#ifdef Q_OS_WINPHONE +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) template <int n> static bool blacklisted(const wchar_t (&blackListName)[n], const HString &deviceModel) { @@ -282,7 +282,7 @@ QWinRTCameraVideoRendererControl::QWinRTCameraVideoRendererControl(const QSize & d->cameraSampleformat = QVideoFrame::Format_User; d->videoProbesCounter = 0; -#ifdef Q_OS_WINPHONE +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) // Workaround for certain devices which fail to blit. ComPtr<IEasClientDeviceInformation> deviceInfo; HRESULT hr = RoActivateInstance(HString::MakeReference(RuntimeClass_Windows_Security_ExchangeActiveSyncProvisioning_EasClientDeviceInformation).Get(), |