31 ArdourDialog (new_dialog ?
_(
"New Export Format Profile") :
_(
"Edit Export Format Profile")),
34 original_state (format->get_state()),
36 applying_changes_from_engine (0),
38 name_label (
_(
"Label: "),
Gtk::ALIGN_LEFT),
39 name_generated_part (
"",
Gtk::ALIGN_LEFT),
41 normalize_checkbox (
_(
"Normalize to:")),
42 normalize_adjustment (0.00, -90.00, 0.00, 0.1, 0.2),
43 normalize_db_label (
_(
"dBFS"),
Gtk::ALIGN_LEFT),
46 trim_start_checkbox (
_(
"Trim silence at start")),
47 silence_start_checkbox (
_(
"Add silence at start:")),
48 silence_start_clock (
"silence_start", true,
"", true, false, true),
50 trim_end_checkbox (
_(
"Trim silence at end")),
51 silence_end_checkbox (
_(
"Add silence at end:")),
52 silence_end_clock (
"silence_end", true,
"", true, false, true),
54 command_label(
_(
"Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename):"),
Gtk::ALIGN_LEFT),
57 compatibility_label (
_(
"Compatibility"),
Gtk::ALIGN_LEFT),
58 quality_label (
_(
"Quality"),
Gtk::ALIGN_LEFT),
59 format_label (
_(
"File format"),
Gtk::ALIGN_LEFT),
60 sample_rate_label (
_(
"Sample rate"),
Gtk::ALIGN_LEFT),
61 src_quality_label (
_(
"Sample rate conversion quality:"),
Gtk::ALIGN_RIGHT),
63 encoding_options_label (
"",
Gtk::ALIGN_LEFT),
67 sample_format_label (
_(
"Sample Format"),
Gtk::ALIGN_LEFT),
68 dither_label (
_(
"Dithering"),
Gtk::ALIGN_LEFT),
70 with_cue (
_(
"Create CUE file for disk-at-once CD/DVD creation")),
71 with_toc (
_(
"Create TOC file for disk-at-once CD/DVD creation")),
72 with_mp4chaps (
_(
"Create chapter mark file for MP4 chapter marks")),
74 tag_checkbox (
_(
"Tag file with session's metadata"))
83 get_vbox()->pack_start (
name_hbox,
false,
false, 6);
137 Pango::AttrList bold;
138 Pango::Attribute b = Pango::Attribute::create_attr_weight (Pango::WEIGHT_BOLD);
144 revert_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
146 close_button = add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_APPLY);
186 Gtk::CellRendererToggle *toggle =
dynamic_cast<Gtk::CellRendererToggle *
>(
compatibility_view.get_column_cell_renderer (0));
225 SessionHandlePtr::set_session (s);
239 Gtk::ListStore::Children::iterator it;
276 for (Gtk::ListStore::Children::iterator it =
format_list->children().begin(); it !=
format_list->children().end(); ++it) {
340 Gtk::TreeModel::iterator iter;
341 Gtk::TreeModel::Row row;
350 for (ExportFormatManager::CompatList::const_iterator it = compat_list.begin(); it != compat_list.end(); ++it) {
364 Gtk::CellRendererText* text_renderer = Gtk::manage (
new Gtk::CellRendererText);
365 text_renderer->property_editable() =
false;
368 column->pack_start (*text_renderer);
378 for (ExportFormatManager::QualityList::const_iterator it = qualities.begin(); it != qualities.end(); ++it) {
400 for (ExportFormatManager::FormatList::const_iterator it = formats.begin(); it != formats.end(); ++it) {
416 if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (*it))) {
434 for (ExportFormatManager::SampleRateList::const_iterator it = rates.begin(); it != rates.end(); ++it) {
451 Gtk::TreeViewColumn * label_col;
452 Gtk::CellRendererText * renderer;
455 renderer =
dynamic_cast<Gtk::CellRendererText*
> (
quality_view.get_column_cell_renderer (0));
459 renderer =
dynamic_cast<Gtk::CellRendererText*
> (
format_view.get_column_cell_renderer (0));
460 label_col->add_attribute(renderer->property_foreground(),
format_cols.
color);
463 renderer =
dynamic_cast<Gtk::CellRendererText*
> (
sample_rate_view.get_column_cell_renderer (0));
503 Gtk::TreeViewColumn * label_col;
504 Gtk::CellRendererText * renderer;
511 renderer =
dynamic_cast<Gtk::CellRendererText*
> (
sample_format_view.get_column_cell_renderer (0));
519 renderer =
dynamic_cast<Gtk::CellRendererText*
> (
dither_type_view.get_column_cell_renderer (0));
533 ptr->set_selected (state);
567 template<
typename ColsT>
575 Gtk::ListStore::Children::iterator it;
576 Glib::RefPtr<Gtk::TreeSelection> selection = view.get_selection();
578 for (it = list->children().begin(); it != list->children().end(); ++it) {
579 bool selected = selection->is_selected (it);
580 it->get_value (cols.ptr)->set_selected (selected);
644 template<
typename T,
typename ColsT>
652 Gtk::ListStore::Children::iterator it;
653 Glib::RefPtr<Gtk::TreeSelection> selection;
655 selection = view.get_selection();
658 selection->unselect_all();
660 for (it = list->children().begin(); it != list->children().end(); ++it) {
661 if (it->get_value (cols.ptr) == ptr) {
663 selection->select (it);
665 selection->unselect (it);
678 change_compatibility<ExportFormatManager::QualityState, QualityCols> (compatibility, quality,
quality_list,
quality_cols);
705 template<
typename T,
typename ColsT>
708 std::string
const & c_incompatible, std::string
const & c_compatible)
712 Gtk::ListStore::Children::iterator it;
713 for (it = list->children().begin(); it != list->children().end(); ++it) {
714 if (it->get_value (cols.ptr) == ptr) {
715 it->set_value (cols.color, compatibility ? c_compatible : c_incompatible);
782 zero.
type = AnyTime::Timecode;
791 zero.
type = AnyTime::Timecode;
804 case AnyTime::Timecode:
810 case AnyTime::Frames:
813 case AnyTime::Seconds:
830 switch (clock.
mode()) {
832 time.
type = AnyTime::Timecode;
836 time.
type = AnyTime::BBT;
840 time.
type = AnyTime::Seconds;
844 time.
type = AnyTime::Frames;
874 if ((linear_ptr = boost::dynamic_pointer_cast<ExportFormatLinear> (ptr))) {
876 }
else if ((ogg_ptr = boost::dynamic_pointer_cast<ExportFormatOggVorbis> (ptr))) {
878 }
else if ((flac_ptr = boost::dynamic_pointer_cast<ExportFormatFLAC> (ptr))) {
880 }
else if ((bwf_ptr = boost::dynamic_pointer_cast<ExportFormatBWF> (ptr))) {
883 std::cout <<
"Unrecognized format!" << std::endl;
896 remove_from->remove (to_remove);
914 show_all_children ();
925 show_all_children ();
942 show_all_children ();
958 show_all_children ();
966 Gtk::TreeModel::iterator iter;
967 Gtk::TreeModel::Row row;
973 for (HasSampleFormat::SampleFormatList::const_iterator it = formats.begin(); it != formats.end(); ++it) {
981 if ((*it)->selected()) {
990 for (HasSampleFormat::DitherTypeList::const_iterator it = types.begin(); it != types.end(); ++it) {
998 if ((*it)->selected()) {
framecnt_t nominal_frame_rate() const
void set(framepos_t, bool force=false, ARDOUR::framecnt_t offset=0)
framecnt_t convert_to_frames(AnyTime const &position)
void set_session(ARDOUR::Session *s)
framecnt_t frame_rate() const
LIBGTKMM2EXT_API void set_sensitive(std::vector< Glib::RefPtr< Gtk::Action > > &actions, bool)
sigc::signal< void > ValueChanged
LIBARDOUR_API PBD::PropertyDescriptor< bool > select
framepos_t current_duration(framepos_t position=0) const
void timecode_time(Timecode::Time &)
void bbt_time(framepos_t when, Timecode::BBT_Time &)
ARDOUR::Session * _session