X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_graph_builder.h;h=55fa7133fcf2eec476375df22b6035f7b5324e24;hb=844b7d0f684eaf01a8d553f935027f496a09c3ad;hp=f98ffeb8eb67e7dfa9a4c69e70542e4745c7ea61;hpb=650c6d5824222a8879df5c5ba9645c264ed3b84f;p=ardour.git diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h index f98ffeb8eb..55fa7133fc 100644 --- a/libs/ardour/ardour/export_graph_builder.h +++ b/libs/ardour/ardour/export_graph_builder.h @@ -26,8 +26,9 @@ #include "ardour/export_channel.h" #include "ardour/export_format_base.h" -#include "audiographer/identity_vertex.h" +#include "audiographer/utils/identity_vertex.h" +#include #include namespace AudioGrapher { @@ -69,7 +70,9 @@ class ExportGraphBuilder private: - class Encoder : public sigc::trackable { + 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); @@ -87,6 +90,7 @@ class ExportGraphBuilder FileSpec config; std::list filenames; + PBD::ScopedConnection copy_files_connection; // Only one of these should be available at a time FloatWriterPtr float_writer; @@ -98,8 +102,8 @@ class ExportGraphBuilder class SFC { public: // This constructor so that this can be constructed like a Normalizer - SFC (ExportGraphBuilder &) : data_width(0) {} - FloatSinkPtr init (FileSpec const & new_config, nframes_t max_frames); + SFC (ExportGraphBuilder &, FileSpec const & new_config, nframes_t max_frames); + FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; @@ -109,19 +113,19 @@ class ExportGraphBuilder typedef boost::shared_ptr > ShortConverterPtr; FileSpec config; - std::list children; + boost::ptr_list children; int data_width; // Only one of these should be available at a time FloatConverterPtr float_converter; - IntConverterPtr int_converter; + IntConverterPtr int_converter; ShortConverterPtr short_converter; }; - class Normalizer : public sigc::trackable { + class Normalizer { public: - Normalizer (ExportGraphBuilder & parent) : parent (parent) {} - FloatSinkPtr init (FileSpec const & new_config, nframes_t max_frames); + Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames); + FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; @@ -147,14 +151,16 @@ class ExportGraphBuilder TmpFilePtr tmp_file; NormalizerPtr normalizer; ThreaderPtr threader; - std::list children; + boost::ptr_list children; + + PBD::ScopedConnection post_processing_connection; }; // sample rate converter class SRC { public: - SRC (ExportGraphBuilder & parent) : parent (parent) {} - FloatSinkPtr init (FileSpec const & new_config, nframes_t max_frames); + SRC (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames); + FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; @@ -162,12 +168,12 @@ class ExportGraphBuilder typedef boost::shared_ptr SRConverterPtr; template - void add_child_to_list (FileSpec const & new_config, std::list & list); + void add_child_to_list (FileSpec const & new_config, boost::ptr_list & list); ExportGraphBuilder & parent; FileSpec config; - std::list children; - std::list normalized_children; + boost::ptr_list children; + boost::ptr_list normalized_children; SRConverterPtr converter; nframes_t max_frames_out; }; @@ -175,8 +181,8 @@ class ExportGraphBuilder // Silence trimmer + adder class SilenceHandler { public: - SilenceHandler (ExportGraphBuilder & parent) : parent (parent) {} - FloatSinkPtr init (FileSpec const & new_config, nframes_t max_frames); + SilenceHandler (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames); + FloatSinkPtr sink (); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; @@ -185,7 +191,7 @@ class ExportGraphBuilder ExportGraphBuilder & parent; FileSpec config; - std::list children; + boost::ptr_list children; SilenceTrimmerPtr silence_trimmer; nframes_t max_frames_in; }; @@ -193,8 +199,7 @@ class ExportGraphBuilder // channel configuration class ChannelConfig { public: - ChannelConfig (ExportGraphBuilder & parent) : parent (parent) {} - void init (FileSpec const & new_config, ChannelMap & channel_map); + ChannelConfig (ExportGraphBuilder & parent, FileSpec const & new_config, ChannelMap & channel_map); void add_child (FileSpec const & new_config); bool operator== (FileSpec const & other_config) const; @@ -203,7 +208,7 @@ class ExportGraphBuilder ExportGraphBuilder & parent; FileSpec config; - std::list children; + boost::ptr_list children; InterleaverPtr interleaver; nframes_t max_frames; }; @@ -211,7 +216,7 @@ class ExportGraphBuilder Session const & session; // Roots for export processor trees - typedef std::list ChannelConfigList; + typedef boost::ptr_list ChannelConfigList; ChannelConfigList channel_configs; // The sources of all data, each channel is read only once