編輯

共用方式為


MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE attribute

Specifies the output format of a device.

Data type

MFT_REGISTER_TYPE_INFO stored as BYTE[]

Get/set

To get this attribute, call IMFAttributes::GetBlob.

To set this attribute, call IMFAttributes::SetBlob.

Remarks

This attribute contains a pair of GUIDs: a major type and a subtype. These GUIDs describe the default output format of the device. The device might support additional output formats.

For example, if a video capture device outputs RGB-32 video, the value of this attribute is { MFMediaType_Video, MFVideoFormat_RGB32 }.

This attribute is a hint to the application. To get the exact output format, create the media source for the device and get the media source's presentation descriptor.

This attribute is set on the activation objects returned by the following functions:

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

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Header
Mfidl.h

See also

Alphabetical List of Media Foundation Attributes

Audio/Video Capture

Capture Device Attributes