internal void OnConvertProgress(ConvertProgressEventArgs args)
 {
     if (this.ConvertProgress != null)
     {
         this.ConvertProgress(this, args);
     }
 }
        internal void ParseLine(string line)
        {
            if (!Enabled)
            {
                return;
            }
            TimeSpan timeSpan = (lastProgressArgs != null) ? lastProgressArgs.TotalDuration : TimeSpan.Zero;
            Match    match    = DurationRegex.Match(line);

            if (match.Success)
            {
                TimeSpan result = TimeSpan.Zero;
                if (TimeSpan.TryParse(match.Groups["duration"].Value, out result))
                {
                    TimeSpan totalDuration = timeSpan.Add(result);
                    lastProgressArgs = new ConvertProgressEventArgs(TimeSpan.Zero, totalDuration);
                }
            }
            Match match2 = ProgressRegex.Match(line);

            if (!match2.Success)
            {
                return;
            }
            TimeSpan result2 = TimeSpan.Zero;

            if (TimeSpan.TryParse(match2.Groups["progress"].Value, out result2))
            {
                if (progressEventCount == 0)
                {
                    timeSpan = CorrectDuration(timeSpan);
                }
                lastProgressArgs = new ConvertProgressEventArgs(result2, (timeSpan != TimeSpan.Zero) ? timeSpan : result2);
                ProgressCallback(lastProgressArgs);
                progressEventCount++;
            }
        }
 internal void Reset()
 {
     progressEventCount = 0;
     lastProgressArgs   = null;
 }