private void Config() { IWMProfileManager profileManager; WMUtils.WMCreateProfileManager(out profileManager); m_pCodecInfo = (IWMCodecInfo2)profileManager; }
public Codec(IWMCodecInfo2 codecInfo, int index, Guid mediaType) { CodecInformation = codecInfo; Index = index; MediaType = mediaType; CodecFormats = CodecFormat.GetMediaFormats(this); }
/// <summary> /// Gets all Windows media Codecs. /// </summary> /// <param name="guid">MediaTypes WMMEDIATYPE_Audio or WMMEDIATYPE_Video expected</param> public static Codec[] GetCodecs(Guid mediaType) { IWMCodecInfo2 codecInfo = (IWMCodecInfo2)WM.CreateProfileManager(); int count; codecInfo.GetCodecInfoCount(mediaType, out count); var list = new Codec[count]; for (int i = 0; i < count; i++) { list[i] = new Codec(codecInfo, i, mediaType); } return(list); }