summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-20 19:31:49 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-20 19:31:49 +0200
commitbf43be097a90ed17b2807a4a7096b0a9f9c3fb8d (patch)
treed4ef32b6eb9309e9556ebb70bf11bd4f9e33dd01
parent2a939e540a70569ae917d12c4f0459077d0df8e7 (diff)
parenta0ee969c8d2f74382c0a8c9c77642d48a602577f (diff)
Merge 5.7 into 5.7.0
-rw-r--r--src/gsttools/qgstreamerbushelper.cpp2
-rw-r--r--src/multimedia/doc/qtmultimedia.qdocconf3
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.cpp35
3 files changed, 26 insertions, 14 deletions
diff --git a/src/gsttools/qgstreamerbushelper.cpp b/src/gsttools/qgstreamerbushelper.cpp
index bd35d4b0..89b2c4ae 100644
--- a/src/gsttools/qgstreamerbushelper.cpp
+++ b/src/gsttools/qgstreamerbushelper.cpp
@@ -58,7 +58,7 @@ public:
m_tag(0),
m_bus(bus),
m_helper(parent),
- m_intervalTimer(nullptr)
+ m_intervalTimer(Q_NULLPTR)
{
// glib event loop can be disabled either by env variable or QT_NO_GLIB define, so check the dispacher
QAbstractEventDispatcher *dispatcher = QCoreApplication::eventDispatcher();
diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf
index 2ea23e2e..e3d3827c 100644
--- a/src/multimedia/doc/qtmultimedia.qdocconf
+++ b/src/multimedia/doc/qtmultimedia.qdocconf
@@ -43,9 +43,6 @@ qhp.QtMultimedia.subprojects.examples.sortPages = true
exampledirs += ../../../examples \
snippets
-# Specify example install dir under QT_INSTALL_EXAMPLES
-examplesinstallpath = qtmultimedia
-
headerdirs += ../..
imagedirs += src/images \
diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp
index 40946270..a4584487 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameracontrol.cpp
@@ -101,15 +101,30 @@ HRESULT getMediaStreamResolutions(IMediaDeviceController *device,
ComPtr<IMediaEncodingProperties> properties;
hr = (*propertiesList)->GetAt(index, &properties);
Q_ASSERT_SUCCEEDED(hr);
- ComPtr<IVideoEncodingProperties> videoProperties;
- hr = properties.As(&videoProperties);
- Q_ASSERT_SUCCEEDED(hr);
- UINT32 width, height;
- hr = videoProperties->get_Width(&width);
- Q_ASSERT_SUCCEEDED(hr);
- hr = videoProperties->get_Height(&height);
- Q_ASSERT_SUCCEEDED(hr);
- resolutions->append(QSize(width, height));
+ if (type == MediaStreamType_VideoRecord || type == MediaStreamType_VideoPreview) {
+ ComPtr<IVideoEncodingProperties> videoProperties;
+ hr = properties.As(&videoProperties);
+ Q_ASSERT_SUCCEEDED(hr);
+ UINT32 width, height;
+ hr = videoProperties->get_Width(&width);
+ Q_ASSERT_SUCCEEDED(hr);
+ hr = videoProperties->get_Height(&height);
+ Q_ASSERT_SUCCEEDED(hr);
+ resolutions->append(QSize(width, height));
+ } else if (type == MediaStreamType_Photo) {
+ ComPtr<IImageEncodingProperties> imageProperties;
+ hr = properties.As(&imageProperties);
+ // Asking for Photo also returns video resolutions in addition
+ // We skip those, as we are only interested in image Type
+ if (FAILED(hr) || !imageProperties)
+ continue;
+ UINT32 width, height;
+ hr = imageProperties->get_Width(&width);
+ Q_ASSERT_SUCCEEDED(hr);
+ hr = imageProperties->get_Height(&height);
+ Q_ASSERT_SUCCEEDED(hr);
+ resolutions->append(QSize(width, height));
+ }
}
return resolutions->isEmpty() ? MF_E_INVALID_FORMAT : hr;
}
@@ -617,7 +632,7 @@ void QWinRTCameraControl::setState(QCamera::State state)
}
QCameraFocus::FocusModes focusMode = d->cameraFocusControl->focusMode();
- if (setFocus(focusMode) && focusMode == QCameraFocus::ContinuousFocus)
+ if (focusMode != 0 && setFocus(focusMode) && focusMode == QCameraFocus::ContinuousFocus)
focus();
d->state = QCamera::ActiveState;