7#define D3DFMT_YV12 (D3DFORMAT)MAKEFOURCC ('Y', 'V', '1', '2')
10#define D3DFMT_NV12 (D3DFORMAT)MAKEFOURCC ('N', 'V', '1', '2')
21 GUID guidSubType = GUID_NULL;
24 hr =
type->GetGUID(MF_MT_SUBTYPE, &guidSubType);
27 *fourCC = guidSubType.Data1;
40 HRESULT hr = type1->IsEqual(type2, &dwFlags);
50 if ( ((LONG)fOffsetX +
area.Area.cx > (LONG)
width) ||
51 ((LONG)fOffsetY +
area.Area.cy > (LONG)
height) ) {
52 return MF_E_INVALIDMEDIATYPE;
59 if (!sample || !clock)
63 MFTIME hnsTimeNow = 0;
64 MFTIME hnsSystemTime = 0;
65 MFTIME hnsSampleStart = 0;
66 MFTIME hnsSampleDuration = 0;
68 hr = clock->GetCorrelatedTime(0, &hnsTimeNow, &hnsSystemTime);
71 hr = sample->GetSampleTime(&hnsSampleStart);
74 hr = sample->GetSampleDuration(&hnsSampleDuration);
77 if (hnsSampleStart + hnsSampleDuration < hnsTimeNow)
115 return D3DFMT_A8B8G8R8;
117 return D3DFMT_A8R8G8B8;
119 return D3DFMT_X8R8G8B8;
123 return D3DFMT_A8B8G8R8;
125 return D3DFMT_X8B8G8R8;
136 return D3DFMT_UNKNOWN;
D3DFORMAT qt_evr_D3DFormatFromPixelFormat(QVideoFrameFormat::PixelFormat format)
bool qt_evr_areMediaTypesEqual(IMFMediaType *type1, IMFMediaType *type2)
QVideoFrameFormat::PixelFormat qt_evr_pixelFormatFromD3DFormat(DWORD format)
QT_BEGIN_NAMESPACE HRESULT qt_evr_getFourCC(IMFMediaType *type, DWORD *fourCC)
bool qt_evr_isSampleTimePassed(IMFClock *clock, IMFSample *sample)
HRESULT qt_evr_validateVideoArea(const MFVideoArea &area, UINT32 width, UINT32 height)
float qt_evr_MFOffsetToFloat(const MFOffset &offset)
Combined button and popup list for selecting options.
static int area(const QSize &s)
GLint GLsizei GLsizei height
GLint GLsizei GLsizei GLenum format