prepare installer for multiabi bundles
[ardour.git] / gtk2_ardour / export_format_dialog.h
index 418b015d8ca628eb7e5daab2fd23f67200cf5f31..8709ff979b4be4c267d791e375dff6d86817f66f 100644 (file)
 #include "ardour/export_formats.h"
 
 #include "pbd/xml++.h"
+#include "pbd/signals.h"
 
 #include "ardour_dialog.h"
 #include "audio_clock.h"
 
+#ifdef interface
+#undef interface
+#endif
+
 #include <gtkmm.h>
 
-class ExportFormatDialog : public ArdourDialog {
+class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList {
   private:
 
-       typedef ARDOUR::ExportFormatManager::WeakCompatPtr WeakCompatPtr;
+       typedef ARDOUR::WeakExportFormatCompatibilityPtr WeakCompatPtr;
+       typedef ARDOUR::WeakExportFormatPtr WeakFormatPtr;
        typedef ARDOUR::ExportFormatManager::WeakQualityPtr WeakQualityPtr;
-       typedef ARDOUR::ExportFormatManager::WeakFormatPtr WeakFormatPtr;
        typedef ARDOUR::ExportFormatManager::WeakSampleRatePtr WeakSampleRatePtr;
        typedef ARDOUR::ExportFormatManager::WeakSampleFormatPtr WeakSampleFormatPtr;
        typedef ARDOUR::ExportFormatManager::WeakDitherTypePtr WeakDitherTypePtr;
@@ -76,7 +81,7 @@ class ExportFormatDialog : public ArdourDialog {
 
        /* These are connected to signals from GUI components, and should change element states  */
 
-       void update_compatibility_selection (Glib::ustring const & path);
+       void update_compatibility_selection (std::string const & path);
        void update_quality_selection ();
        void update_format_selection ();
        void update_sample_rate_selection ();
@@ -107,7 +112,9 @@ class ExportFormatDialog : public ArdourDialog {
 
        template<typename T, typename ColsT>
        void change_compatibility (bool compatibility, boost::weak_ptr<T> w_ptr, Glib::RefPtr<Gtk::ListStore> & list, ColsT & cols,
-                                  Glib::ustring const & c_incompatible = "red", Glib::ustring const & c_compatible = "white");
+                                  std::string const & c_incompatible = "red", std::string const & c_compatible = "white");
+
+       void update_description();
 
        uint32_t applying_changes_from_engine;
 
@@ -119,6 +126,7 @@ class ExportFormatDialog : public ArdourDialog {
        void update_trim_end_selection ();
 
        void update_normalize_selection ();
+       void update_normalize_sensitivity ();
        void update_silence_start_selection ();
        void update_silence_end_selection ();
 
@@ -130,7 +138,7 @@ class ExportFormatDialog : public ArdourDialog {
 
        /*** Encoding options */
 
-       void change_encoding_options (ARDOUR::ExportFormatManager::FormatPtr ptr);
+       void change_encoding_options (ARDOUR::ExportFormatPtr ptr);
 
        void empty_encoding_option_table ();
        void remove_widget (Gtk::Widget & to_remove, Gtk::Container * remove_from);
@@ -150,14 +158,23 @@ class ExportFormatDialog : public ArdourDialog {
 
        Gtk::Label name_label;
        Gtk::Entry name_entry;
+       Gtk::Label name_generated_part;
 
        /* Normalize */
 
        Gtk::HBox        normalize_hbox;
        Gtk::CheckButton normalize_checkbox;
-       Gtk::SpinButton  normalize_spinbutton;
-       Gtk::Adjustment  normalize_adjustment;
-       Gtk::Label       normalize_db_label;
+       Gtk::RadioButton normalize_peak_rb;
+       Gtk::RadioButton normalize_loudness_rb;
+       Gtk::SpinButton  normalize_dbfs_spinbutton;
+       Gtk::Adjustment  normalize_dbfs_adjustment;
+       Gtk::SpinButton  normalize_lufs_spinbutton;
+       Gtk::Adjustment  normalize_lufs_adjustment;
+       Gtk::SpinButton  normalize_dbtp_spinbutton;
+       Gtk::Adjustment  normalize_dbtp_adjustment;
+       Gtk::Label       normalize_dbfs_label;
+       Gtk::Label       normalize_lufs_label;
+       Gtk::Label       normalize_dbtp_label;
 
        /* Silence  */
 
@@ -171,14 +188,19 @@ class ExportFormatDialog : public ArdourDialog {
        Gtk::CheckButton silence_end_checkbox;
        AudioClock       silence_end_clock;
 
+       /* Post-export hook */
+
+       Gtk::Label       command_label;
+       Gtk::Entry       command_entry;
+
        /* Format table */
 
        struct CompatibilityCols : public Gtk::TreeModelColumnRecord
        {
          public:
-               Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::CompatPtr>  ptr;
-               Gtk::TreeModelColumn<bool>                                    selected;
-               Gtk::TreeModelColumn<Glib::ustring>                           label;
+               Gtk::TreeModelColumn<ARDOUR::ExportFormatCompatibilityPtr>  ptr;
+               Gtk::TreeModelColumn<bool>                                  selected;
+               Gtk::TreeModelColumn<std::string>                           label;
 
                CompatibilityCols () { add(ptr); add(selected); add(label); }
        };
@@ -193,8 +215,8 @@ class ExportFormatDialog : public ArdourDialog {
        {
          public:
                Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::QualityPtr>  ptr;
-               Gtk::TreeModelColumn<Glib::ustring>                            color;
-               Gtk::TreeModelColumn<Glib::ustring>                            label;
+               Gtk::TreeModelColumn<std::string>                            color;
+               Gtk::TreeModelColumn<std::string>                            label;
 
                QualityCols () { add(ptr); add(color); add(label); }
        };
@@ -204,9 +226,9 @@ class ExportFormatDialog : public ArdourDialog {
        struct FormatCols : public Gtk::TreeModelColumnRecord
        {
          public:
-               Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::FormatPtr>  ptr;
-               Gtk::TreeModelColumn<Glib::ustring>                           color;
-               Gtk::TreeModelColumn<Glib::ustring>                           label;
+               Gtk::TreeModelColumn<ARDOUR::ExportFormatPtr>  ptr;
+               Gtk::TreeModelColumn<std::string>              color;
+               Gtk::TreeModelColumn<std::string>              label;
 
                FormatCols () { add(ptr); add(color); add(label); }
        };
@@ -217,8 +239,8 @@ class ExportFormatDialog : public ArdourDialog {
        {
          public:
                Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::SampleRatePtr>  ptr;
-               Gtk::TreeModelColumn<Glib::ustring>                               color;
-               Gtk::TreeModelColumn<Glib::ustring>                               label;
+               Gtk::TreeModelColumn<std::string>                               color;
+               Gtk::TreeModelColumn<std::string>                               label;
 
                SampleRateCols () { add(ptr); add(color); add(label); }
        };
@@ -243,7 +265,7 @@ class ExportFormatDialog : public ArdourDialog {
        {
          public:
                Gtk::TreeModelColumn<ARDOUR::ExportFormatBase::SRCQuality>  id;
-               Gtk::TreeModelColumn<Glib::ustring>                         label;
+               Gtk::TreeModelColumn<std::string>                         label;
 
                SRCQualityCols () { add(id); add(label); }
        };
@@ -273,8 +295,8 @@ class ExportFormatDialog : public ArdourDialog {
        {
          public:
                Gtk::TreeModelColumn<ARDOUR::HasSampleFormat::SampleFormatPtr>   ptr;
-               Gtk::TreeModelColumn<Glib::ustring>                              color;
-               Gtk::TreeModelColumn<Glib::ustring>                              label;
+               Gtk::TreeModelColumn<std::string>                              color;
+               Gtk::TreeModelColumn<std::string>                              label;
 
                SampleFormatCols () { add(ptr); add(color); add(label); }
        };
@@ -285,8 +307,8 @@ class ExportFormatDialog : public ArdourDialog {
        {
          public:
                Gtk::TreeModelColumn<ARDOUR::HasSampleFormat::DitherTypePtr>   ptr;
-               Gtk::TreeModelColumn<Glib::ustring>                            color;
-               Gtk::TreeModelColumn<Glib::ustring>                            label;
+               Gtk::TreeModelColumn<std::string>                            color;
+               Gtk::TreeModelColumn<std::string>                            label;
 
                DitherTypeCols () { add(ptr); add (color); add(label); }
        };
@@ -296,6 +318,17 @@ class ExportFormatDialog : public ArdourDialog {
        Gtk::Label  sample_format_label;
        Gtk::Label  dither_label;
 
+       Gtk::CheckButton with_cue;
+       Gtk::CheckButton with_toc;
+       Gtk::CheckButton with_mp4chaps;
+
+       Gtk::VBox cue_toc_vbox;
+
+       void update_with_toc ();
+       void update_with_cue ();
+       void update_with_mp4chaps();
+       void update_command ();
+
        Gtk::TreeView sample_format_view;
        Gtk::TreeView dither_type_view;