public struct MediaType : IDisposable, ValueType
The MediaType structure describes the format of the data used by a stream in a Microsoft DirectX Media Object (DMO). For more information, .
CbFormat
Size of the format block of the media type.
public Int32 CbFormat
FixedSizeSamples
If TRUE, samples are of a fixed size. This field is informational only. For audio, it is generally set to TRUE. For video, it is usually TRUE for uncompressed video and FALSE for compressed video.
public Int32 FixedSizeSamples
FormatType
GUID specifying the format type. The pbFormat member points to the corresponding format structure. (see )
public Guid FormatType
MajorType
A GUID identifying the stream's major media type. This must be one of the DMO Media Types(see ).
public Guid MajorType
PtrFormat
Pointer to the format structure. The structure type is specified by the formattype member. The format structure must be present, unless formattype is GUIDNULL or FORMATNone.
public IntPtr PtrFormat
SampleSize
Size of the sample, in bytes. For compressed data, the value can be zero.
public Int32 SampleSize
SubType
Subtype GUID of the stream.
public Guid SubType
TemporalCompression
If TRUE, samples are compressed using temporal (interframe) compression. A value of TRUE indicates that not all frames are key frames. This field is informational only.
public Int32 TemporalCompression
MediaType()
The MediaType structure describes the format of the data used by a stream in a Microsoft DirectX Media Object (DMO). For more information, .
public void MediaType()
Dispose()
Frees the allocated members of a media type structure by calling the MoFreeMediaType function.
public void Dispose()
FromWaveFormat(WaveFormat waveFormat)
Creates a MediaType based on a given WaveFormat. Don't forget to call Free() for the returend MediaType.