Beispiel #1
0
 public static extern HResult MFTEnumEx(
     [In] Guid MFTransformCategory,
     MFT_EnumFlag Flags,
     [In, MarshalAs(UnmanagedType.LPStruct)] MFTRegisterTypeInfo pInputType,
     [In, MarshalAs(UnmanagedType.LPStruct)] MFTRegisterTypeInfo pOutputType,
     [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown, SizeParamIndex = 5)] out IMFActivate[] pppMFTActivate,
     out int pnumMFTActivate
     );
Beispiel #2
0
        /// <summary>
        /// Enumerates Media Foundation transforms (MFTs) in the registry.
        /// </summary>
        /// <param name="transformCategory">Guid specifying the category of MFTs to enumerate.</param>
        /// <param name="flags">One or more members of the MFT_EnumFlag enumeration.</param>
        /// <param name="inputType">Indicate the input media type that the results must support. If null is passed, the input type is not use to filter the results.</param>
        /// <param name="outputType">Indicate the output media type that the results must support. If null is passed, the output type is not use to filter the results.</param>
        /// <param name="resultActivate">Receives an array of IMFActivate that match the parameters.</param>
        /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns>
        public static HResult EnumEx(Guid transformCategory, MFT_EnumFlag flags, MFTRegisterTypeInfo inputType, MFTRegisterTypeInfo outputType, out IMFActivate[] resultActivate)
        {
            int resultCount;

            return(MFExtern.MFTEnumEx(transformCategory, flags, inputType, outputType, out resultActivate, out resultCount));
        }
Beispiel #3
0
 /// <summary>
 /// Registers a Media Foundation Transform (MFT) in the caller's process.
 /// </summary>
 /// <param name="clsidMFT">The CLSID of the MFT.</param>
 /// <param name="transformCategory">Guid specifying the category of the MFT.</param>
 /// <param name="name">The MFT's firendly name.</param>
 /// <param name="flags">One or more members of the MFT_EnumFlag enumeration.</param>
 /// <param name="inputTypes">An array specifiying the MFT's input types.</param>
 /// <param name="outputTypes">An array specifiying the MFT's output types.</param>
 /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns>
 public static HResult RegisterLocalByCLSID(Guid clsidMFT, Guid transformCategory, string name, MFT_EnumFlag flags, MFTRegisterTypeInfo[] inputTypes, MFTRegisterTypeInfo[] outputTypes)
 {
     return(MFExtern.MFTRegisterLocalByCLSID(
                clsidMFT,
                transformCategory,
                name,
                flags,
                (inputTypes == null) ? 0 : inputTypes.Length,
                inputTypes,
                (outputTypes == null) ? 0 : outputTypes.Length,
                outputTypes
                ));
 }