WMF: fix video frames' viewport.
It was not taken into account at all. Change-Id: I4ce85aba214cb4d89dcd018b1616a2a38094b5a6 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
235c863db9
commit
e9e10b2b1f
@@ -572,6 +572,18 @@ namespace
|
|||||||
QVideoSurfaceFormat format(QSize(width, height), m_pixelFormats[index]);
|
QVideoSurfaceFormat format(QSize(width, height), m_pixelFormats[index]);
|
||||||
m_surfaceFormat = format;
|
m_surfaceFormat = format;
|
||||||
|
|
||||||
|
MFVideoArea viewport;
|
||||||
|
if (SUCCEEDED(pMediaType->GetBlob(MF_MT_GEOMETRIC_APERTURE,
|
||||||
|
reinterpret_cast<UINT8*>(&viewport),
|
||||||
|
sizeof(MFVideoArea),
|
||||||
|
NULL))) {
|
||||||
|
|
||||||
|
m_surfaceFormat.setViewport(QRect(viewport.OffsetX.value,
|
||||||
|
viewport.OffsetY.value,
|
||||||
|
viewport.Area.cx,
|
||||||
|
viewport.Area.cy));
|
||||||
|
}
|
||||||
|
|
||||||
if (FAILED(pMediaType->GetUINT32(MF_MT_DEFAULT_STRIDE, (UINT32*)&m_bytesPerLine))) {
|
if (FAILED(pMediaType->GetUINT32(MF_MT_DEFAULT_STRIDE, (UINT32*)&m_bytesPerLine))) {
|
||||||
m_bytesPerLine = getBytesPerLine(format);
|
m_bytesPerLine = getBytesPerLine(format);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user