Export (0) Print
Expand All
Expand Minimize

MFTRegisterLocal function

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

Syntax


HRESULT MFTRegisterLocal(
  _In_  IClassFactory *pClassFactory,
  _In_  REFGUID guidCategory,
  _In_  LPCWSTR pszName,
  _In_  UINT32 Flags,
  _In_  UINT32 cInputTypes,
  _In_  const MFT_REGISTER_TYPE_INFO *pInputTypes,
  _In_  UINT32 cOutputTypes,
  _In_  const MFT_REGISTER_TYPE_INFO *pOutputTypes
);

Parameters

pClassFactory [in]

A pointer to the IClassFactory interface of a class factory object. The class factory creates the MFT.

guidCategory [in]

A GUID that specifies the category of the MFT. For a list of MFT categories, see MFT_CATEGORY.

pszName [in]

A wide-character null-terminated string that contains the friendly name of the MFT.

Flags [in]

A bitwise OR of zero or more flags from the _MFT_ENUM_FLAG enumeration.

cInputTypes [in]

The number of elements in the pInputTypes array.

pInputTypes [in]

A pointer to an array of MFT_REGISTER_TYPE_INFO structures. Each member of the array specifies an input format that the MFT supports. This parameter can be NULL if cInputTypes is zero.

cOutputTypes [in]

The number of elements in the pOutputTypes array.

pOutputTypes [in]

A pointer to an array of MFT_REGISTER_TYPE_INFO structures. Each member of the array defines an output format that the MFT supports. This parameter can be NULL if cOutputTypes is zero.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The primary purpose of this function is to make an MFT available for automatic topology resolution without making the MFT available to other processes or applications.

After you call this function, the MFT can be enumerated by calling the MFTEnumEx function with the MFT_ENUM_FLAG_LOCALMFT flag. The MFT can be enumerated from within the same process, but is not visible to other processes.

The pClassFactory parameter specifies a class factory object that creates the MFT. The class factory's IClassFactory::CreateInstance method must return an object that supports the IMFTransform interface.

Note  The MFTEnumEx function retrieves a list of IMFActivate pointers. However, the class factory does not need to support the IMFActivate interface. Instead, the MFTEnumEx function provides an implementation of IMFActivate that wraps the class factory.

To unregister the MFT from the current process, call MFTUnregisterLocal.

If you need to register an MFT in the Protected Media Path (PMP) process, use the IMFLocalMFTRegistration interface.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
MFTRegisterLocalByCLSID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft