13
0

GUI support for OPUS encoding

This commit is contained in:
Robin Gareus 2022-12-05 23:43:50 +01:00
parent 211ff64e7d
commit 4acc458a78
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 18 additions and 1 deletions

View File

@ -431,7 +431,10 @@ ExportFormatDialog::load_state (FormatPtr spec)
boost::shared_ptr<ARDOUR::ExportFormat> format_in_list = it->get_value (format_cols.ptr); boost::shared_ptr<ARDOUR::ExportFormat> format_in_list = it->get_value (format_cols.ptr);
if (format_in_list->get_format_id () == spec->format_id () && if (format_in_list->get_format_id () == spec->format_id () &&
// BWF has the same format id with wav, so we need to check this. // BWF has the same format id with wav, so we need to check this.
format_in_list->has_broadcast_info () == spec->has_broadcast_info ()) { format_in_list->has_broadcast_info () == spec->has_broadcast_info () &&
// Ogg can be Vorbis or OPUS
(format_in_list->get_format_id () != ExportFormatBase::F_Ogg || (spec->sample_format () == format_in_list->get_explicit_sample_format ()))
) {
format_in_list->set_selected (true); format_in_list->set_selected (true);
break; break;
} }
@ -1112,6 +1115,7 @@ ExportFormatDialog::change_encoding_options (ExportFormatPtr ptr)
boost::shared_ptr<ARDOUR::ExportFormatLinear> linear_ptr; boost::shared_ptr<ARDOUR::ExportFormatLinear> linear_ptr;
boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ogg_ptr; boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ogg_ptr;
boost::shared_ptr<ARDOUR::ExportFormatFLAC> flac_ptr; boost::shared_ptr<ARDOUR::ExportFormatFLAC> flac_ptr;
boost::shared_ptr<ARDOUR::ExportFormatOggOpus> opus_ptr;
boost::shared_ptr<ARDOUR::ExportFormatBWF> bwf_ptr; boost::shared_ptr<ARDOUR::ExportFormatBWF> bwf_ptr;
boost::shared_ptr<ARDOUR::ExportFormatMPEG> mpeg_ptr; boost::shared_ptr<ARDOUR::ExportFormatMPEG> mpeg_ptr;
boost::shared_ptr<ARDOUR::ExportFormatFFMPEG> ffmpeg_ptr; boost::shared_ptr<ARDOUR::ExportFormatFFMPEG> ffmpeg_ptr;
@ -1120,6 +1124,8 @@ ExportFormatDialog::change_encoding_options (ExportFormatPtr ptr)
show_linear_enconding_options (linear_ptr); show_linear_enconding_options (linear_ptr);
} else if ((ogg_ptr = boost::dynamic_pointer_cast<ExportFormatOggVorbis> (ptr))) { } else if ((ogg_ptr = boost::dynamic_pointer_cast<ExportFormatOggVorbis> (ptr))) {
show_ogg_enconding_options (ogg_ptr); show_ogg_enconding_options (ogg_ptr);
} else if ((opus_ptr = boost::dynamic_pointer_cast<ExportFormatOggOpus> (ptr))) {
show_opus_enconding_options (opus_ptr);
} else if ((flac_ptr = boost::dynamic_pointer_cast<ExportFormatFLAC> (ptr))) { } else if ((flac_ptr = boost::dynamic_pointer_cast<ExportFormatFLAC> (ptr))) {
show_flac_enconding_options (flac_ptr); show_flac_enconding_options (flac_ptr);
} else if ((bwf_ptr = boost::dynamic_pointer_cast<ExportFormatBWF> (ptr))) { } else if ((bwf_ptr = boost::dynamic_pointer_cast<ExportFormatBWF> (ptr))) {
@ -1176,6 +1182,16 @@ ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr<ARDOUR::Export
show_all_children (); show_all_children ();
} }
void
ExportFormatDialog::show_opus_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggOpus> ptr)
{
encoding_options_label.set_label (_("OPUS options"));
encoding_options_table.resize (1, 1);
encoding_options_table.attach (codec_quality_combo, 0, 1, 0, 1);
fill_codec_quality_lists (ptr);
show_all_children ();
}
void void
ExportFormatDialog::show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr) ExportFormatDialog::show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr)
{ {

View File

@ -168,6 +168,7 @@ private:
void show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ptr); void show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ptr);
void show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr); void show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr);
void show_bwf_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatBWF> ptr); void show_bwf_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatBWF> ptr);
void show_opus_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggOpus> ptr);
void show_mpeg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatMPEG> ptr); void show_mpeg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatMPEG> ptr);
void show_ffmpeg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFFMPEG> ptr); void show_ffmpeg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFFMPEG> ptr);