Ardour  9.0-pre0-582-g084a23a80d
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 , Samples }
 
typedef std::list< ExportPresetPtrPresetList
 
typedef std::list< ExportTimespanPtrTimespanList
 
typedef std::shared_ptr< TimespanListTimespanListPtr
 
typedef std::list< Location * > LocationList
 
typedef std::shared_ptr< TimespanStateTimespanStatePtr
 
typedef std::list< TimespanStatePtrTimespanStateList
 
typedef std::shared_ptr< ChannelConfigStateChannelConfigStatePtr
 
typedef std::list< ChannelConfigStatePtrChannelConfigStateList
 
typedef std::list< ExportFormatSpecPtrFormatList
 
typedef std::shared_ptr< FormatStateFormatStatePtr
 
typedef std::list< FormatStatePtrFormatStateList
 
typedef std::shared_ptr< FilenameStateFilenameStatePtr
 
typedef std::list< FilenameStatePtrFilenameStateList
 

Public Member Functions

 ExportProfileManager (Session &s, ExportType type)
 
 ~ExportProfileManager ()
 
void load_profile ()
 
void prepare_for_export ()
 
ExportType type () const
 
PresetList const & get_presets ()
 
ExportPresetPtr preset () const
 
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 (samplepos_t start=0, samplepos_t end=0)
 
std::string set_single_range (samplepos_t start, samplepos_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)
 
void revert_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)
 
std::shared_ptr< Warningsget_warnings ()
 

Public Attributes

PBD::Signal< void()> FormatListChanged
 

Private Types

