Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::AudioRegionImporter Class Reference

#include <audio_region_importer.h>

Inheritance diagram for ARDOUR::AudioRegionImporter:
[legend]

Public Member Functions

 AudioRegionImporter (XMLTree const &source, Session &session, AudioRegionImportHandler &handler, XMLNode const &node)
 
 ~AudioRegionImporter ()
 
std::string get_info () const
 
ImportStatusget_import_status ()
 
void add_sources_to_session ()
 
XMLNode const & get_xml ()
 
- Public Member Functions inherited from ARDOUR::ElementImporter
 ElementImporter (XMLTree const &source, ARDOUR::Session &session)
 
virtual ~ElementImporter ()
 
virtual std::string get_name () const
 
bool prepare_move ()
 
void cancel_move ()
 
void move ()
 Moves the element to the taget session. More...
 
bool broken ()
 Check if element is broken. Cannot be moved if broken. More...
 

Protected Member Functions

bool _prepare_move ()
 
void _cancel_move ()
 Cancel move. More...
 
void _move ()
 
- Protected Member Functions inherited from ARDOUR::ElementImporter
bool queued ()
 Ture if the element has been prepared and queued for importing. More...
 
std::string timecode_to_string (Timecode::Time &time) const
 Converts timecode time to a string. More...
 
samplecnt_t rate_convert_samples (samplecnt_t samples) const
 Converts samples so that times match the sessions sample rate. More...
 
std::string rate_convert_samples (std::string const &samples) const
 Converts samples so that times match the sessions sample rate (for straight use in XML) More...
 
void set_broken ()
 Set element broken. More...
 

Private Member Functions

bool parse_xml_region ()
 
bool parse_source_xml ()
 
std::string get_sound_dir (XMLTree const &tree)
 
void prepare_region ()
 
void prepare_sources ()
 

Private Attributes

XMLNode xml_region
 
AudioRegionImportHandlerhandler
 
PBD::ID old_id
 
PBD::ID id
 
std::list< std::string > filenames
 
ImportStatus status
 
std::vector< std::shared_ptr< Region > > region
 
bool region_prepared
 
bool sources_prepared
 

Additional Inherited Members

- Static Public Attributes inherited from ARDOUR::ElementImporter
static PBD::Signal< std::pair< bool, std::string >std::string, std::string)> Rename
 Signal that requests for anew name. More...
 
static PBD::Signal< bool(std::string)> Prompt
 Signal for ok/cancel prompting. More...
 
- Protected Attributes inherited from ARDOUR::ElementImporter
XMLTree const & source
 Source XML-tree. More...
 
ARDOUR::Sessionsession
 Target session. More...
 
std::string name
 Name of element. More...
 
samplecnt_t sample_rate
 The sample rate of the session from which we are importing. More...
 

Detailed Description

Definition at line 70 of file audio_region_importer.h.

Constructor & Destructor Documentation

◆ AudioRegionImporter()

ARDOUR::AudioRegionImporter::AudioRegionImporter ( XMLTree const &  source,
Session session,
AudioRegionImportHandler handler,
XMLNode const &  node 
)

◆ ~AudioRegionImporter()

ARDOUR::AudioRegionImporter::~AudioRegionImporter ( )

Member Function Documentation

◆ _cancel_move()

void ARDOUR::AudioRegionImporter::_cancel_move ( )
protectedvirtual

Cancel move.

Implements ARDOUR::ElementImporter.

◆ _move()

void ARDOUR::AudioRegionImporter::_move ( )
protectedvirtual

Moves the element to the taget session In addition to actually adding the element to the session changing ids, renaming files etc. should be taken care of.

Implements ARDOUR::ElementImporter.

◆ _prepare_move()

bool ARDOUR::AudioRegionImporter::_prepare_move ( )
protectedvirtual

Should take care of all tasks that need to be done before moving the element. This includes prompting the user for more information if necessary.

Returns
whether or not the element can be moved

Implements ARDOUR::ElementImporter.

◆ add_sources_to_session()

void ARDOUR::AudioRegionImporter::add_sources_to_session ( )

◆ get_import_status()

ImportStatus* ARDOUR::AudioRegionImporter::get_import_status ( )
inlinevirtual

Gets import status, if applicable.

Reimplemented from ARDOUR::ElementImporter.

Definition at line 78 of file audio_region_importer.h.

◆ get_info()

std::string ARDOUR::AudioRegionImporter::get_info ( ) const
virtual

Gets a textual representation of the element

Returns
a textual representation on this specific element

Implements ARDOUR::ElementImporter.

◆ get_sound_dir()

std::string ARDOUR::AudioRegionImporter::get_sound_dir ( XMLTree const &  tree)
private

◆ get_xml()

XMLNode const& ARDOUR::AudioRegionImporter::get_xml ( )

◆ parse_source_xml()

bool ARDOUR::AudioRegionImporter::parse_source_xml ( )
private

◆ parse_xml_region()

bool ARDOUR::AudioRegionImporter::parse_xml_region ( )
private

◆ prepare_region()

void ARDOUR::AudioRegionImporter::prepare_region ( )
private

◆ prepare_sources()

void ARDOUR::AudioRegionImporter::prepare_sources ( )
private

Member Data Documentation

◆ filenames

std::list<std::string> ARDOUR::AudioRegionImporter::filenames
private

Definition at line 95 of file audio_region_importer.h.

◆ handler

AudioRegionImportHandler& ARDOUR::AudioRegionImporter::handler
private

Definition at line 92 of file audio_region_importer.h.

◆ id

PBD::ID ARDOUR::AudioRegionImporter::id
private

Definition at line 94 of file audio_region_importer.h.

◆ old_id

PBD::ID ARDOUR::AudioRegionImporter::old_id
private

Definition at line 93 of file audio_region_importer.h.

◆ region

std::vector<std::shared_ptr<Region> > ARDOUR::AudioRegionImporter::region
private

Definition at line 104 of file audio_region_importer.h.

◆ region_prepared

bool ARDOUR::AudioRegionImporter::region_prepared
private

Definition at line 105 of file audio_region_importer.h.

◆ sources_prepared

bool ARDOUR::AudioRegionImporter::sources_prepared
private

Definition at line 106 of file audio_region_importer.h.

◆ status

ImportStatus ARDOUR::AudioRegionImporter::status
private

Definition at line 96 of file audio_region_importer.h.

◆ xml_region

XMLNode ARDOUR::AudioRegionImporter::xml_region
private

Definition at line 91 of file audio_region_importer.h.


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