ardour
Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
ARDOUR::ExportProfileManager Class Reference

Manages (de)serialization of export profiles and related classes. More...

#include <export_profile_manager.h>

Classes

struct  ChannelConfigState
 
struct  FilenameState
 
struct  FormatState
 
struct  TimespanState
 
struct  Warnings
 

Public Types

enum  ExportType {
  RegularExport, RangeExport, SelectionExport, RegionExport,
  StemExport
}
 
enum  TimeFormat { Timecode, BBT, MinSec, Frames }
 
typedef std::list
< ExportPresetPtr
PresetList
 
typedef std::list
< ExportTimespanPtr
TimespanList
 
typedef boost::shared_ptr
< TimespanList
TimespanListPtr
 
typedef std::list< Location * > LocationList
 
typedef boost::shared_ptr
< TimespanState
TimespanStatePtr
 
typedef std::list
< TimespanStatePtr
TimespanStateList
 
typedef boost::shared_ptr
< ChannelConfigState
ChannelConfigStatePtr
 
typedef std::list
< ChannelConfigStatePtr
ChannelConfigStateList
 
typedef std::list
< ExportFormatSpecPtr
FormatList
 
typedef boost::shared_ptr
< FormatState
FormatStatePtr
 
typedef std::list< FormatStatePtrFormatStateList
 
typedef boost::shared_ptr
< FilenameState
FilenameStatePtr
 
typedef std::list
< FilenameStatePtr
FilenameStateList
 

Public Member Functions

 ExportProfileManager (Session &s, ExportType type)
 
 ~ExportProfileManager ()
 
void load_profile ()
 
void prepare_for_export ()
 
PresetList const & get_presets ()
 
bool load_preset (ExportPresetPtr preset)
 
ExportPresetPtr new_preset (std::string const &name)
 
ExportPresetPtr save_preset (std::string const &name)
 
void remove_preset ()
 
void set_selection_range (framepos_t start=0, framepos_t end=0)
 
std::string set_single_range (framepos_t start, framepos_t end, std::string name)
 
TimespanStateList const & get_timespans ()
 
ChannelConfigStateList const & get_channel_configs ()
 
void clear_channel_configs ()
 
ChannelConfigStatePtr add_channel_config ()
 
FormatStateList const & get_formats ()
 
FormatStatePtr duplicate_format_state (FormatStatePtr state)
 
void remove_format_state (FormatStatePtr state)
 
std::string save_format_to_disk (ExportFormatSpecPtr format)
 
void remove_format_profile (ExportFormatSpecPtr format)
 
ExportFormatSpecPtr get_new_format (ExportFormatSpecPtr original)
 
FilenameStateList const & get_filenames ()
 
FilenameStatePtr duplicate_filename_state (FilenameStatePtr state)
 
void remove_filename_state (FilenameStatePtr state)
 
std::string get_sample_filename_for_format (ExportFilenamePtr filename, ExportFormatSpecPtr format)
 
boost::shared_ptr< Warningsget_warnings ()
 

Public Attributes

PBD::Signal0< void > FormatListChanged
 

Private Types

typedef boost::shared_ptr
< ExportHandler
HandlerPtr
 
typedef std::pair< PBD::UUID,
std::string > 
FilePair
 
typedef std::map< PBD::UUID,
std::string > 
FileMap
 

Private Member Functions

std::string preset_filename (std::string const &preset_name)
 
void load_presets ()
 
void load_preset_from_disk (std::string const &path)
 
bool set_state (XMLNode const &root)
 
bool set_global_state (XMLNode const &root)
 
bool set_local_state (XMLNode const &root)
 
void serialize_profile (XMLNode &root)
 
void serialize_global_profile (XMLNode &root)
 
void serialize_local_profile (XMLNode &root)
 
std::vector< std::string > find_file (std::string const &pattern)
 
bool init_timespans (XMLNodeList nodes)
 
TimespanStatePtr deserialize_timespan (XMLNode &root)
 
XMLNodeserialize_timespan (TimespanStatePtr state)
 
void update_ranges ()
 
bool init_channel_configs (XMLNodeList nodes)
 
bool init_formats (XMLNodeList nodes)
 
FormatStatePtr deserialize_format (XMLNode &root)
 
XMLNodeserialize_format (FormatStatePtr state)
 