typedef std::shared_ptr< ExportHandlerHandlerPtr
 
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 (std::shared_ptr< Warnings > warnings, TimespanStatePtr timespan_state, ExportChannelConfigPtr channel_config, 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
 
std::shared_ptr< Locationselection_range
 
std::shared_ptr< LocationListranges
 
std::shared_ptr< Locationsingle_range
 
bool single_range_mode
 
ChannelConfigStateList channel_configs
 
FormatStateList formats
 
std::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

◆ ChannelConfigStateList

◆ ChannelConfigStatePtr

◆ FileMap

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

Definition at line 83 of file export_profile_manager.h.

◆ FilenameStateList

◆ FilenameStatePtr

Definition at line 248 of file export_profile_manager.h.

◆ FilePair

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

Definition at line 82 of file export_profile_manager.h.

◆ FormatList

◆ FormatStateList

◆ FormatStatePtr

Definition at line 206 of file export_profile_manager.h.

◆ HandlerPtr

typedef std::shared_ptr<ExportHandler> ARDOUR::ExportProfileManager::HandlerPtr
private

Definition at line 80 of file export_profile_manager.h.

◆ LocationList

Definition at line 115 of file export_profile_manager.h.

◆ PresetList

◆ TimespanList

◆ TimespanListPtr

Definition at line 114 of file export_profile_manager.h.

◆ TimespanStateList

◆ TimespanStatePtr

Definition at line 141 of file export_profile_manager.h.

Member Enumeration Documentation

◆ ExportType

Enumerator
RegularExport 
RangeExport 
SelectionExport 
RegionExport 
StemExport 

Definition at line 53 of file export_profile_manager.h.

◆ TimeFormat

Enumerator
Timecode 
BBT 
MinSec 
Samples 

Definition at line 117 of file export_profile_manager.h.

Constructor & Destructor Documentation

◆ ExportProfileManager()

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

◆ ~ExportProfileManager()

ARDOUR::ExportProfileManager::~ExportProfileManager ( )

Member Function Documentation

◆ add_channel_config()

ChannelConfigStatePtr ARDOUR::ExportProfileManager::add_channel_config ( )

◆ build_filenames()

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

◆ check_config()

void ARDOUR::ExportProfileManager::check_config ( std::shared_ptr< Warnings warnings,
TimespanStatePtr  timespan_state,
ExportChannelConfigPtr  channel_config,
FormatStatePtr  format_state,
FilenameStatePtr  filename_state 
)
private

◆ check_format()

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

◆ check_list()

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

Definition at line 293 of file export_profile_manager.h.

◆ check_sndfile_format()

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

◆ clear_channel_configs()

void ARDOUR::ExportProfileManager::clear_channel_configs ( )
inline

Definition at line 182 of file export_profile_manager.h.

◆ deserialize_format()

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

◆ deserialize_timespan()

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

◆ duplicate_filename_state()

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

◆ duplicate_format_state()

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

◆ find_file()

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

◆ get_channel_configs()

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

Definition at line 180 of file export_profile_manager.h.

◆ get_filenames()

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

Definition at line 251 of file export_profile_manager.h.

◆ get_formats()

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

Definition at line 209 of file export_profile_manager.h.

◆ get_new_format()

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

◆ get_presets()

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

Definition at line 71 of file export_profile_manager.h.

◆ get_sample_filename_for_format()

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

◆ get_timespans()

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

Definition at line 147 of file export_profile_manager.h.

◆ get_warnings()

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

◆ init_channel_configs()

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

◆ init_filenames()

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

◆ init_formats()

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

◆ init_timespans()

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

◆ load_filename()

ExportFilenamePtr ARDOUR::ExportProfileManager::load_filename ( XMLNode node)
private

◆ load_format()

ExportFormatSpecPtr ARDOUR::ExportProfileManager::load_format ( XMLNode node)
private

◆ load_format_from_disk()

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

◆ load_formats()

void ARDOUR::ExportProfileManager::load_formats ( )
private

◆ load_preset()

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

◆ load_preset_from_disk()

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

◆ load_presets()

void ARDOUR::ExportProfileManager::load_presets ( )
private

◆ load_profile()

void ARDOUR::ExportProfileManager::load_profile ( )

◆ new_preset()

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

◆ prepare_for_export()

void ARDOUR::ExportProfileManager::prepare_for_export ( )

◆ preset()

ExportPresetPtr ARDOUR::ExportProfileManager::preset ( ) const
inline

Definition at line 72 of file export_profile_manager.h.

◆ preset_filename()

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

◆ remove_filename_state()

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

◆ remove_format_profile()

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

◆ remove_format_state()

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

◆ remove_preset()

void ARDOUR::ExportProfileManager::remove_preset ( )

◆ revert_format_profile()

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

◆ save_format_to_disk()

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

◆ save_preset()

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

◆ serialize_format()

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

◆ serialize_global_profile()

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

◆ serialize_local_profile()

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

◆ serialize_profile()

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

◆ serialize_timespan()

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

◆ set_global_state()

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

◆ set_local_state()

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

◆ set_selection_range()

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

◆ set_single_range()

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

◆ set_state()

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

◆ type()

ExportType ARDOUR::ExportProfileManager::type ( ) const
inline

Definition at line 67 of file export_profile_manager.h.

◆ update_ranges()

void ARDOUR::ExportProfileManager::update_ranges ( )
private

Member Data Documentation

◆ _type

ExportType ARDOUR::ExportProfileManager::_type
private

Definition at line 85 of file export_profile_manager.h.

◆ channel_configs

ChannelConfigStateList ARDOUR::ExportProfileManager::channel_configs
private

Definition at line 187 of file export_profile_manager.h.

◆ current_preset

ExportPresetPtr ARDOUR::ExportProfileManager::current_preset
private

Definition at line 103 of file export_profile_manager.h.

◆ export_config_dir

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

Definition at line 108 of file export_profile_manager.h.

◆ filenames

FilenameStateList ARDOUR::ExportProfileManager::filenames
private

Definition at line 259 of file export_profile_manager.h.

◆ format_file_map

FileMap ARDOUR::ExportProfileManager::format_file_map
private

Definition at line 235 of file export_profile_manager.h.

◆ format_list

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

Definition at line 234 of file export_profile_manager.h.

◆ FormatListChanged

PBD::Signal<void()> ARDOUR::ExportProfileManager::FormatListChanged

Definition at line 220 of file export_profile_manager.h.

◆ formats

FormatStateList ARDOUR::ExportProfileManager::formats
private

Definition at line 223 of file export_profile_manager.h.

◆ handler

HandlerPtr ARDOUR::ExportProfileManager::handler
private

Definition at line 87 of file export_profile_manager.h.

◆ preset_file_map

FileMap ARDOUR::ExportProfileManager::preset_file_map
private

Definition at line 104 of file export_profile_manager.h.

◆ preset_list

PresetList ARDOUR::ExportProfileManager::preset_list
private

Definition at line 102 of file export_profile_manager.h.

◆ ranges

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

Definition at line 161 of file export_profile_manager.h.

◆ search_path

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

Definition at line 109 of file export_profile_manager.h.

◆ selection_range

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

Definition at line 160 of file export_profile_manager.h.

◆ session

Session& ARDOUR::ExportProfileManager::session
private

Definition at line 88 of file export_profile_manager.h.

◆ single_range

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

Definition at line 162 of file export_profile_manager.h.

◆ single_range_mode

bool ARDOUR::ExportProfileManager::single_range_mode
private

Definition at line 164 of file export_profile_manager.h.

◆ timespans

TimespanStateList ARDOUR::ExportProfileManager::timespans
private

Definition at line 150 of file export_profile_manager.h.

◆ xml_node_name

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

Definition at line 86 of file export_profile_manager.h.


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