Partager via


Audio Subtypes

 
Microsoft DirectShow 9.0

Audio Subtypes

The following table describes the audio media subtypes.

GUID Description
MEDIASUBTYPE_PCM PCM audio.
MEDIASUBTYPE_PCMAudioObsolete Obsolete. Do not use.
MEDIASUBTYPE_MPEG1Packet MPEG1 Audio packet.
MEDIASUBTYPE_MPEG1Payload MPEG1 Audio Payload.
MEDIASUBTYPE_MPEG2_AUDIO MPEG-2 audio data
MEDIASUBTYPE_DVD_LPCM_AUDIO DVD audio data
MEDIASUBTYPE_MPEG2_AUDIO MPEG-2 audio data
MEDIASUBTYPE_DRM_Audio Corresponds to WAVE_FORMAT_DRM.
MEDIASUBTYPE_IEEE_FLOAT Corresponds to WAVE_FORMAT_IEEE_FLOAT
MEDIASUBTYPE_DOLBY_AC3 Dolby data
MEDIASUBTYPE_DOLBY_AC3_SPDIF Dolby AC3 over SPDIF.
MEDIASUBTYPE_RAW_SPORT Equivalent to MEDIASUBTYPE_DOLBY_AC3_SPDIF.
MEDIASUBTYPE_SPDIF_TAG_241h Equivalent to MEDIASUBTYPE_DOLBY_AC3_SPDIF.

The wFormatTag field in the WAVEFORMATEX structure specifies the audio format type. The format type is generally FORMAT_WaveFormatEx. Media samples are generally whole number of samples as specified in the wBitsPerSample field in the WAVEFORMATEX structure. This is not necessarily true for MPEG audio samples that can come from packetized streams and are therefore not necessarily packaged on sample / frame boundaries. For MPEG audio the time stamp in a media sample is the time stamp for the first frame whose first byte is contained in the media sample.

Media subtypes are defined for each wFormatTag as follows:

  • The Data1 subfield of the Media Subtype is the same as the wFormatTag value.
  • The Data 2 field is 0.
  • The Data 3 field is 0x0010.
  • The Data 4 field is 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71.

Thus, for PCM audio the subtype GUID (defined in uuids.h as MEDIASUBTYPE_PCM) is:

{00000001-0000-0010-8000-00AA00389B71}

To specify padded AC3 use 0x0092 for the wFormatTag and the corresponding subtype MEDIASUBTYPE_DOLBY_AC3_SPDIF. The values 0x240 and 0x241 have also been used to indicate padded AC3 but Microsoft encourages the use of 0x0092.

The CreateAudioMediaType function can be used to create an AM_MEDIA_TYPE structure from a WAVEFORMATEX structure.

Requirements

  Header: Dshow.h.

See Also