public CodecCollection() : base() { uint ICTYPE_VIDEO = Codec.mmioFOURCC('v', 'i', 'd', 'c'); uint n; ICINFO info = new ICINFO(); for (n = 0; MSVFW32.ICInfo(ICTYPE_VIDEO, n, ref info); n++) { System.IntPtr iIC = MSVFW32.ICOpen(info.fccType, info.fccHandler, ICMODE.QUERY); if (iIC != System.IntPtr.Zero) { int cb = Marshal.SizeOf(typeof(ICINFO)); MSVFW32.ICGetInfo(iIC, ref info, (uint)cb); //if ((info.dwFlags & (uint)VIDCF.COMPRESSFRAMES) != 0) //{ string s = Codec.FOURCCmmio(info.fccHandler); if (!this.ContainsKey(s)) { this.Add(s, info.szDescription + " (" + s + ")"); } //} MSVFW32.ICClose(iIC); } } }
public static extern bool ICInfo(uint fccType, uint fccHandler, ref ICINFO lpicinfo);
public static extern int ICGetInfo(System.IntPtr hic, ref ICINFO lpicinfo, uint cb);