示例#1
0
        /// <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);
        }
示例#2
0
 internal void OnFileSizeUpdated(VideoFormat videoFormat)
 {
     this.FileSizeUpdated?.Invoke(this, new FileSizeUpdateEventArgs(videoFormat));
 }
示例#3
0
 public FileSizeUpdateEventArgs(VideoFormat videoFormat)
 {
     this.VideoFormat = videoFormat;
 }