diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2017-11-24 08:36:36 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2017-12-14 10:50:55 +0000 |
commit | b69259b65707acc9fc3c0818f6affe53938cebc3 (patch) | |
tree | 4eec3c8b9d224aa46f3ff9f8a9fe3ffbf58a1c59 /src/plugins/directshow | |
parent | 68abdc5bb2042a0f896e822eecd5ed49350c0c43 (diff) | |
download | qtmultimedia-b69259b65707acc9fc3c0818f6affe53938cebc3.tar.gz |
DirectShow: Fix rendering of overlapping MDI subwindows
Media type MEDIASUBTYPE_RGB32 is 32 bytes per pixel (like 0x00RRGGBB).
When MDI subwindows are overlapping
bottom window with QImage::Format_RGB32 requires 0xffRRGGBB.
If "not used byte" is not 0xFF rendering will not be correct
(0x00 produces empty image).
Changed samples to ARGB32 to provide alpha channel, which is 0xFF in
most cases.
If alpha channel is not set to 0xFF, the bottom window will still be
rendered incorrectly.
Task-number: QTBUG-51405
Change-Id: I69f15d3835f901a04bf39b079394c6292b793610
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/directshow')
-rw-r--r-- | src/plugins/directshow/camera/dscamerasession.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 55ab868ce..dc0dfc8b3 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -815,8 +815,8 @@ bool DSCameraSession::configurePreviewFormat() return false; } - // Set sample grabber format (always RGB32) - static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_RGB32, 0, 0, 0, FORMAT_VideoInfo, nullptr, 0, nullptr}; + // Set sample grabber format + static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_ARGB32, 0, 0, 0, FORMAT_VideoInfo, nullptr, 0, nullptr}; if (!m_previewSampleGrabber->setMediaType(&grabberFormat)) return false; |