diff options
-rw-r--r-- | src/plugins/directshow/camera/dscamerasession.cpp | 9 | ||||
-rw-r--r-- | src/plugins/directshow/common/directshowmediatype.cpp | 8 | ||||
-rw-r--r-- | tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h | 6 |
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 |