private void button_add_Click(object sender, RoutedEventArgs e) { NewProfile newp = new NewProfile("Custom", "", NewProfile.ProfileType.Filtering, this); if (newp.profile != null) { SavePreset(newp.profile); LoadProfiles(); } }
private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) //кнопка "добавить новый профиль" { string auto_name = "Custom"; if (m.iscolormatrix) { auto_name += " DVD"; } NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.SBC, this); //создается новый профиль if (newp.profile != null) { CreateSBCProfile(newp.profile); LoadProfiles();//загружает список профилей в форму, название текущего профиля выбирается = m.sbc } }
private void button_add_profile_Click(object sender, RoutedEventArgs e) { NewProfile newp = new NewProfile("Custom " + format, null, NewProfile.ProfileType.FFRebuilder, this); if (string.IsNullOrEmpty(newp.profile)) return; SaveProfile(newp.profile); LoadAllProfiles(); Settings.FFRebuilder_Profile = profile; }
private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) { if (m.outvcodec == "Copy") return; if (x264c == null && x262c == null && xvid == null) UpdateMassive(); //CustomCLI string auto_name = m.outvcodec + " "; if (m.outvcodec == "HUFF" || m.outvcodec == "FFV1") { auto_name += "LossLess"; } else if (m.outvcodec == "DV") { auto_name += "Custom"; } else { if (m.outvbitrate == 0) auto_name += "LL"; else { if (m.encodingmode == Settings.EncodingModes.Quality || m.encodingmode == Settings.EncodingModes.Quantizer || m.encodingmode == Settings.EncodingModes.TwoPassQuality || m.encodingmode == Settings.EncodingModes.ThreePassQuality) auto_name += "Q" + m.outvbitrate; else if (m.encodingmode == Settings.EncodingModes.OnePass || m.encodingmode == Settings.EncodingModes.TwoPass || m.encodingmode == Settings.EncodingModes.ThreePass) auto_name += m.outvbitrate + "k"; else auto_name += m.outvbitrate + "MB"; } if (m.outvcodec != "MJPEG") { if (m.encodingmode == Settings.EncodingModes.TwoPass || m.encodingmode == Settings.EncodingModes.TwoPassSize || m.encodingmode == Settings.EncodingModes.TwoPassQuality) auto_name += " 2P"; else if (m.encodingmode == Settings.EncodingModes.ThreePass || m.encodingmode == Settings.EncodingModes.ThreePassSize || m.encodingmode == Settings.EncodingModes.ThreePassQuality) auto_name = " 3P"; } auto_name += " Custom"; } NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.VEncoding, this); if (newp.profile != null) { string old_encoding = m.vencoding; m.vencoding = newp.profile; //Название для нового пресета try { PresetLoader.CreateVProfile(m); //Пресет записывается в файл LoadProfiles(); //Обновляется содержимое комбобокса с пресетами, выбирается текущий пресет } catch (Exception ex) { new Message(this).ShowMessage(Languages.Translate("Can`t save profile") + ": " + ex.Message, Languages.Translate("Error"), Message.MessageStyle.Ok); m.vencoding = old_encoding; } } //Не совсем понятно, зачем нужно перезагружаться с пресета, который мы только что сохранили.. if (x264c == null && x262c == null && xvid == null) //CustomCLI { LoadProfileToCodec(); UpdateOutSize(); UpdateCodecMassive(); } }
//кнопка "добавить новый профиль" private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) { string auto_name = "Custom"; if (m.iscolormatrix) auto_name += " DVD"; NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.SBC, this); //создается новый профиль if (newp.profile != null) { CreateSBCProfile(newp.profile); LoadProfiles();//загружает список профилей в форму, название текущего профиля выбирается = m.sbc } }
private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) { if (m.outvcodec == "Copy") { return; } if (x265c == null && x264c == null && x262c == null && xvid == null && mpeg4 == null && mpeg2 == null && mpeg1 == null && flv == null) { UpdateMassive(); //CustomCLI } string auto_name = m.outvcodec + " "; if (m.outvcodec == "HUFF" || m.outvcodec == "FFV1") { auto_name += "LossLess"; } else if (m.outvcodec == "DV") { auto_name += "Custom"; } else { if (m.outvbitrate == 0 || m.outvcodec == "x265" && m.x265options.lossless) { auto_name += "LL"; } else { if (m.encodingmode == Settings.EncodingModes.Quality || m.encodingmode == Settings.EncodingModes.Quantizer || m.encodingmode == Settings.EncodingModes.TwoPassQuality || m.encodingmode == Settings.EncodingModes.ThreePassQuality) { auto_name += "Q" + m.outvbitrate; } else if (m.encodingmode == Settings.EncodingModes.OnePass || m.encodingmode == Settings.EncodingModes.TwoPass || m.encodingmode == Settings.EncodingModes.ThreePass) { auto_name += m.outvbitrate + "k"; } else { auto_name += m.outvbitrate + "MB"; } } if (m.outvcodec != "MJPEG") { if (m.encodingmode == Settings.EncodingModes.TwoPass || m.encodingmode == Settings.EncodingModes.TwoPassSize || m.encodingmode == Settings.EncodingModes.TwoPassQuality) { auto_name += " 2P"; } else if (m.encodingmode == Settings.EncodingModes.ThreePass || m.encodingmode == Settings.EncodingModes.ThreePassSize || m.encodingmode == Settings.EncodingModes.ThreePassQuality) { auto_name = " 3P"; } } auto_name += " Custom"; } NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.VEncoding, this); if (newp.profile != null) { string old_encoding = m.vencoding; m.vencoding = newp.profile; //Название для нового пресета try { PresetLoader.CreateVProfile(m); //Пресет записывается в файл LoadProfiles(); //Обновляется содержимое комбобокса с пресетами, выбирается текущий пресет } catch (Exception ex) { new Message(this).ShowMessage(Languages.Translate("Can`t save profile") + ": " + ex.Message, Languages.Translate("Error"), Message.MessageStyle.Ok); m.vencoding = old_encoding; } } //Не совсем понятно, зачем нужно перезагружаться с пресета, который мы только что сохранили.. if (x265c == null && x264c == null && x262c == null && xvid == null && mpeg4 == null && mpeg2 == null && mpeg1 == null && flv == null) //CustomCLI { LoadProfileToCodec(); UpdateOutSize(); UpdateCodecMassive(); } }
private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) { AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (outstream.codec == "Copy" || outstream.codec == "Disabled") { return; } UpdateMassive(); string auto_name = outstream.codec; if (outstream.codec == "AAC") { if (m.aac_options.aacprofile == "AAC-LC") { auto_name += "-LC"; } else if (m.aac_options.aacprofile == "AAC-HE") { auto_name += "-HE"; } else if (m.aac_options.aacprofile == "AAC-HEv2") { auto_name += "-HEv2"; } auto_name += " " + m.aac_options.encodingmode.ToString(); if (m.aac_options.encodingmode == Settings.AudioEncodingModes.VBR) { auto_name += " Q" + m.aac_options.quality; } else { auto_name += " " + outstream.bitrate + "k"; } } else if (outstream.codec == "QAAC") { if (m.qaac_options.encodingmode != Settings.AudioEncodingModes.ALAC) { if (m.qaac_options.aacprofile == "AAC-LC") { auto_name += "-LC"; } else if (m.qaac_options.aacprofile == "AAC-HE") { auto_name += "-HE"; } auto_name += " " + m.qaac_options.encodingmode.ToString(); if (m.qaac_options.encodingmode == Settings.AudioEncodingModes.VBR) { auto_name += " Q" + m.qaac_options.quality; } else { auto_name += " " + outstream.bitrate + "k"; } } else { auto_name += " " + m.qaac_options.encodingmode.ToString(); } } else if (outstream.codec == "MP3") { auto_name += " " + m.mp3_options.encodingmode.ToString().ToUpper(); if (m.mp3_options.encodingmode == Settings.AudioEncodingModes.VBR) { auto_name += " Q" + m.mp3_options.quality; } else { auto_name += " " + outstream.bitrate + "k"; } } else if (outstream.codec == "PCM" || outstream.codec == "LPCM") { auto_name += " " + outstream.bits + "bit"; } else if (outstream.codec == "AC3" || outstream.codec == "MP2") { auto_name += " " + outstream.bitrate + "k"; } else if (outstream.codec == "FLAC") { auto_name += " Q" + m.flac_options.level; } auto_name += " Custom"; NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.AEncoding, this); if (newp.profile != null) { string old_encoding = outstream.encoding; outstream.encoding = newp.profile; try { PresetLoader.CreateAProfile(m); LoadProfiles(); } catch (Exception ex) { new Message(this).ShowMessage(Languages.Translate("Can`t save profile") + ": " + ex.Message, Languages.Translate("Error"), Message.MessageStyle.Ok); outstream.encoding = old_encoding; } } LoadProfileToCodec(); UpdateOutSize(); UpdateCodecMassive(); }
private void button_add_Click(object sender, System.Windows.RoutedEventArgs e) { AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (outstream.codec == "Copy" || outstream.codec == "Disabled") return; UpdateMassive(); string auto_name = outstream.codec; if (outstream.codec == "AAC") { if (m.aac_options.aacprofile == "AAC-LC") auto_name += "-LC"; else if (m.aac_options.aacprofile == "AAC-HE") auto_name += "-HE"; else if (m.aac_options.aacprofile == "AAC-HEv2") auto_name += "-HEv2"; auto_name += " " + m.aac_options.encodingmode.ToString(); if (m.aac_options.encodingmode == Settings.AudioEncodingModes.VBR) auto_name += " Q" + m.aac_options.quality; else auto_name += " " + outstream.bitrate + "k"; } else if (outstream.codec == "QAAC") { if (m.qaac_options.encodingmode != Settings.AudioEncodingModes.ALAC) { if (m.qaac_options.aacprofile == "AAC-LC") auto_name += "-LC"; else if (m.qaac_options.aacprofile == "AAC-HE") auto_name += "-HE"; auto_name += " " + m.qaac_options.encodingmode.ToString(); if (m.qaac_options.encodingmode == Settings.AudioEncodingModes.VBR) auto_name += " Q" + m.qaac_options.quality; else auto_name += " " + outstream.bitrate + "k"; } else auto_name += " " + m.qaac_options.encodingmode.ToString(); } else if (outstream.codec == "MP3") { auto_name += " " + m.mp3_options.encodingmode.ToString().ToUpper(); if (m.mp3_options.encodingmode == Settings.AudioEncodingModes.VBR) auto_name += " Q" + m.mp3_options.quality; else auto_name += " " + outstream.bitrate + "k"; } else if (outstream.codec == "PCM" || outstream.codec == "LPCM") { auto_name += " " + outstream.bits + "bit"; } else if (outstream.codec == "AC3" || outstream.codec == "MP2") { auto_name += " " + outstream.bitrate + "k"; } else if (outstream.codec == "FLAC") { auto_name += " Q" + m.flac_options.level; } auto_name += " Custom"; NewProfile newp = new NewProfile(auto_name, Format.EnumToString(m.format), NewProfile.ProfileType.AEncoding, this); if (newp.profile != null) { string old_encoding = outstream.encoding; outstream.encoding = newp.profile; try { PresetLoader.CreateAProfile(m); LoadProfiles(); } catch (Exception ex) { new Message(this).ShowMessage(Languages.Translate("Can`t save profile") + ": " + ex.Message, Languages.Translate("Error"), Message.MessageStyle.Ok); outstream.encoding = old_encoding; } } LoadProfileToCodec(); UpdateOutSize(); UpdateCodecMassive(); }