X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_graph_builder.h;h=444f1ae65963d07524c36c0c2a0001d516de7231;hb=a473d630eb165272992e90f8d854b1d66ec0be63;hp=67f1a3488e4f8fbada0aeb95562b84dc366ebd4f;hpb=a46cea06e29bfdb18e0199a665caf5a34d388968;p=ardour.git diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h index 67f1a3488e..444f1ae659 100644 --- a/libs/ardour/ardour/export_graph_builder.h +++ b/libs/ardour/ardour/export_graph_builder.h @@ -58,47 +58,47 @@ class ExportGraphBuilder typedef std::map ChannelMap; public: - + ExportGraphBuilder (Session const & session); ~ExportGraphBuilder (); - + int process (framecnt_t frames, bool last_cycle); bool process_normalize (); // returns true when finished - + void reset (); void set_current_timespan (boost::shared_ptr span); void add_config (FileSpec const & config); - + private: - + void add_split_config (FileSpec const & config); - + class Encoder { public: template boost::shared_ptr > init (FileSpec const & new_config); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + static int get_real_format (FileSpec const & config); - + private: typedef boost::shared_ptr > FloatWriterPtr; typedef boost::shared_ptr > IntWriterPtr; typedef boost::shared_ptr > ShortWriterPtr; - + template void init_writer (boost::shared_ptr > & writer); void copy_files (std::string orig_path); - + FileSpec config; std::list filenames; PBD::ScopedConnection copy_files_connection; - + // Only one of these should be available at a time FloatWriterPtr float_writer; IntWriterPtr int_writer; ShortWriterPtr short_writer; }; - + // sample format converter class SFC { public: @@ -107,56 +107,56 @@ class ExportGraphBuilder FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + private: typedef boost::shared_ptr > FloatConverterPtr; typedef boost::shared_ptr > IntConverterPtr; typedef boost::shared_ptr > ShortConverterPtr; - + FileSpec config; boost::ptr_list children; int data_width; - + // Only one of these should be available at a time FloatConverterPtr float_converter; IntConverterPtr int_converter; ShortConverterPtr short_converter; }; - + class Normalizer { public: Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames); FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + /// Returns true when finished bool process (); - + private: typedef boost::shared_ptr PeakReaderPtr; typedef boost::shared_ptr NormalizerPtr; typedef boost::shared_ptr > TmpFilePtr; typedef boost::shared_ptr > ThreaderPtr; typedef boost::shared_ptr > BufferPtr; - + void start_post_processing(); - + ExportGraphBuilder & parent; - + FileSpec config; framecnt_t max_frames_out; - + BufferPtr buffer; PeakReaderPtr peak_reader; TmpFilePtr tmp_file; NormalizerPtr normalizer; ThreaderPtr threader; boost::ptr_list children; - + PBD::ScopedConnection post_processing_connection; }; - + // sample rate converter class SRC { public: @@ -164,13 +164,13 @@ class ExportGraphBuilder FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + private: typedef boost::shared_ptr SRConverterPtr; - + template void add_child_to_list (FileSpec const & new_config, boost::ptr_list & list); - + ExportGraphBuilder & parent; FileSpec config; boost::ptr_list children; @@ -178,7 +178,7 @@ class ExportGraphBuilder SRConverterPtr converter; framecnt_t max_frames_out; }; - + // Silence trimmer + adder class SilenceHandler { public: @@ -186,27 +186,27 @@ class ExportGraphBuilder FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + private: typedef boost::shared_ptr > SilenceTrimmerPtr; - + ExportGraphBuilder & parent; FileSpec config; boost::ptr_list children; SilenceTrimmerPtr silence_trimmer; framecnt_t max_frames_in; }; - + // channel configuration class ChannelConfig { public: ChannelConfig (ExportGraphBuilder & parent, FileSpec const & new_config, ChannelMap & channel_map); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; - + private: typedef boost::shared_ptr > InterleaverPtr; - + ExportGraphBuilder & parent; FileSpec config; boost::ptr_list children; @@ -216,18 +216,18 @@ class ExportGraphBuilder Session const & session; boost::shared_ptr timespan; - + // Roots for export processor trees typedef boost::ptr_list ChannelConfigList; ChannelConfigList channel_configs; - + // The sources of all data, each channel is read only once ChannelMap channels; - + framecnt_t process_buffer_frames; - + std::list normalizers; - + Glib::ThreadPool thread_pool; };