Merged with trunk R1393.
[ardour.git] / libs / ardour / ardour / audiofilesource.h
index 6184a4530220fae7e23a94ace1b3cbd6b18f03ab..0e1caf5245a9b42a832087e66fd06f42d36407d6 100644 (file)
@@ -31,6 +31,7 @@ struct SoundFileInfo {
     uint16_t    channels;
     int64_t     length;
     std::string format_name;
+    int64_t     timecode;
 };
 
 class AudioFileSource : public AudioSource {
@@ -58,6 +59,8 @@ class AudioFileSource : public AudioSource {
 
        static bool get_soundfile_info (string path, SoundFileInfo& _info, string& error);
 
+       static bool safe_file_extension (string path);
+
        void set_allow_remove_if_empty (bool yn);
        void mark_for_remove();
 
@@ -81,8 +84,8 @@ class AudioFileSource : public AudioSource {
        void   mark_take (string);
        string take_id() const { return _take_id; }
 
-       static void set_bwf_country_code (string x);
-       static void set_bwf_organization_code (string x);
+       bool is_embedded() const { return _is_embedded; }
+
        static void set_bwf_serial_number (int);
        
        static void set_search_path (string);
@@ -95,6 +98,13 @@ class AudioFileSource : public AudioSource {
        XMLNode& get_state ();
        int set_state (const XMLNode&);
 
+       bool destructive() const { return (_flags & Destructive); }
+       virtual bool set_destructive (bool yn) { return false; }
+
+       Flag flags() const { return _flags; }
+
+       void mark_immutable ();
+
        /* this should really be protected, but C++ is getting stricter
           and creating slots from protected member functions is starting
           to cause issues.
@@ -119,12 +129,15 @@ class AudioFileSource : public AudioSource {
 
        int init (string idstr, bool must_exist);
 
-       uint16_t       channel;
        string        _path;
        Flag          _flags;
        string        _take_id;
-       uint64_t       timeline_position;
+       int64_t       timeline_position;
        bool           file_is_new;
+       uint16_t       channel;
+
+       bool          _is_embedded;
+       static bool determine_embeddedness(string path);
 
        static string peak_dir;
        static string search_path;
@@ -135,7 +148,7 @@ class AudioFileSource : public AudioSource {
 
        static uint64_t header_position_offset;
 
-       virtual void set_timeline_position (nframes_t pos);
+       virtual void set_timeline_position (int64_t pos);
        virtual void set_header_timeline_position () = 0;
 
        bool find (std::string path, bool must_exist, bool& is_new);