diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-20 03:35:25 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-20 03:35:25 +0100 |
commit | 0268489c7853780a91f289a409ec00c6e561526c (patch) | |
tree | e3b0d73ef3e3418c3f89fa3b5e5a58983283920e | |
parent | 7b709b3cea2fd873a5f64be6f598e3741c259ca5 (diff) |
Vorbis Quality Config GUI
-rw-r--r-- | gtk2_ardour/export_format_dialog.cc | 51 | ||||
-rw-r--r-- | gtk2_ardour/export_format_dialog.h | 1 |
2 files changed, 29 insertions, 23 deletions
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc index 2a3a563005..61e12822bd 100644 --- a/gtk2_ardour/export_format_dialog.cc +++ b/gtk2_ardour/export_format_dialog.cc @@ -1026,13 +1026,14 @@ ExportFormatDialog::show_linear_enconding_options (boost::shared_ptr<ARDOUR::Exp } void -ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> /*ptr*/) +ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ptr) { encoding_options_label.set_label (_("Ogg Vorbis options")); - encoding_options_table.resize (1, 1); - encoding_options_table.attach (tag_checkbox, 0, 1, 0, 1); - + encoding_options_table.resize (2, 1); + encoding_options_table.attach (codec_quality_combo, 0, 1, 0, 1); + encoding_options_table.attach (tag_checkbox, 0, 1, 1, 2); + fill_codec_quality_lists (ptr); show_all_children (); } @@ -1075,25 +1076,7 @@ ExportFormatDialog::show_ffmpeg_enconding_options (boost::shared_ptr<ARDOUR::Exp encoding_options_label.set_label (_("FFMPEG/MP3 options")); encoding_options_table.resize (1, 1); encoding_options_table.attach (codec_quality_combo, 0, 1, 0, 1); - - HasCodecQuality::CodecQualityList const & codecs = ptr->get_codec_qualities(); - - codec_quality_list->clear(); - for (HasCodecQuality::CodecQualityList::const_iterator it = codecs.begin(); it != codecs.end(); ++it) { - - Gtk::TreeModel::iterator iter = codec_quality_list->append(); - Gtk::TreeModel::Row row = *iter; - row[codec_quality_cols.quality] = (*it)->quality; - row[codec_quality_cols.label] = (*it)->name; - } - - for (Gtk::ListStore::Children::iterator it = codec_quality_list->children().begin(); it != codec_quality_list->children().end(); ++it) { - if (it->get_value (codec_quality_cols.quality) == format->codec_quality()) { - codec_quality_combo.set_active (it); - break; - } - } - + fill_codec_quality_lists (ptr); show_all_children (); } @@ -1141,6 +1124,28 @@ ExportFormatDialog::fill_sample_format_lists (boost::shared_ptr<ARDOUR::HasSampl } void +ExportFormatDialog::fill_codec_quality_lists (boost::shared_ptr<ARDOUR::HasCodecQuality> ptr) +{ + HasCodecQuality::CodecQualityList const & codecs = ptr->get_codec_qualities(); + + codec_quality_list->clear(); + for (HasCodecQuality::CodecQualityList::const_iterator it = codecs.begin(); it != codecs.end(); ++it) { + + Gtk::TreeModel::iterator iter = codec_quality_list->append(); + Gtk::TreeModel::Row row = *iter; + row[codec_quality_cols.quality] = (*it)->quality; + row[codec_quality_cols.label] = (*it)->name; + } + + for (Gtk::ListStore::Children::iterator it = codec_quality_list->children().begin(); it != codec_quality_list->children().end(); ++it) { + if (it->get_value (codec_quality_cols.quality) == format->codec_quality()) { + codec_quality_combo.set_active (it); + break; + } + } +} + +void ExportFormatDialog::end_dialog () { hide_all (); diff --git a/gtk2_ardour/export_format_dialog.h b/gtk2_ardour/export_format_dialog.h index 2b472e3494..40ca8dfe45 100644 --- a/gtk2_ardour/export_format_dialog.h +++ b/gtk2_ardour/export_format_dialog.h @@ -162,6 +162,7 @@ private: void show_ffmpeg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFFMPEG> ptr); void fill_sample_format_lists (boost::shared_ptr<ARDOUR::HasSampleFormat> ptr); + void fill_codec_quality_lists (boost::shared_ptr<ARDOUR::HasCodecQuality> ptr); /*** GUI components ***/ |