void load_formats ()
 
ExportFormatSpecPtr load_format (XMLNode &node)
 
void load_format_from_disk (std::string const &path)
 
bool init_filenames (XMLNodeList nodes)
 
ExportFilenamePtr load_filename (XMLNode &node)
 
void check_config (boost::shared_ptr< Warnings > warnings, TimespanStatePtr timespan_state, ChannelConfigStatePtr channel_config_state, FormatStatePtr format_state, FilenameStatePtr filename_state)
 
bool check_format (ExportFormatSpecPtr format, uint32_t channels)
 
bool check_sndfile_format (ExportFormatSpecPtr format, unsigned int channels)
 
void build_filenames (std::list< std::string > &result, ExportFilenamePtr filename, TimespanListPtr timespans, ExportChannelConfigPtr channel_config, ExportFormatSpecPtr format)
 
template<typename T >
std::list< T > const & check_list (std::list< T > const &list)
 

Private Attributes

ExportType type
 
std::string xml_node_name
 
HandlerPtr handler
 
Sessionsession
 
PresetList preset_list
 
ExportPresetPtr current_preset
 
FileMap preset_file_map
 
std::string export_config_dir
 
PBD::Searchpath search_path
 
TimespanStateList timespans
 
boost::shared_ptr< Locationselection_range
 
boost::shared_ptr< LocationListranges
 
bool single_range_mode
 
boost::shared_ptr< Locationsingle_range
 
ChannelConfigStateList channel_configs
 
FormatStateList formats
 
boost::shared_ptr< FormatListformat_list
 
FileMap format_file_map
 
FilenameStateList filenames
 

Detailed Description

Manages (de)serialization of export profiles and related classes.

Definition at line 50 of file export_profile_manager.h.

Member Typedef Documentation

Definition at line 173 of file export_profile_manager.h.

Definition at line 172 of file export_profile_manager.h.

typedef std::map<PBD::UUID, std::string> ARDOUR::ExportProfileManager::FileMap
private

Definition at line 80 of file export_profile_manager.h.

Definition at line 235 of file export_profile_manager.h.

Definition at line 234 of file export_profile_manager.h.

typedef std::pair<PBD::UUID, std::string> ARDOUR::ExportProfileManager::FilePair
private

Definition at line 79 of file export_profile_manager.h.

Definition at line 188 of file export_profile_manager.h.

Definition at line 198 of file export_profile_manager.h.

Definition at line 197 of file export_profile_manager.h.

Definition at line 77 of file export_profile_manager.h.

Definition at line 113 of file export_profile_manager.h.

Definition at line 68 of file export_profile_manager.h.

Definition at line 111 of file export_profile_manager.h.

Definition at line 112 of file export_profile_manager.h.

Definition at line 139 of file export_profile_manager.h.

Definition at line 138 of file export_profile_manager.h.

Member Enumeration Documentation

Enumerator
RegularExport 
RangeExport 
SelectionExport 
RegionExport 
StemExport 

Definition at line 54 of file export_profile_manager.h.

Enumerator
Timecode 
BBT 
MinSec 
Frames 

Definition at line 115 of file export_profile_manager.h.

Constructor & Destructor Documentation

ARDOUR::ExportProfileManager::ExportProfileManager ( Session s,
ExportType  type 
)

Definition at line 59 of file export_profile_manager.cc.

ARDOUR::ExportProfileManager::~ExportProfileManager ( )

Definition at line 115 of file export_profile_manager.cc.

Member Function Documentation

ExportProfileManager::ChannelConfigStatePtr ARDOUR::ExportProfileManager::add_channel_config ( )

Definition at line 502 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::build_filenames ( std::list< std::string > &  result,
ExportFilenamePtr  filename,
TimespanListPtr  timespans,
ExportChannelConfigPtr  channel_config,
ExportFormatSpecPtr  format 
)
private

Definition at line 946 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::check_config ( boost::shared_ptr< Warnings warnings,
TimespanStatePtr  timespan_state,
ChannelConfigStatePtr  channel_config_state,
FormatStatePtr  format_state,
FilenameStatePtr  filename_state 
)
private

Definition at line 863 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::check_format ( ExportFormatSpecPtr  format,
uint32_t  channels 
)
private

Definition at line 923 of file export_profile_manager.cc.

