Make port inserts work.
[ardour.git] / libs / ardour / ardour / export_timespan.h
index 7995da36d2c30320c05a811806fac5c581f53332..255d1e377d5225b7b0d2c004fdd0d3f383c672c8 100644 (file)
 
 #include <glibmm/ustring.h>
 
-#include <ardour/export_status.h>
-#include <ardour/ardour.h>
-
-using Glib::ustring;
+#include "ardour/export_status.h"
+#include "ardour/export_channel.h"
+#include "ardour/ardour.h"
 
 namespace ARDOUR
 {
@@ -41,36 +40,37 @@ class ExportTimespan : public sigc::trackable
 {
   private:
        typedef boost::shared_ptr<ExportTempFile> TempFilePtr;
-       typedef std::pair<ExportChannel const, TempFilePtr> ChannelFilePair;
-       typedef std::map<ExportChannel const, TempFilePtr> TempFileMap;
+       typedef std::pair<ExportChannelPtr, TempFilePtr> ChannelFilePair;
+       typedef std::map<ExportChannelPtr, TempFilePtr> TempFileMap;
+       typedef boost::shared_ptr<ExportStatus> ExportStatusPtr;
 
   private:
        friend class ExportElementFactory;
-       ExportTimespan (ExportStatus & status, nframes_t frame_rate);
-       
+       ExportTimespan (ExportStatusPtr status, nframes_t frame_rate);
+
   public:
        ~ExportTimespan ();
-       
-       ustring name () const { return _name; }
-       void set_name (ustring name) { _name = name; }
-       
-       ustring range_id () const { return _range_id; }
-       void set_range_id (ustring range_id) { _range_id = range_id; }
-       
+
+       Glib::ustring name () const { return _name; }
+       void set_name (Glib::ustring name) { _name = name; }
+
+       Glib::ustring range_id () const { return _range_id; }
+       void set_range_id (Glib::ustring range_id) { _range_id = range_id; }
+
        /// Registers a channel to be read when export starts rolling
-       void register_channel (ExportChannel const & channel);
-       
+       void register_channel (ExportChannelPtr channel);
+
        /// "Rewinds" the tempfiles to start reading the beginnings again
        void rewind ();
-       
+
        /// Reads data from the tempfile belonging to channel into data
-       nframes_t get_data (float * data, nframes_t frames, ExportChannel const & channel);
-       
+       nframes_t get_data (float * data, nframes_t frames, ExportChannelPtr channel);
+
        /// Reads data from each channel and writes to tempfile
        int process (nframes_t frames);
-       
+
        sigc::connection  process_connection;
-       
+
        void set_range (nframes_t start, nframes_t end);
        nframes_t get_length () const { return end_frame - start_frame; }
        nframes_t get_start () const { return start_frame; }
@@ -78,7 +78,7 @@ class ExportTimespan : public sigc::trackable
 
   private:
 
-       ExportStatus & status;
+       ExportStatusPtr status;
 
        nframes_t      start_frame;
        nframes_t      end_frame;
@@ -86,9 +86,9 @@ class ExportTimespan : public sigc::trackable
        nframes_t      frame_rate;
 
        TempFileMap    filemap;
-       
-       ustring       _name;
-       ustring       _range_id;
+
+       Glib::ustring _name;
+       Glib::ustring _range_id;
 
 };