Düzenle

Aracılığıyla paylaş


MF_MT_FRAME_SIZE attribute

Width and height of a video frame, in pixels.

Data type

UINT64

Remarks

The upper 32 bits contain the width and the lower 32 bits contain the height.

To set this attribute, use the MFSetAttributeSize function. To get this attribute, use the MFGetAttributeSize function.

The GUID constant for this attribute is exported from mfuuid.lib.

Examples

// Helper function to set the frame size on a video media type.
inline HRESULT SetFrameSize(IMFMediaType *pType, UINT32 width, UINT32 height)
{
    return MFSetAttributeSize(pType, MF_MT_FRAME_SIZE, width, height);
}

// Helper function to get the frame size from a video media type.
inline HRESULT GetFrameSize(IMFMediaType *pType, UINT32 *pWidth, UINT32 *pHeight)
{
    return MFGetAttributeSize(pType, MF_MT_FRAME_SIZE, pWidth, pHeight);
}

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps | UWP apps]
Minimum supported server
Windows Server 2008 [desktop apps | UWP apps]
Header
Mfapi.h

See also

Alphabetical List of Media Foundation Attributes

IMFMediaType

Media Type Attributes