Example #1
0
 /// <summary>
 /// Calculates a value while ensuring ResultFps and ResultTimeLeft remain valid.
 /// </summary>
 protected void CalcValidate(ITimeLeftCalculator calc, long frame, int seconds)
 {
     environment.ChangeTime(seconds);
     calc.Calculate(frame);
     Assert.True(calc.ResultFps >= 0);
     Assert.True(calc.ResultTimeLeft >= TimeSpan.Zero);
 }
Example #2
0
 private void FFmpeg_InfoUpdated(object sender, EventArgs e)
 {
     Dispatcher.Invoke(() => {
         WorkProgressBar.Maximum = hostFFmpeg.FrameCount + ResumePos;
         timeCalc = new TimeLeftCalculator(hostFFmpeg.FrameCount + hostFFmpeg?.Options.ResumePos ?? 0);
     });
 }