template<typename T >
std::list<T> const& ARDOUR::ExportProfileManager::check_list ( std::list< T > const &  list)
inlineprivate

Definition at line 279 of file export_profile_manager.h.

bool ARDOUR::ExportProfileManager::check_sndfile_format ( ExportFormatSpecPtr  format,
unsigned int  channels 
)
private

Definition at line 935 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::clear_channel_configs ( )
inline

Definition at line 176 of file export_profile_manager.h.

ExportProfileManager::FormatStatePtr ARDOUR::ExportProfileManager::deserialize_format ( XMLNode root)
private

Definition at line 690 of file export_profile_manager.cc.

ExportProfileManager::TimespanStatePtr ARDOUR::ExportProfileManager::deserialize_timespan ( XMLNode root)
private

Definition at line 410 of file export_profile_manager.cc.

ExportProfileManager::FilenameStatePtr ARDOUR::ExportProfileManager::duplicate_filename_state ( FilenameStatePtr  state)

Definition at line 758 of file export_profile_manager.cc.

ExportProfileManager::FormatStatePtr ARDOUR::ExportProfileManager::duplicate_format_state ( FormatStatePtr  state)

Definition at line 544 of file export_profile_manager.cc.

std::vector< std::string > ARDOUR::ExportProfileManager::find_file ( std::string const &  pattern)
private

Definition at line 336 of file export_profile_manager.cc.

ChannelConfigStateList const& ARDOUR::ExportProfileManager::get_channel_configs ( )
inline

Definition at line 175 of file export_profile_manager.h.

FilenameStateList const& ARDOUR::ExportProfileManager::get_filenames ( )
inline

Definition at line 237 of file export_profile_manager.h.

FormatStateList const& ARDOUR::ExportProfileManager::get_formats ( )
inline

Definition at line 200 of file export_profile_manager.h.

ExportFormatSpecPtr ARDOUR::ExportProfileManager::get_new_format ( ExportFormatSpecPtr  original)

Definition at line 646 of file export_profile_manager.cc.

PresetList const& ARDOUR::ExportProfileManager::get_presets ( )
inline

Definition at line 70 of file export_profile_manager.h.

std::string ARDOUR::ExportProfileManager::get_sample_filename_for_format ( ExportFilenamePtr  filename,
ExportFormatSpecPtr  format 
)

Definition at line 777 of file export_profile_manager.cc.

TimespanStateList const& ARDOUR::ExportProfileManager::get_timespans ( )
inline

Definition at line 143 of file export_profile_manager.h.

boost::shared_ptr< ExportProfileManager::Warnings > ARDOUR::ExportProfileManager::get_warnings ( )

Definition at line 812 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::init_channel_configs ( XMLNodeList  nodes)
private

Definition at line 510 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::init_filenames ( XMLNodeList  nodes)
private

Definition at line 792 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::init_formats ( XMLNodeList  nodes)
private

Definition at line 668 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::init_timespans ( XMLNodeList  nodes)
private

Definition at line 377 of file export_profile_manager.cc.

ExportFilenamePtr ARDOUR::ExportProfileManager::load_filename ( XMLNode node)
private
ExportFormatSpecPtr ARDOUR::ExportProfileManager::load_format ( XMLNode node)
private
void ARDOUR::ExportProfileManager::load_format_from_disk ( std::string const &  path)
private

Definition at line 730 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::load_formats ( )
private

Definition at line 720 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::load_preset ( ExportPresetPtr  preset)

Definition at line 174 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::load_preset_from_disk ( std::string const &  path)
private

Definition at line 272 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::load_presets ( )
private

Definition at line 196 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::load_profile ( )

Definition at line 123 of file export_profile_manager.cc.

ExportPresetPtr ARDOUR::ExportProfileManager::new_preset ( std::string const &  name)

Definition at line 213 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::prepare_for_export ( )

Definition at line 140 of file export_profile_manager.cc.

std::string ARDOUR::ExportProfileManager::preset_filename ( std::string const &  preset_name)
private

Definition at line 206 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::remove_filename_state ( FilenameStatePtr  state)

Definition at line 766 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::remove_format_profile ( ExportFormatSpecPtr  format)

Definition at line 624 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::remove_format_state ( FormatStatePtr  state)

Definition at line 555 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::remove_preset ( )

