Fixed incomplete merge for audioengine.cc
[ardour.git] / libs / ardour / ardour / export_format_specification.h
index 768fbb3bb3add9aee136e5958d3e399f76eb6dcc..87a77298878639d7d1e00472ce32b5b5e376afa2 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "pbd/uuid.h"
 
+#include "ardour/libardour_visibility.h"
 #include "ardour/types.h"
 #include "ardour/export_format_base.h"
 
@@ -37,7 +38,7 @@ class ExportFormat;
 class ExportFormatCompatibility;
 class Session;
 
-class ExportFormatSpecification : public ExportFormatBase {
+class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
 
   private:
 
@@ -95,7 +96,8 @@ class ExportFormatSpecification : public ExportFormatBase {
        void set_tag (bool tag_it) { _tag = tag_it; }
        void set_with_cue (bool yn) { _with_cue = yn; }
        void set_with_toc (bool yn) { _with_toc = yn; }
-       void set_upload (bool yn) { _upload = yn; }
+       void set_with_mp4chaps (bool yn) { _with_mp4chaps = yn; }
+       void set_soundcloud_upload (bool yn) { _soundcloud_upload = yn; }
        void set_command (std::string command) { _command = command; }
 
        void set_silence_beginning (AnyTime const & value) { _silence_beginning = value; }
@@ -112,11 +114,42 @@ class ExportFormatSpecification : public ExportFormatBase {
        std::string format_name () const { return _format_name; }
 
        Type type () const { return _type; }
-       FormatId format_id () const { return *format_ids.begin(); }
-       Endianness endianness () const { return *endiannesses.begin(); }
-       SampleFormat sample_format () const { return *sample_formats.begin(); }
-       SampleRate sample_rate () const { return *sample_rates.begin(); }
-       Quality quality () const { return *qualities.begin(); }
+       
+       FormatId format_id () const {
+               if (!format_ids.empty() )
+                       return *format_ids.begin();
+               else
+                       return FormatId(0);
+       }
+       
+       Endianness endianness () const {
+               if (!endiannesses.empty() )
+                       return *endiannesses.begin();
+               else
+                       return Endianness(0);
+       }
+       
+       SampleFormat sample_format () const {
+               if (!sample_formats.empty() )
+                       return *sample_formats.begin();
+               else
+                       return SampleFormat(0);
+       }
+       
+       SampleRate sample_rate () const {
+               if (!sample_rates.empty() )
+                       return *sample_rates.begin();
+               else
+                       return SampleRate(0);
+               
+       }
+       
+       Quality quality () const {
+               if (!qualities.empty() )
+                       return *qualities.begin();
+               else
+                       return Quality(0);
+       }
 
        DitherType dither_type () const { return _dither_type; }
        SRCQuality src_quality () const { return _src_quality; }
@@ -126,7 +159,9 @@ class ExportFormatSpecification : public ExportFormatBase {
        float normalize_target () const { return _normalize_target; }
        bool with_toc() const { return _with_toc; }
        bool with_cue() const { return _with_cue; }
-       bool upload() const { return _upload; }
+       bool with_mp4chaps() const { return _with_mp4chaps; }
+
+       bool soundcloud_upload() const { return _soundcloud_upload; }
        std::string command() const { return _command; }
 
        bool tag () const { return _tag && supports_tagging; }
@@ -177,7 +212,8 @@ class ExportFormatSpecification : public ExportFormatBase {
        float           _normalize_target;
        bool            _with_toc;
        bool            _with_cue;
-       bool            _upload;
+       bool            _with_mp4chaps;
+       bool            _soundcloud_upload;
        std::string     _command;
 
        /* serialization helpers */