mfapi.h header

This header is used by multiple technologies. For more information, see:

mfapi.h contains the following programming interfaces:

Functions

 
DEFINE_MEDIATYPE_GUID

Defines a media subtype GUID from a FOURCC code, D3DFORMAT value, or audio format type.
MFAddPeriodicCallback

Sets a callback function to be called at a fixed interval. (MFAddPeriodicCallback)
MFAllocateSerialWorkQueue

Creates a work queue that is guaranteed to serialize work items.
MFAllocateWorkQueue

Creates a new work queue. (MFAllocateWorkQueue)
MFAllocateWorkQueueEx

Creates a new work queue. (MFAllocateWorkQueueEx)
MFAverageTimePerFrameToFrameRate

Calculates the frame rate, in frames per second, from the average duration of a video frame.
MFBeginCreateFile

Begins an asynchronous request to create a byte stream from a file.
MFBeginRegisterWorkQueueWithMMCSS

Associates a work queue with a Multimedia Class Scheduler Service (MMCSS) task. (MFBeginRegisterWorkQueueWithMMCSS)
MFBeginRegisterWorkQueueWithMMCSSEx

Associates a work queue with a Multimedia Class Scheduler Service (MMCSS) task. (MFBeginRegisterWorkQueueWithMMCSSEx)
MFBeginUnregisterWorkQueueWithMMCSS

Unregisters a work queue from a Multimedia Class Scheduler Service (MMCSS) task. (MFBeginUnregisterWorkQueueWithMMCSS)
MFCalculateBitmapImageSize

Retrieves the image size for a video format.
MFCalculateImageSize

Retrieves the image size, in bytes, for an uncompressed video format. (MFCalculateImageSize)
MFCancelCreateFile

Cancels an asynchronous request to create a byte stream from a file.
MFCancelWorkItem

Attempts to cancel an asynchronous operation that was scheduled with MFScheduleWorkItem or MFScheduleWorkItemEx.
MFCombineSamples

Concatenates a media sample onto another sample if their combined duration does not exceed the specified duration.
MFCompareFullToPartialMediaType

Compares a full media type to a partial media type.
MFConvertColorInfoFromDXVA

Sets the extended color information in a MFVIDEOFORMAT structure.
MFConvertColorInfoToDXVA

Converts the extended color information from an MFVIDEOFORMAT to the equivalent DirectX Video Acceleration (DXVA) color information.
MFConvertFromFP16Array

Converts an array of 16-bit floating-point numbers into an array of 32-bit floating-point numbers.
MFConvertToFP16Array

Converts an array of 32-bit floating-point numbers into an array of 16-bit floating-point numbers.
MFCopyImage

Copies an image or image plane from one buffer to another.
MFCreate2DMediaBuffer

Creates a system-memory buffer object to hold 2D image data.
MFCreateAlignedMemoryBuffer

Allocates system memory with a specified byte alignment and creates a media buffer to manage the memory.
MFCreateAMMediaTypeFromMFMediaType

Creates a DirectShow AM_MEDIA_TYPE structure from a Media Foundation media type.
MFCreateAsyncResult

Creates an asynchronous result object. Use this function if you are implementing an asynchronous method. (MFCreateAsyncResult)
MFCreateAttributes

Creates an empty attribute store.
MFCreateAudioMediaType

Creates an audio media type from a WAVEFORMATEX structure.
MFCreateCollection

Creates an empty collection object.
MFCreateDXGIDeviceManager

Creates an instance of the Microsoft DirectX Graphics Infrastructure (DXGI) Device Manager.
MFCreateDXGISurfaceBuffer

Creates a media buffer to manage a Microsoft DirectX Graphics Infrastructure (DXGI) surface.
MFCreateDXSurfaceBuffer

Creates a media buffer object that manages a Direct3D 9 surface.
MFCreateEventQueue

Creates an event queue.
MFCreateFile

Creates a byte stream from a file.
MFCreateLegacyMediaBufferOnMFMediaBuffer

Converts a Media Foundation media buffer into a buffer that is compatible with DirectX Media Objects (DMOs).
MFCreateMediaBufferFromMediaType

