Remove frame conversion for MidiRegionView::note_in_region_range(), speed up tempo...
[ardour.git] / libs / ardour / ardour / export_format_manager.h
index f82230b8c393b16e7080e6ab84ba7393dabc3b7e..5a78708efbb58bf252a79e6f9ba5f3fc11591f67 100644 (file)
 #include <string>
 
 #include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
 
 #include "pbd/signals.h"
 
 #include "ardour/export_formats.h"
+#include "ardour/export_pointers.h"
 
 namespace ARDOUR
 {
@@ -39,17 +39,12 @@ class ExportFormatCompatibility;
 class ExportFormatSpecification;
 class AnyTime;
 
-class ExportFormatManager : public PBD::ScopedConnectionList
+class LIBARDOUR_API ExportFormatManager : public PBD::ScopedConnectionList
 {
   public:
 
-       typedef boost::shared_ptr<ExportFormatCompatibility> CompatPtr;
-       typedef boost::weak_ptr<ExportFormatCompatibility> WeakCompatPtr;
-       typedef std::list<CompatPtr> CompatList;
-
-       typedef boost::shared_ptr<ExportFormat> FormatPtr;
-       typedef boost::weak_ptr<ExportFormat> WeakFormatPtr;
-       typedef std::list<FormatPtr> FormatList;
+       typedef std::list<ExportFormatCompatibilityPtr> CompatList;
+       typedef std::list<ExportFormatPtr> FormatList;
 
        typedef HasSampleFormat::SampleFormatPtr SampleFormatPtr;
        typedef HasSampleFormat::SampleFormatList SampleFormatList;
@@ -58,9 +53,6 @@ class ExportFormatManager : public PBD::ScopedConnectionList
        typedef HasSampleFormat::DitherTypePtr DitherTypePtr;
        typedef HasSampleFormat::WeakDitherTypePtr WeakDitherTypePtr;
 
-       typedef boost::shared_ptr<ExportFormatSpecification> SpecPtr;
-       typedef boost::shared_ptr<ExportFormatBase> FormatBasePtr;
-
        /* Quality states */
 
        class QualityState : public ExportFormatBase::SelectableCompatible {
@@ -87,12 +79,13 @@ class ExportFormatManager : public PBD::ScopedConnectionList
 
   public:
 
-       explicit ExportFormatManager (SpecPtr specification);
+       explicit ExportFormatManager (ExportFormatSpecPtr specification);
        ~ExportFormatManager ();
 
        /* Signals */
 
        PBD::Signal1<void,bool> CompleteChanged;
+       PBD::Signal0<void> DescriptionChanged;
 
        /* Access to lists */
 
@@ -105,13 +98,21 @@ class ExportFormatManager : public PBD::ScopedConnectionList
 
        void set_name (std::string name);
 
+       void select_with_cue (bool);
+       void select_with_toc (bool);
+       void select_with_mp4chaps (bool);
+       void select_upload (bool);
+       void set_command (std::string);
        void select_src_quality (ExportFormatBase::SRCQuality value);
        void select_trim_beginning (bool value);
        void select_silence_beginning (AnyTime const & time);
        void select_trim_end (bool value);
        void select_silence_end (AnyTime const & time);
        void select_normalize (bool value);
-       void select_normalize_target (float value);
+       void select_normalize_loudness (bool value);
+       void select_normalize_dbfs (float value);
+       void select_normalize_lufs (float value);
+       void select_normalize_dbtp (float value);
        void select_tagging (bool tag);
 
   private:
@@ -121,16 +122,16 @@ class ExportFormatManager : public PBD::ScopedConnectionList
        void init_formats ();
        void init_sample_rates ();
 
-       void add_compatibility (CompatPtr ptr);
+       void add_compatibility (ExportFormatCompatibilityPtr ptr);
        void add_quality (QualityPtr ptr);
-       void add_format (FormatPtr ptr);
+       void add_format (ExportFormatPtr ptr);
        void add_sample_rate (SampleRatePtr ptr);
 
        /* Connected to signals */
 
-       void change_compatibility_selection (bool select, WeakCompatPtr const & compat);
+       void change_compatibility_selection (bool select, WeakExportFormatCompatibilityPtr const & compat);
        void change_quality_selection (bool select, WeakQualityPtr const & quality);
-       void change_format_selection (bool select, WeakFormatPtr const & format);
+       void change_format_selection (bool select, WeakExportFormatPtr const & format);
        void change_sample_rate_selection (bool select, WeakSampleRatePtr const & rate);
 
        void change_sample_format_selection (bool select, WeakSampleFormatPtr const & format);
@@ -138,9 +139,9 @@ class ExportFormatManager : public PBD::ScopedConnectionList
 
        /* Do actual selection */
 
-       void select_compatibility (WeakCompatPtr const & compat);
+       void select_compatibility (WeakExportFormatCompatibilityPtr const & compat);
        void select_quality (QualityPtr const & quality);
-       void select_format (FormatPtr const & format);
+       void select_format (ExportFormatPtr const & format);
        void select_sample_rate (SampleRatePtr const & rate);
 
        void select_sample_format (SampleFormatPtr const & format);
@@ -148,25 +149,28 @@ class ExportFormatManager : public PBD::ScopedConnectionList
 
        bool pending_selection_change;
        void selection_changed ();
+       void check_for_description_change ();
 
        /* Formats and compatibilities */
 
        QualityPtr    get_selected_quality ();
-       FormatPtr     get_selected_format ();
+       ExportFormatPtr     get_selected_format ();
        SampleRatePtr get_selected_sample_rate ();
 
        SampleFormatPtr get_selected_sample_format ();
 
-       FormatBasePtr get_compatibility_intersection ();
+       ExportFormatBasePtr get_compatibility_intersection ();
 
-       FormatBasePtr   universal_set;
-       SpecPtr         current_selection;
+       ExportFormatBasePtr   universal_set;
+       ExportFormatSpecPtr   current_selection;
 
        CompatList      compatibilities;
        QualityList     qualities;
        FormatList      formats;
        SampleRateList  sample_rates;
 
+       std::string     prev_description;
+
 };
 
 } // namespace ARDOUR