Made Export format compatibility checking a bit more robust
[ardour.git] / libs / ardour / ardour / export_formats.h
index 34227526fc7bb35331ed514e2903768c47bea05a..fc6dc0a5f72aacf8f7db18db6e8f47f18980f6fe 100644 (file)
 
 #include <list>
 #include <boost/weak_ptr.hpp>
+#include <pbd/failed_constructor.h>
 
 namespace ARDOUR
 {
 
-class HasSampleFormat;
+class ExportFormatIncompatible : public failed_constructor {
+  public:
+       virtual const char *what() const throw() { return "Export format constructor failed: Format incompatible with system"; }
+};
 
 /// Base class for formats
 class ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible {
@@ -170,8 +174,6 @@ class ExportFormatOggVorbis : public ExportFormat {
        ExportFormatOggVorbis ();
        ~ExportFormatOggVorbis () {};
        
-       static bool check_system_compatibility ();
-       
        bool set_compatibility_state (ExportFormatCompatibility const & compatibility);
        Type get_type () const { return T_Sndfile; }
        SampleFormat get_explicit_sample_format () const { return SF_Vorbis; }
@@ -183,8 +185,6 @@ class ExportFormatFLAC : public ExportFormat, public HasSampleFormat {
        ExportFormatFLAC ();
        ~ExportFormatFLAC () {};
        
-       static bool check_system_compatibility ();
-       
        bool set_compatibility_state (ExportFormatCompatibility const & compatibility);
        Type get_type () const { return T_Sndfile; }