Allocates a system-memory buffer that is optimal for a specified media type.
MFCreateMediaBufferWrapper

Creates a media buffer that wraps an existing media buffer.
MFCreateMediaEvent

Creates a media event object.
MFCreateMediaExtensionActivate

Creates an activation object for a Windows Runtime class.
MFCreateMediaType

Creates an empty media type.
MFCreateMediaTypeFromRepresentation

Creates a Media Foundation media type from another format representation.
MFCreateMemoryBuffer

Allocates system memory and creates a media buffer to manage it.
MFCreateMFByteStreamWrapper

Creates a wrapper for a byte stream.
MFCreateMFVideoFormatFromMFMediaType

Creates an MFVIDEOFORMAT structure from a video media type.
MFCreateMuxStreamAttributes

Creates an IMFAttributes describing the content of multiplexed substreams.
MFCreateMuxStreamMediaType

Creates an IMFMediaType describing the media types of multiplexed substreams.
MFCreateMuxStreamSample

Creates an IMFSample containing the samples of multiplexed substreams.
MFCreateSample

Creates an empty media sample.
MFCreateTempFile

Creates a byte stream that is backed by a temporary local file.
MFCreateVideoMediaType

Creates a video media type from an MFVIDEOFORMAT structure.
MFCreateVideoMediaTypeFromBitMapInfoHeader

This function is not implemented. (MFCreateVideoMediaTypeFromBitMapInfoHeader)
MFCreateVideoMediaTypeFromBitMapInfoHeaderEx

Creates a video media type from a BITMAPINFOHEADER structure.
MFCreateVideoMediaTypeFromSubtype

Creates a partial video media type with a specified subtype.
MFCreateVideoMediaTypeFromVideoInfoHeader

Creates a media type from a KS_VIDEOINFOHEADER structure.
MFCreateVideoMediaTypeFromVideoInfoHeader2

Creates a media type from a KS_VIDEOINFOHEADER2 structure.
MFCreateVideoSampleAllocatorEx

Creates an object that allocates video samples that are compatible with Microsoft DirectX Graphics Infrastructure (DXGI).
MFCreateWaveFormatExFromMFMediaType

Converts a Media Foundation audio media type to a WAVEFORMATEX structure.
MFCreateWICBitmapBuffer

Creates a media buffer object that manages a Windows Imaging Component (WIC).
MFEndCreateFile

Completes an asynchronous request to create a byte stream from a file.
MFEndRegisterWorkQueueWithMMCSS

Completes an asynchronous request to associate a work queue with a Multimedia Class Scheduler Service (MMCSS) task. (MFEndRegisterWorkQueueWithMMCSS)
MFEndUnregisterWorkQueueWithMMCSS

Completes an asynchronous request to unregister a work queue from a Multimedia Class Scheduler Service (MMCSS) task.
MFFrameRateToAverageTimePerFrame

Converts a video frame rate into a frame duration.
MFGetAttribute2UINT32asUINT64

Gets an attribute whose value is two UINT32 values packed into a UINT64.
MFGetAttributeDouble

Returns a double value from an attribute store, or a default value if the attribute is not present.
MFGetAttributeRatio

Retrieves an attribute whose value is a ratio.
MFGetAttributesAsBlob

Converts the contents of an attribute store to a byte array.
MFGetAttributesAsBlobSize

Retrieves the size of the buffer needed for the MFGetAttributesAsBlob function.
MFGetAttributeSize

Retrieves an attribute whose value is a size, expressed as a width and height.
MFGetAttributeString

Gets a string value from an attribute store.
MFGetAttributeUINT32

Returns a UINT32 value from an attribute store, or a default value if the attribute is not present.
MFGetAttributeUINT64

Returns a UINT64 value from an attribute store, or a default value if the attribute is not present.
MFGetContentProtectionSystemCLSID

Gets the class identifier for a content protection system.
MFGetMFTMerit

Gets the merit value of a hardware codec.
MFGetPlaneSize

Retrieves the image size, in bytes, for an uncompressed video format. (MFGetPlaneSize)
MFGetPluginControl

