Microsoft DirectX 9.0

CMediaType Class

CMediaType Class Hierarchy

The CMediaType class manages media types. This class inherits the AM_MEDIA_TYPE structure. It can be cast to a variable of type AM_MEDIA_TYPE.


Header: Declared in Mtype.h; include Streams.h.

Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

Public Methods  
CMediaType Constructor method.
~CMediaType Destructor method.
Set Sets the media type from another media type.
IsValid Determines whether a major type has been assigned to this object.
Type Retrieves the major type.
SetType Specifies the major type.
Subtype Retrieves the subtype.
SetSubtype Specifies the subtype.
IsFixedSize Determines if the samples have a fixed size or a variable size.
IsTemporalCompressed Determines if the stream uses temporal compression.
GetSampleSize Retrieves the sample size.
SetSampleSize Specifies a fixed sample size, or specifies that samples have a variable size.
SetVariableSize Specifies that samples do not have a fixed size.
SetTemporalCompression Specifies whether samples are compressed using temporal compression.
Format Retrieves a pointer to the format block.
FormatLength Retrieves the length of the format block.
SetFormatType Specifies the format type.
FormatType Retrieves the format type.
SetFormat Specifies the format block.
ResetFormatBuffer Deletes the format block.
AllocFormatBuffer Allocates memory for the format block.
ReallocFormatBuffer Reallocates the format block to a new size.
InitMediaType Initializes the media type.
MatchesPartial Determines if this media type matches a partially specified media type.
IsPartiallySpecified Determines if the media type is partially defined.
operator = Overloads the assignment operator to copy a media type.
operator == Tests for equality between CMediaType objects.
operator != Tests for inequality between CMediaType objects.