public static VideoCompressor[] GetAll(bool reload) { if (compressors != null && !reload) { // Compressors are cached so if a new one gets installed, apps need restart to get update data return(compressors.ToArray()); } compressors = new List <VideoCompressor>(); Avi32Interop.ICINFO ici = new Avi32Interop.ICINFO(); ici.Init(); int hr = int.MaxValue; for (uint i = 0; hr != 0; i++) { // Get info for compressor #i ici.biSize = (uint)Marshal.SizeOf(ici); hr = Avi32Interop.ICInfo(Avi32Interop.ICTYPE_VIDEO, i, ref ici); try { // Create compressor using fccHandler VideoCompressor compressor = new VideoCompressor(ici.fccHandler); compressors.Add(compressor); } catch (AviException) { } } return(compressors.ToArray()); }