Gets a pointer to the Microsoft Media Foundation plug-in manager.
MFGetStrideForBitmapInfoHeader

Calculates the minimum surface stride for a video format.
MFGetTimerPeriodicity

Retrieves the timer interval for the MFAddPeriodicCallback function.
MFGetUncompressedVideoFormat

Returns the FOURCC or D3DFORMAT value for an uncompressed video format.
MFGetWorkQueueMMCSSClass

Retrieves the Multimedia Class Scheduler Service (MMCSS) class currently associated with this work queue. (MFGetWorkQueueMMCSSClass)
MFGetWorkQueueMMCSSPriority

Gets the relative thread priority of a work queue. (MFGetWorkQueueMMCSSPriority)
MFGetWorkQueueMMCSSTaskId

Retrieves the Multimedia Class Scheduler Service (MMCSS) task identifier currently associated with this work queue. (MFGetWorkQueueMMCSSTaskId)
MFHeapAlloc

Allocates a block of memory. (MFHeapAlloc)
MFHeapFree

Frees a block of memory that was allocated by calling the MFHeapAlloc function.
MFInitAMMediaTypeFromMFMediaType

Initializes a DirectShow AM_MEDIA_TYPE structure from a Media Foundation media type.
MFInitAttributesFromBlob

Initializes the contents of an attribute store from a byte array.
MFInitMediaTypeFromAMMediaType

Initializes a media type from a DirectShow AM_MEDIA_TYPE structure.
MFInitMediaTypeFromMFVideoFormat

Initializes a media type from an MFVIDEOFORMAT structure.
MFInitMediaTypeFromMPEG1VideoInfo

Initializes a media type from a DirectShow MPEG1VIDEOINFO structure.
MFInitMediaTypeFromMPEG2VideoInfo

Initializes a media type from a DirectShow MPEG2VIDEOINFO structure.
MFInitMediaTypeFromVideoInfoHeader

Initializes a media type from a DirectShow VIDEOINFOHEADER structure.
MFInitMediaTypeFromVideoInfoHeader2

Initializes a media type from a DirectShow VIDEOINFOHEADER2 structure.
MFInitMediaTypeFromWaveFormatEx

Initializes a media type from a WAVEFORMATEX structure.
MFInitVideoFormat

Initializes an MFVIDEOFORMAT structure for a standard video format such as DVD, analog television, or ATSC digital television.
MFInitVideoFormat_RGB

Initializes an MFVIDEOFORMAT structure for an uncompressed RGB video format.
MFInvokeCallback

Invokes a callback method to complete an asynchronous operation. (MFInvokeCallback)
MFIsFormatYUV

Queries whether a FOURCC code or D3DFORMAT value is a YUV format.
MFllMulDiv

Calculates ((a * b) + d) / c, where each term is a 64-bit signed value.
MFLockDXGIDeviceManager

Locks the shared Microsoft DirectX Graphics Infrastructure (DXGI) Device Manager.
MFLockPlatform

Blocks the MFShutdown function.
MFLockSharedWorkQueue

Obtains and locks a shared work queue. (MFLockSharedWorkQueue)
MFLockWorkQueue

Locks a work queue. (MFLockWorkQueue)
MFMapDX9FormatToDXGIFormat

Converts a Microsoft Direct3D 9 format identifier to a Microsoft DirectX Graphics Infrastructure (DXGI) format identifier.
MFMapDXGIFormatToDX9Format

Converts a Microsoft DirectX Graphics Infrastructure (DXGI) format identifier to a Microsoft Direct3D 9 format identifier.
MFPutWaitingWorkItem

Queues a work item that waits for an event to be signaled. (MFPutWaitingWorkItem)
MFPutWorkItem

Puts an asynchronous operation on a work queue. (MFPutWorkItem)
MFPutWorkItem2

Puts an asynchronous operation on a work queue, with a specified priority. (MFPutWorkItem2)
MFPutWorkItemEx

Puts an asynchronous operation on a work queue. (MFPutWorkItemEx)
MFPutWorkItemEx2

Puts an asynchronous operation on a work queue, with a specified priority. (MFPutWorkItemEx2)
MFRegisterLocalByteStreamHandler

