private void Config()
        {
            IWMProfileManager profileManager;

            WMUtils.WMCreateProfileManager(out profileManager);

            m_pCodecInfo = (IWMCodecInfo2)profileManager;
        }
示例#2
0
        public Codec(IWMCodecInfo2 codecInfo, int index, Guid mediaType)
        {
            CodecInformation = codecInfo;
            Index            = index;
            MediaType        = mediaType;

            CodecFormats = CodecFormat.GetMediaFormats(this);
        }
示例#3
0
文件: Codec.cs 项目: gauravkar/NAudio
        public Codec(IWMCodecInfo2 codecInfo, int index, Guid mediaType)
        {
            CodecInformation = codecInfo;
            Index = index;
            MediaType = mediaType;

            CodecFormats = CodecFormat.GetMediaFormats(this);
        }
示例#4
0
        /// <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);
        }