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 /*ptr*/) +ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr 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_ptrget_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 (); } @@ -1140,6 +1123,28 @@ ExportFormatDialog::fill_sample_format_lists (boost::shared_ptr 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 () { 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 ptr); void fill_sample_format_lists (boost::shared_ptr ptr); + void fill_codec_quality_lists (boost::shared_ptr ptr); /*** GUI components ***/