/// <summary> /// Returns the index of the given format in a array. /// </summary> /// <param name="thiz">The VideoFormat array to search.</param> /// <param name="format">The video format to find.</param> public static int IndexOf(this VideoFormat[] thiz, string format) { string pattern = @"^\d*x" + format + "$"; Regex regex = new Regex(pattern); for (int i = 0; i < thiz.Length; i++) { VideoFormat f = thiz[i]; // Skip .webm files if (f.Extension.Contains("webm")) { continue; } if (regex.IsMatch(f.Format)) { return(i); } } return(-1); }
internal void OnFileSizeUpdated(VideoFormat videoFormat) { this.FileSizeUpdated?.Invoke(this, new FileSizeUpdateEventArgs(videoFormat)); }
public FileSizeUpdateEventArgs(VideoFormat videoFormat) { this.VideoFormat = videoFormat; }