Registers a byte-stream handler in the caller's process.
MFRegisterLocalSchemeHandler

Registers a scheme handler in the caller's process.
MFRegisterPlatformWithMMCSS

Registers the standard Microsoft Media Foundation platform work queues with the Multimedia Class Scheduler Service (MMCSS).
MFRemovePeriodicCallback

Cancels a callback function that was set by the MFAddPeriodicCallback function.
MFScheduleWorkItem

Schedules an asynchronous operation to be completed after a specified interval. (MFScheduleWorkItem)
MFScheduleWorkItemEx

Schedules an asynchronous operation to be completed after a specified interval. (MFScheduleWorkItemEx)
MFSetAttribute2UINT32asUINT64

Packs two UINT32 values into a UINT64 attribute value.
MFSetAttributeRatio

Sets a ratio as a 64-bit attribute value.
MFSetAttributeSize

Sets width and height as a single 64-bit attribute value.
MFShutdown

Shuts down the Microsoft Media Foundation platform.
MFSplitSample

Split up a combined media sample back into individual samples.
MFStartup

Initializes Microsoft Media Foundation.
MFTEnum

Enumerates Media Foundation transforms (MFTs) in the registry.
MFTEnum2

Gets a list of Microsoft Media Foundation transforms (MFTs) that match specified search criteria.
MFTEnumEx

Gets a list of Microsoft Media Foundation transforms (MFTs) that match specified search criteria. This function extends the MFTEnum function.
MFTGetInfo

Gets information from the registry about a Media Foundation transform (MFT).
MFTRegister

Adds information about a Media Foundation transform (MFT) to the registry.
MFTRegisterLocal

Registers a Media Foundation transform (MFT) in the caller's process. (MFTRegisterLocal)
MFTRegisterLocalByCLSID

Registers a Media Foundation transform (MFT) in the caller's process. (MFTRegisterLocalByCLSID)
MFTUnregister

Unregisters a Media Foundation transform (MFT).
MFTUnregisterLocal

Unregisters one or more Media Foundation transforms (MFTs) from the caller's process.
MFTUnregisterLocalByCLSID

Unregisters a Media Foundation transform (MFT) from the caller's process.
MFUnlockDXGIDeviceManager

Unlocks the shared Microsoft DirectX Graphics Infrastructure (DXGI) Device Manager.
MFUnlockPlatform

Unlocks the Media Foundation platform after it was locked by a call to the MFLockPlatform function.
MFUnlockWorkQueue

Unlocks a work queue. (MFUnlockWorkQueue)
MFUnregisterPlatformFromMMCSS

Unregisters the Microsoft Media Foundation platform work queues from a Multimedia Class Scheduler Service (MMCSS) task.
MFUnwrapMediaType

Retrieves a media type that was wrapped in another media type by the MFWrapMediaType function.
MFValidateMediaTypeSize

Validates the size of a buffer for a video format block.
MFWrapMediaType

Creates a media type that wraps another media type.
Pack2UINT32AsUINT64

Packs two UINT32 values into a UINT64 value.
PackRatio

Packs two UINT32 values, which represent a ratio, into a UINT64 value.
PackSize

Packs a UINT32 width value and a UINT32 height value into a UINT64 value that represents a size.
Unpack2UINT32AsUINT64

Gets the low-order and high-order UINT32 values from a UINT64 value.
UnpackRatio

Gets the low-order and high-order UINT32 values from a UINT64 value that represents a ratio.
UnpackSize

Gets the low-order and high-order UINT32 values from a UINT64 value that represents a size.

Callback functions

 
MFPERIODICCALLBACK

Callback function for the MFAddPeriodicCallback function.

Structures

 
CapturedMetadataExposureCompensation

This structure contains blob information for the EV compensation feedback for the photo captured.
CapturedMetadataISOGains

The CapturedMetadataISOGains structure describes the blob format for MF_CAPTURE_METADATA_ISO_GAINS.
CapturedMetadataWhiteBalanceGains

