public AdjustTimingViaShotChanges(Subtitle subtitle, string videoFileName, WavePeakData wavePeaks, List <double> shotChanges) { UiUtil.PreInitialize(this); InitializeComponent(); UiUtil.FixFonts(this); _subtitle = subtitle; SetAudioVisualizerSettings(); audioVisualizer.WavePeaks = wavePeaks; audioVisualizer.ShotChanges = shotChanges; OpenVideo(videoFileName); }
public SeJobExport( Subtitle subtitle, Subtitle subtitleOriginal, SubtitleFormat subtitleFormat, string videoFileName, WavePeakData waveform, List <double> shotChanges) { InitializeComponent(); _subtitle = subtitle; _subtitleOriginal = subtitleOriginal; _subtitleFormat = subtitleFormat; _videoFileName = videoFileName; if (waveform != null) { _waveform = new SeJobWaveform { SampleRate = waveform.SampleRate, HighestPeak = waveform.HighestPeak, PeakMins = waveform.Peaks.Select(p => p.Min).ToList(), PeakMaxs = waveform.Peaks.Select(p => p.Max).ToList(), }; } _shotChanges = shotChanges; textBoxJobId.Text = Guid.NewGuid().ToString(); textBoxSubtitleFileName.Text = Path.GetFileName(_subtitle?.FileName); numericUpDownMaxNumberOfLines.Value = Configuration.Settings.General.MaxNumberOfLines; numericUpDownSubtitleLineMaximumLength.Value = Configuration.Settings.General.SubtitleLineMaximumLength; numericUpDownMaxCharsSec.Value = (decimal)Configuration.Settings.General.SubtitleMaximumCharactersPerSeconds; numericUpDownDurationMin.Value = Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds; numericUpDownDurationMax.Value = Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds; numericUpDownMinGapMs.Value = Configuration.Settings.General.MinimumMillisecondsBetweenLines; numericUpDownMaxWordsMin.Value = (decimal)Configuration.Settings.General.SubtitleMaximumWordsPerMinute; numericUpDownOptimalCharsSec.Value = (decimal)Configuration.Settings.General.SubtitleOptimalCharactersPerSeconds; UpdateUiAfterLoad(); }