diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-11-27 11:56:50 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2016-01-12 15:51:32 +0000 |
commit | c7397523e77578cf8f09ba3258791f68c34e2e5f (patch) | |
tree | 9c293c768038f74564d411cd27cff5ce22ed46ac /src/plugins/common/evr/evrhelpers.h | |
parent | 36549dbe148055d6ecf98952b05b4ff2310fe491 (diff) |
Windows: Improve EVR presenter.
Removed hard dependency to Angle; it's now required only when rendering
to a texture. If Angle is not used, the buffers are now mappable to
system memory.
This enables HW-accelerated video decoding in QML for non-ANGLE
builds. Note that the frame data have to do a round-trip through system
memory, which is not ideal but still faster than SW decoding.
Task-number: QTBUG-45593
Change-Id: Icc3503142df4e8dbb53b4e11f409b161fd2f9bde
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/common/evr/evrhelpers.h')
-rw-r--r-- | src/plugins/common/evr/evrhelpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/common/evr/evrhelpers.h b/src/plugins/common/evr/evrhelpers.h index 3883379a0..1b1f64194 100644 --- a/src/plugins/common/evr/evrhelpers.h +++ b/src/plugins/common/evr/evrhelpers.h @@ -35,6 +35,9 @@ #define EVRHELPERS_H #include "evrdefs.h" +#include <qvideoframe.h> + +QT_USE_NAMESPACE template<class T> static inline void qt_evr_safe_release(T **unk) @@ -81,5 +84,8 @@ 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); +D3DFORMAT qt_evr_D3DFormatFromPixelFormat(QVideoFrame::PixelFormat format); + #endif // EVRHELPERS_H |