summaryrefslogtreecommitdiffstats
path: root/src/plugins/common
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-20 13:04:00 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-20 12:03:33 +0000
commit9649a6ed9853fda10392b8cf332ddc94c7361d09 (patch)
tree1418a52092a17854e26c0347825509006b76003b /src/plugins/common
parent523494be2dd799eb838ef4724de77111ce77c8f3 (diff)
DirectShow: Change parameter of qt_evr_pixelFormatFromD3DFormat() to DWORD
Fixes g++ warnings: ..\common\evr\evrhelpers.cpp: In function 'QVideoFrame::PixelFormat qt_evr_pixelFormatFromD3DFormat(D3DFORMAT)': ..\common\evr\evrhelpers.cpp:143:5: warning: case value '842094158' not in enumerated type 'D3DFORMAT {aka _D3DFORMAT}' [-Wswitch] case D3DFMT_NV12: ..\common\evr\evrhelpers.cpp:145:5: warning: case value '842094169' not in enumerated type 'D3DFORMAT {aka _D3DFORMAT}' [-Wswitch] case D3DFMT_YV12: Change-Id: I11869144b34d848bd68434d3a062852608518978 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/common')
-rw-r--r--src/plugins/common/evr/evrd3dpresentengine.cpp2
-rw-r--r--src/plugins/common/evr/evrhelpers.cpp2
-rw-r--r--src/plugins/common/evr/evrhelpers.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/common/evr/evrd3dpresentengine.cpp b/src/plugins/common/evr/evrd3dpresentengine.cpp
index 4bc2bac83..043d0ad73 100644
--- a/src/plugins/common/evr/evrd3dpresentengine.cpp
+++ b/src/plugins/common/evr/evrd3dpresentengine.cpp
@@ -515,7 +515,7 @@ done:
if (SUCCEEDED(hr)) {
m_surfaceFormat = QVideoSurfaceFormat(QSize(width, height),
m_useTextureRendering ? QVideoFrame::Format_RGB32
- : qt_evr_pixelFormatFromD3DFormat((D3DFORMAT)d3dFormat),
+ : qt_evr_pixelFormatFromD3DFormat(d3dFormat),
m_useTextureRendering ? QAbstractVideoBuffer::GLTextureHandle
: QAbstractVideoBuffer::NoHandle);
} else {
diff --git a/src/plugins/common/evr/evrhelpers.cpp b/src/plugins/common/evr/evrhelpers.cpp
index f4710b1a0..96b61e2eb 100644
--- a/src/plugins/common/evr/evrhelpers.cpp
+++ b/src/plugins/common/evr/evrhelpers.cpp
@@ -117,7 +117,7 @@ bool qt_evr_isSampleTimePassed(IMFClock *clock, IMFSample *sample)
return false;
}
-QVideoFrame::PixelFormat qt_evr_pixelFormatFromD3DFormat(D3DFORMAT format)
+QVideoFrame::PixelFormat qt_evr_pixelFormatFromD3DFormat(DWORD format)
{
switch (format) {
case D3DFMT_R8G8B8:
diff --git a/src/plugins/common/evr/evrhelpers.h b/src/plugins/common/evr/evrhelpers.h
index d2fdfdcae..527612c45 100644
--- a/src/plugins/common/evr/evrhelpers.h
+++ b/src/plugins/common/evr/evrhelpers.h
@@ -90,7 +90,7 @@ inline HRESULT qt_evr_getFrameRate(IMFMediaType *pType, MFRatio *pRatio)
return MFGetAttributeRatio(pType, MF_MT_FRAME_RATE, (UINT32*)&pRatio->Numerator, (UINT32*)&pRatio->Denominator);
}
-QVideoFrame::PixelFormat qt_evr_pixelFormatFromD3DFormat(D3DFORMAT format);
+QVideoFrame::PixelFormat qt_evr_pixelFormatFromD3DFormat(DWORD format);
D3DFORMAT qt_evr_D3DFormatFromPixelFormat(QVideoFrame::PixelFormat format);
QT_END_NAMESPACE