Definition at line 248 of file export_profile_manager.cc.

std::string ARDOUR::ExportProfileManager::save_format_to_disk ( ExportFormatSpecPtr  format)

Definition at line 566 of file export_profile_manager.cc.

ExportPresetPtr ARDOUR::ExportProfileManager::save_preset ( std::string const &  name)

Definition at line 223 of file export_profile_manager.cc.

XMLNode & ARDOUR::ExportProfileManager::serialize_format ( FormatStatePtr  state)
private

Definition at line 709 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::serialize_global_profile ( XMLNode root)
private

Definition at line 312 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::serialize_local_profile ( XMLNode root)
private

Definition at line 324 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::serialize_profile ( XMLNode root)
private

Definition at line 305 of file export_profile_manager.cc.

XMLNode & ARDOUR::ExportProfileManager::serialize_timespan ( TimespanStatePtr  state)
private

Definition at line 452 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::set_global_state ( XMLNode const &  root)
private

Definition at line 291 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::set_local_state ( XMLNode const &  root)
private

Definition at line 298 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::set_selection_range ( framepos_t  start = 0,
framepos_t  end = 0 
)

Definition at line 346 of file export_profile_manager.cc.

std::string ARDOUR::ExportProfileManager::set_single_range ( framepos_t  start,
framepos_t  end,
std::string  name 
)

Definition at line 363 of file export_profile_manager.cc.

bool ARDOUR::ExportProfileManager::set_state ( XMLNode const &  root)
private

Definition at line 285 of file export_profile_manager.cc.

void ARDOUR::ExportProfileManager::update_ranges ( )
private

Definition at line 470 of file export_profile_manager.cc.

Member Data Documentation

ChannelConfigStateList ARDOUR::ExportProfileManager::channel_configs
private

Definition at line 181 of file export_profile_manager.h.

ExportPresetPtr ARDOUR::ExportProfileManager::current_preset
private

Definition at line 100 of file export_profile_manager.h.

std::string ARDOUR::ExportProfileManager::export_config_dir
private

Definition at line 105 of file export_profile_manager.h.

FilenameStateList ARDOUR::ExportProfileManager::filenames
private

Definition at line 245 of file export_profile_manager.h.

FileMap ARDOUR::ExportProfileManager::format_file_map
private

Definition at line 224 of file export_profile_manager.h.

boost::shared_ptr<FormatList> ARDOUR::ExportProfileManager::format_list
private

Definition at line 223 of file export_profile_manager.h.

PBD::Signal0<void> ARDOUR::ExportProfileManager::FormatListChanged

Definition at line 208 of file export_profile_manager.h.

FormatStateList ARDOUR::ExportProfileManager::formats
private

Definition at line 212 of file export_profile_manager.h.

HandlerPtr ARDOUR::ExportProfileManager::handler
private

Definition at line 84 of file export_profile_manager.h.

FileMap ARDOUR::ExportProfileManager::preset_file_map
private

Definition at line 101 of file export_profile_manager.h.

PresetList ARDOUR::ExportProfileManager::preset_list
private

Definition at line 99 of file export_profile_manager.h.

boost::shared_ptr<LocationList> ARDOUR::ExportProfileManager::ranges
private

Definition at line 159 of file export_profile_manager.h.

PBD::Searchpath ARDOUR::ExportProfileManager::search_path
private

Definition at line 106 of file export_profile_manager.h.

boost::shared_ptr<Location> ARDOUR::ExportProfileManager::selection_range
private

Definition at line 158 of file export_profile_manager.h.

Session& ARDOUR::ExportProfileManager::session
private

Definition at line 85 of file export_profile_manager.h.

boost::shared_ptr<Location> ARDOUR::ExportProfileManager::single_range
private

Definition at line 162 of file export_profile_manager.h.

bool ARDOUR::ExportProfileManager::single_range_mode
private

Definition at line 161 of file export_profile_manager.h.

TimespanStateList ARDOUR::ExportProfileManager::timespans
private

Definition at line 147 of file export_profile_manager.h.

ExportType ARDOUR::ExportProfileManager::type
private

Definition at line 82 of file export_profile_manager.h.

std::string ARDOUR::ExportProfileManager::xml_node_name
private

Definition at line 83 of file export_profile_manager.h.


The documentation for this class was generated from the following files: