private void combo_preset_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (combo_preset.IsDropDownOpen || combo_preset.IsSelectionBoxHighlighted) { m.ffmpeg_options.dvpreset = combo_preset.SelectedItem.ToString(); //битрейт if (m.format == Format.ExportFormats.AviDVPAL) { if (m.ffmpeg_options.dvpreset == "DVCPRO50") { m.outvbitrate = 57600; } else { m.outvbitrate = 28800; } } if (m.format == Format.ExportFormats.AviDVNTSC) { if (m.ffmpeg_options.dvpreset == "DVCPRO50") { m.outvbitrate = 57543; } else { m.outvbitrate = 28771; } } root_window.UpdateOutSize(); root_window.UpdateManualProfile(); } }
private void combo_color_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (combo_color.IsDropDownOpen || combo_color.IsSelectionBoxHighlighted) { m.ffmpeg_options.colorspace = combo_color.SelectedItem.ToString(); m.outvbitrate = 1; //(int)((6.70495523 * (double)m.outresw * (double)m.outresh * Calculate.ConvertStringToDouble(m.outframerate)) / 1000.0); m.encodingmode = Settings.EncodingModes.Quantizer; root_window.UpdateOutSize(); root_window.UpdateManualProfile(); } }
private void combo_mode_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (combo_mode.IsDropDownOpen || combo_mode.IsSelectionBoxHighlighted) { //запоминаем старый режим oldmode = m.encodingmode; string XviDmode = combo_mode.SelectedItem.ToString(); if (XviDmode == "1-Pass Bitrate") { m.encodingmode = Settings.EncodingModes.OnePass; } else if (XviDmode == "2-Pass Bitrate") { m.encodingmode = Settings.EncodingModes.TwoPass; } else if (XviDmode == "1-Pass Size") { m.encodingmode = Settings.EncodingModes.OnePassSize; } else if (XviDmode == "2-Pass Size") { m.encodingmode = Settings.EncodingModes.TwoPassSize; } else if (XviDmode == "3-Pass Bitrate") { m.encodingmode = Settings.EncodingModes.ThreePass; } else if (XviDmode == "3-Pass Size") { m.encodingmode = Settings.EncodingModes.ThreePassSize; } else if (XviDmode == "Constant Quality") { m.encodingmode = Settings.EncodingModes.Quality; } else if (XviDmode == "2-Pass Quality") { m.encodingmode = Settings.EncodingModes.TwoPassQuality; } else if (XviDmode == "3-Pass Quality") { m.encodingmode = Settings.EncodingModes.ThreePassQuality; } SetMinMaxBitrate(); //сброс на квантайзер if (oldmode != Settings.EncodingModes.Quality && oldmode != Settings.EncodingModes.Quantizer && oldmode != Settings.EncodingModes.TwoPassQuality && oldmode != Settings.EncodingModes.ThreePassQuality) { if (m.encodingmode == Settings.EncodingModes.Quality || m.encodingmode == Settings.EncodingModes.Quantizer || m.encodingmode == Settings.EncodingModes.TwoPassQuality || m.encodingmode == Settings.EncodingModes.ThreePassQuality) { SetDefaultBitrates(); } } //сброс на битрейт if (oldmode != Settings.EncodingModes.OnePass && oldmode != Settings.EncodingModes.TwoPass && oldmode != Settings.EncodingModes.ThreePass) { if (m.encodingmode == Settings.EncodingModes.OnePass || m.encodingmode == Settings.EncodingModes.TwoPass || m.encodingmode == Settings.EncodingModes.ThreePass) { SetDefaultBitrates(); } } //сброс на размер if (oldmode != Settings.EncodingModes.TwoPassSize && oldmode != Settings.EncodingModes.ThreePassSize && oldmode != Settings.EncodingModes.OnePassSize) { if (m.encodingmode == Settings.EncodingModes.TwoPassSize || m.encodingmode == Settings.EncodingModes.ThreePassSize || m.encodingmode == Settings.EncodingModes.OnePassSize) { SetDefaultBitrates(); } } root_window.UpdateOutSize(); root_window.UpdateManualProfile(); } }