This structure describes the blob format for the MF_CAPTURE_METADATA_WHITEBALANCE_GAINS attribute.
DigitalWindowSetting

Represents the bounds settings of the digital window for video capture.
FaceCharacterization

The FaceCharacterization structure describes the blob format for the MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS attribute.
FaceCharacterizationBlobHeader

The FaceCharacterizationBlobHeader structure describes the size and count information of the blob format for the MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS attribute.
FaceRectInfo

The FaceRectInfo structure describes the blob format for the MF_CAPTURE_METADATA_FACEROIS attribute.
FaceRectInfoBlobHeader

The FaceRectInfoBlobHeader structure describes the size and count information of the blob format for the MF_CAPTURE_METADATA_FACEROIS attribute.
HistogramBlobHeader

The HistogramBlobHeader structure describes the blob size and the number of histograms in the blob for the MF_CAPTURE_METADATA_HISTOGRAM attribute.
HistogramDataHeader

The HistogramDataHeader structure describes the blob format for the MF_CAPTURE_METADATA_HISTOGRAM attribute.
HistogramGrid

The HistogramGrid structure describes the blob format for MF_CAPTURE_METADATA_HISTOGRAM.
HistogramHeader

The HistogramHeader structure describes the blob format for MF_CAPTURE_METADATA_HISTOGRAM.
MACROBLOCK_DATA

Provides data about a macroblock during video decoding.
MetadataTimeStamps

The MetadataTimeStamps structure describes the blob format for the MF_CAPTURE_METADATA_FACEROITIMESTAMPS attribute.
MF_FLOAT2

A vector with two components.
MF_FLOAT3

A vector with three components.
MF_QUATERNION

A four dimensional vector, used to represent a rotation.
MFASYNCRESULT

Contains data that is needed to implement the IMFAsyncResult interface.
MFCameraExtrinsic_CalibratedTransform

A transform describing the location of a camera relative to other cameras or an established external reference.
MFCameraExtrinsics

Describes the location of a camera relative to other cameras or an established external reference.
MFCameraIntrinsic_DistortionModel

Represents a polynomial lens distortion model.
MFCameraIntrinsic_PinholeCameraModel

Represents a pinhole camera model.
MFFOLDDOWN_MATRIX

Contains coefficients used to transform multichannel audio into a smaller number of audio channels. This process is called fold-down.
MFPinholeCameraIntrinsic_IntrinsicModel

Represents a pinhole camera intrinsic model for a specified resolution.
MFPinholeCameraIntrinsics

Contains zero or 1 pinhole camera intrinsic models that describe how to project a 3D point in physical world onto the 2D image frame of a camera.
MT_ARBITRARY_HEADER

Contains format data for a binary stream in an Advanced Streaming Format (ASF) file.
MT_CUSTOM_VIDEO_PRIMARIES

Defines custom color primaries for a video source. The color primaries define how to convert colors from RGB color space to CIE XYZ color space.
ROI_AREA

Defines a regions of interest.

Enumerations

 
_MFT_ENUM_FLAG

Contains flags for registering and enumeration Media Foundation transforms (MFTs).
MF_TOPOSTATUS

Specifies the status of a topology during playback.
MFASYNC_WORKQUEUE_TYPE

Specifies the type of work queue for the MFAllocateWorkQueueEx function to create.
MFDepthMeasurement

Specifies the measurement system for a depth value in a video frame.
MFFrameSourceTypes

Describes the type of data provided by a frame source.
MFSampleEncryptionProtectionScheme

Specifies the supported protection schemes for encrypted samples.
MFVideo3DFormat

Specifies how 3D video frames are stored in memory.
MFVideo3DSampleFormat

Specifies how a 3D video frame is stored in a media sample.
MFVideoDRMFlags

Specifies the type of copy protection required for a video stream.
MFVideoPadFlags

Specifies whether to pad a video image so that it fits within a specified aspect ratio.
MFVideoRotationFormat

Describes the rotation of the video image in the counter-clockwise direction.
MFVideoSrcContentHintFlags

Describes the intended aspect ratio for a video stream.
MFWaveFormatExConvertFlags

Contains flags that specify how to convert an audio media type.