/// <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); }
private void FFmpeg_InfoUpdated(object sender, EventArgs e) { Dispatcher.Invoke(() => { WorkProgressBar.Maximum = hostFFmpeg.FrameCount + ResumePos; timeCalc = new TimeLeftCalculator(hostFFmpeg.FrameCount + hostFFmpeg?.Options.ResumePos ?? 0); }); }