Redigera

Dela via


Windows Media Video 9 Decoder

The Windows Media Video 9 decoder decodes video streams that were encoded by the Windows Media Video Encoder. The encoder and decoder support the following four categories of encoded video.

  • Windows Media Video 9 Simple Profile
  • Windows Media Video 9 Main Profile
  • Windows Media Video 9 Advanced Profile
  • Windows Media Video 9.1 Image

Class Identifier

The class identifier (CLSID) for the Windows Media Video decoder is represented by the constant CLSID_CWMVDecMediaObject. You can create an instance of the video decoder by calling CoCreateInstance.

Interfaces

A video decoder object exposes the IMediaObject interface so that the object can be used as a DirectX Media Object (DMO), and it exposes the IMFTransform interface so that the object can be used as a Media Foundation Transform (MFT).

A video decoder behaves as a DMO or an MFT depending on which interfaces you obtain and which version of Windows is running. The following table shows the conditions under which a video decoder behaves as a DMO or an MFT.

Operating system Decoder behavior
Windows XP A Windows Media video decoder always behaves as a DMO.
Windows Vista and Windows 7 By default, a Windows Media video decoder behaves as a DMO. If you obtain an IMFTransform interface on a video decoder, it behaves as an MFT.

 

Beginning with Windows 7, the Windows Media Video decoder implements the IDMOQualityControl interface.

Input Formats

The following table shows the four-character codes (FOURCCs) that correspond to the categories of encoded input that are supported by the Windows Media Video decoder.

Category FOURCC
Windows Media Video 9 Simple Profile "WMV3"
Windows Media Video 9 Main Profile "WMV3"
Windows Media Video 9 Advanced Profile "WVC1"
Windows Media Video 9.1 Image "WMVP" for 9.1, "WVP2" for 9.1 version 2

 

Output Formats

The Windows Media Video decoder supports the following output media subtypes when it is acting as a DMO.

  • MEDIASUBTYPE_NV12
  • MEDIASUBTYPE_YV12
  • MEDIASUBTYPE_YUY2
  • MEDIASUBTYPE_UYVY
  • MEDIASUBTYPE_YVYU
  • MEDIASUBTYPE_NV11
  • MEDIASUBTYPE_RGB32
  • MEDIASUBTYPE_RGB24
  • MEDIASUBTYPE_RGB565
  • MEDIASUBTYPE_RGB555
  • MEDIASUBTYPE_RGB8

The Windows Media Video decoder supports the following output media subtypes when it is acting as an MFT.

  • MFVideoFormat_NV12
  • MFVideoFormat_YV12
  • MFVideoFormat_YUY2
  • MFVideoFormat_UYVY
  • MFVideoFormat_YVYU
  • MFVideoFormat_NV11
  • MFVideoFormat_RGB32
  • MFVideoFormat_RGB24
  • MFVideoFormat_RGB565
  • MFVideoFormat_RGB555
  • MFVideoFormat_RGB8

Properties

The Windows Media Video decoder supports the following properties.

Property Description
MFPKEY_DECODER_DEINTERLACING Specifies whether the codec decodes interlaced video frames from the compressed stream as progressive frames.
Windows XP and later.
Simple Profile, Main Profile, Advanced Profile.
Read/write.
MFPKEY_DXVA_ENABLED Specifies whether the decoder will use DirectX video acceleration hardware, if available.
Windows XP and later.
Simple Profile, Main Profile, Advanced Profile.
Write-only.
MFPKEY_AVDecVideoSWPowerLevel Specifies the power level for the decoder.
Windows 7.
Simple Profile, Main Profile, Advanced Profile, Image.
Read/write.
MFPKEY_FI_ENABLED Specifies whether the decoder should use frame interpolation.
Windows XP and later.
Simple Profile, Main Profile, Advanced Profile, Image.
Write-only.
MFPKEY_FI_SUPPORTED Specifies whether the decoder supports frame interpolation.
Windows XP and later.
Simple Profile, Main Profile, Advanced Profile, Image
Read-only.
MFPKEY_NUMTHREADSDEC Specifies the number of threads that the decoder will use.
Windows Vista and later.
Simple Profile, Main Profile, Advanced Profile, Image.
Read/write.
MFPKEY_POSTPROCESSMODE Specifies the post processing mode for the decoder.
Windows Vista and later.
Simple Profile, Main Profile, Advanced Profile, Image.
Write-only.
g_wszWMVCNeedsDrain Specifies whether the decoder should be drained.
Windows 8
Read-only.
This property is used by the Windows Media Format runtime. The property type is VARIANT_BOOL. If the value is VARIANT_TRUE, the decoder should be drained after a discontinuity. For more information about draining an MFT, see Basic MFT Processing Model.
Note: To query this property, use the IPropertyBag interface.

 

Remarks

The maximum resolution allowed by the Windows Media Video 9 decoder is 4096x4096.

Requirements

Requirement Value
Client
Windows XP, Windows Vista or Windows 7
Header
Wmcodecdsp.h
DLL
Wmvdecod.dll

See also

Codec Objects

Codec Implementation