• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.DirectX.MediaFoundation
      • MF2DBuffer
      • MFAttributes
      • MFDXGIDeviceManager
      • MFFactory
      • MFHelpers
      • MFMediaBuffer
      • MFMediaFormatGuids
      • MFMediaFormatGuids.Audio
      • MFMediaFormatGuids.Image
      • MFMediaFormatGuids.Video
      • MFMediaType
      • MFMediaTypeGuids
      • MFMediaTypeMajorGuids
      • MFReadWriteGuids
      • MFSample
      • MFSinkWriter
      • MFSinkWriterGuids
      • MFSourceReader
      • MFSourceReaderControlFlags
      • MFSourceReaderFlags
      • MFSourceReaderGuids
      • MFVideoInterlaceMode

    Namespace JeremyAnsel.DirectX.MediaFoundation

    Classes

    MF2DBuffer

    The IMF2DBuffer interface is supported by a media buffer whose multimedia data represents a 2D media type e.g. video. For these media types it is important to know the "pitch" of the buffer which indicates the number of bytes required to go from scanline to scanline. The IMF2DBuffer interface is obtained from a buffer by calling QueryInterface(). For each 2D media type a contiguous standard representation is defined which is designed to be compatible with the standard layout of a DirectX surface when represented by system memory. In this representation the surface pitch is always positive and equal to the number of bytes taken up by a single row of pixels padded out to a 4-byte boundary.

    Applications may still access 2D buffers using IMFBuffer::Lock(). In that case the data in the buffer will always be in the standard contiguous format for the format of data represented by the buffer. An internal copy may be required on IMFBuffer::Lock() and IMFBuffer::Unlock() to achieve this. The copy will not occur if the buffer is already in the correct format. When a copy occurs an event will be generated to aid debugging performance issues resulting from the copy. Components that process 2D data should aim to use the IMF2DBuffer interface to access sample data.

    MFAttributes

    The IMFAttributes interface is a general-purpose interface for storing key/value pairs, where the key is a GUID and the value is one of a small number of common data types, including UINT32, UINT64, double, GUID, Unicode string, and BLOB (counted array of UINT8). In addition to the methods inherited from IUnknown, the IMFAttributes interface exposes the following methods.

    MFDXGIDeviceManager

    MFFactory

    MFHelpers

    MFMediaBuffer

    The IMFMediaBuffer interface represent a buffer of multimedia data for any possible multimedia type. It provides methods for accessing the buffer pointer, the current length, and the maximum length of the buffer

    MFMediaFormatGuids

    MFMediaFormatGuids.Audio

    MFMediaFormatGuids.Image

    MFMediaFormatGuids.Video

    MFMediaType

    MFMediaTypeGuids

    MFMediaTypeMajorGuids

    MFReadWriteGuids

    MFSample

    The IMFSample interface represents a multimedia sample for a multimedia stream type. An typical example is a video frame, and a notable exception is audio where an IMFSample does not usually represent a single sample of audio, but rather a chunk of audio samples. Note that this allows us to reduce the overhead for representing audio in the pipeline.

    A sample may consist of a multiple buffers as is the case of compressed audio or video samples received from the network or being sent to an ASF media sink or ASF multiplexer.

    The IMFAttributes interface can be used to tag the sample with extra information that is not represented by the IMFSample methods. The MFSampleExtension_xxx GUIDs in mfapi.h define some standard attributes, but custom attributes are allowed and are preserved through the Media Foundation pipeline as well as possible.

    MFSinkWriter

    MFSinkWriterGuids

    MFSourceReader

    The MF Source Reader provides a simple programming model that allows applications to easily access multimedia content from files or devices.

    MFSourceReaderGuids

    Enums

    MFSourceReaderControlFlags

    The enumeration type defines the various flags that can be passed to the Source Reader's ReadSample method.

    MFSourceReaderFlags

    The enumeration type defines the various flags that can be returned from the MF Source Reader when retrieving the next sample.

    MFVideoInterlaceMode

    In this article
    Back to top Copyright (c) 2026 Jérémy Ansel