summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-04-14 03:00:58 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-04-14 03:00:58 +0200
commit457181d73c5bc188cfea13e13dbe930de3b993d3 (patch)
tree284ad58d191f7defd07c55393c426499c9970f6f
parentd5a1385c7df4714df571d7f80916708b47767a57 (diff)
parent7bd13d3f98a6f1f9cf7aed122fd2f301fbae9d62 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
-rw-r--r--src/plugins/directshow/camera/dscamerasession.cpp9
-rw-r--r--src/plugins/directshow/common/directshowmediatype.cpp8
-rw-r--r--tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h6
3 files changed, 17 insertions, 6 deletions
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp
index cee3e9c56..7703aa498 100644
--- a/src/plugins/directshow/camera/dscamerasession.cpp
+++ b/src/plugins/directshow/camera/dscamerasession.cpp
@@ -1146,9 +1146,14 @@ void DSCameraSession::updateSourceCapabilities()
m_supportedViewfinderSettings.append(settings);
m_supportedFormats.append(DirectShowMediaType(*pmt));
}
-
-
+ } else {
+ OLECHAR *guidString = nullptr;
+ StringFromCLSID(pmt->subtype, &guidString);
+ if (guidString)
+ qWarning() << "Unsupported media type:" << QString::fromWCharArray(guidString);
+ ::CoTaskMemFree(guidString);
}
+
DirectShowMediaType::deleteType(pmt);
}
}
diff --git a/src/plugins/directshow/common/directshowmediatype.cpp b/src/plugins/directshow/common/directshowmediatype.cpp
index 37106586a..3429f4848 100644
--- a/src/plugins/directshow/common/directshowmediatype.cpp
+++ b/src/plugins/directshow/common/directshowmediatype.cpp
@@ -40,6 +40,11 @@
#include "directshowmediatype.h"
#include "directshowglobal.h"
+#include <initguid.h>
+
+DEFINE_GUID(MEDIASUBTYPE_Y800, 0x30303859, 0x0000, 0x0010, 0x80, 0x00,
+ 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
+
namespace
{
struct TypeLookup
@@ -66,7 +71,8 @@ namespace
{ QVideoFrame::Format_NV12, MEDIASUBTYPE_NV12 },
{ QVideoFrame::Format_YUV420P, MEDIASUBTYPE_IYUV },
{ QVideoFrame::Format_YUV420P, MEDIASUBTYPE_I420 },
- { QVideoFrame::Format_Jpeg, MEDIASUBTYPE_MJPG }
+ { QVideoFrame::Format_Jpeg, MEDIASUBTYPE_MJPG },
+ { QVideoFrame::Format_Y8, MEDIASUBTYPE_Y800 },
};
}
diff --git a/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h b/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h
index daa9f28b6..96e2ebc52 100644
--- a/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h
+++ b/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h
@@ -59,9 +59,9 @@ public:
bool isFlashModeSupported(QCameraExposure::FlashModes mode) const
{
- return (mode || (QCameraExposure::FlashAuto | QCameraExposure::FlashOff | QCameraExposure::FlashOn |
- QCameraExposure::FlashFill |QCameraExposure::FlashTorch |QCameraExposure::FlashSlowSyncFrontCurtain |
- QCameraExposure::FlashRedEyeReduction));
+ return (mode & (QCameraExposure::FlashAuto | QCameraExposure::FlashOff | QCameraExposure::FlashOn |
+ QCameraExposure::FlashFill |QCameraExposure::FlashTorch |QCameraExposure::FlashSlowSyncFrontCurtain |
+ QCameraExposure::FlashRedEyeReduction));
}
bool isFlashReady() const