summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_channel_configuration.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 14:46:23 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 14:46:23 +0000
commitdde0848a984e06cbc1d4117d9cffa75c191f3b39 (patch)
tree11f3a5fe94ac792e753297e16e4e80dd7e296aea /libs/ardour/ardour/export_channel_configuration.h
parent35c72a53b4c6bbc61b4b86db9de629e18362b48d (diff)
Re-integrate export-optimization branch.
Export now happens directly to file (unless normalizing is required), and can be easily optimized even further. The Session process connection is still broken during export (as it was before this commit also). git-svn-id: svn://localhost/ardour2/branches/3.0@6401 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/export_channel_configuration.h')
-rw-r--r--libs/ardour/ardour/export_channel_configuration.h52
1 files changed, 3 insertions, 49 deletions
diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h
index 9ca49f452d..4b027cc020 100644
--- a/libs/ardour/ardour/export_channel_configuration.h
+++ b/libs/ardour/ardour/export_channel_configuration.h
@@ -45,34 +45,15 @@ class Session;
class ExportChannelConfiguration
{
- private:
- typedef boost::shared_ptr<ExportProcessor> ProcessorPtr;
- typedef boost::shared_ptr<ExportTimespan> TimespanPtr;
- typedef boost::shared_ptr<ExportFormatSpecification const> FormatPtr;
- typedef boost::shared_ptr<ExportFilename> FilenamePtr;
-
- typedef std::pair<FormatPtr, FilenamePtr> FileConfig;
- typedef std::list<FileConfig> FileConfigList;
-
- /// Struct for threading, acts like a pointer to a ExportChannelConfiguration
- struct WriterThread {
- WriterThread (ExportChannelConfiguration & channel_config) :
- channel_config (channel_config), running (false) {}
-
- ExportChannelConfiguration * operator-> () { return &channel_config; }
- ExportChannelConfiguration & operator* () { return channel_config; }
-
- ExportChannelConfiguration & channel_config;
-
- pthread_t thread;
- bool running;
- };
private:
friend class ExportElementFactory;
ExportChannelConfiguration (Session & session);
public:
+ bool operator== (ExportChannelConfiguration const & other) const { return channels == other.channels; }
+ bool operator!= (ExportChannelConfiguration const & other) const { return channels != other.channels; }
+
XMLNode & get_state ();
int set_state (const XMLNode &);
@@ -89,40 +70,13 @@ class ExportChannelConfiguration
uint32_t get_n_chans () const { return channels.size(); }
void register_channel (ExportChannelPtr channel) { channels.push_back (channel); }
- void register_file_config (FormatPtr format, FilenamePtr filename) { file_configs.push_back (FileConfig (format, filename)); }
-
void clear_channels () { channels.clear (); }
- /// Writes all files for this channel config @return true if a new thread was spawned
- bool write_files (boost::shared_ptr<ExportProcessor> new_processor);
- PBD::Signal0<void> FilesWritten;
-
- // Tells the handler the necessary information for it to handle tempfiles
- void register_with_timespan (TimespanPtr timespan);
-
- void unregister_all ();
-
private:
- typedef boost::shared_ptr<ExportStatus> ExportStatusPtr;
-
Session & session;
- // processor has to be prepared before doing this.
- void write_file ();
-
- /// The actual write files, needed for threading
- static void * _write_files (void *arg);
- WriterThread writer_thread;
- ProcessorPtr processor;
- ExportStatusPtr status;
-
- bool files_written;
-
- TimespanPtr timespan;
ChannelList channels;
- FileConfigList file_configs;
-
bool split; // Split to mono files
Glib::ustring _name;
};