Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::Source Class Referenceabstract

#include <source.h>

Inheritance diagram for ARDOUR::Source:
[legend]

Public Types

enum  Flag {
  Writable = 0x1 , CanRename = 0x2 , Broadcast = 0x4 , Removable = 0x8 ,
  RemovableIfEmpty = 0x10 , RemoveAtDestroy = 0x20 , NoPeakFile = 0x40 , Destructive = 0x80 ,
  Empty = 0x100 , RF64_RIFF = 0x200 , Missing = 0x400
}
 
typedef Glib::Threads::RWLock::ReaderLock ReaderLock
 
typedef Glib::Threads::RWLock::WriterLock WriterLock
 

Public Member Functions

 Source (Session &, DataType type, const std::string &name, Flag flags=Flag(0))
 
 Source (Session &, const XMLNode &)
 
virtual ~Source ()
 
DataType type ()
 
time_t timestamp () const
 
void stamp (time_t when)
 
virtual timepos_t length () const
 
virtual bool empty () const
 
virtual void update_length (timepos_t const &dur)
 
void set_take_id (std::string id)
 
const std::string & take_id () const
 
void mark_for_remove ()
 
virtual void mark_streaming_write_started (const WriterLock &lock)
 
virtual void mark_streaming_write_completed (const WriterLock &lock, Temporal::timecnt_t const &duration)=0
 
virtual void session_saved ()
 
XMLNodeget_state () const
 
int set_state (XMLNode const &, int version)
 
bool writable () const
 
virtual bool length_mutable () const
 
bool has_been_analysed () const
 
virtual bool can_be_analysed () const
 
virtual void set_been_analysed (bool yn)
 
virtual bool check_for_analysis_data_on_disk ()
 
std::string get_transients_path () const
 
int load_transients (const std::string &)
 
size_t n_captured_xruns () const
 
XrunPositions const & captured_xruns () const
 
void set_captured_xruns (XrunPositions const &xruns)
 
void set_captured_marks (CueMarkers const &marks)
 
CueMarkers const & cue_markers () const
 
bool add_cue_marker (CueMarker const &)
 
bool move_cue_marker (CueMarker const &, timepos_t const &source_relative_position)
 
bool remove_cue_marker (CueMarker const &)
 
bool rename_cue_marker (CueMarker &, std::string const &)
 
bool clear_cue_markers ()
 
virtual timepos_t natural_position () const
 
virtual void set_natural_position (timepos_t const &pos)
 
bool have_natural_position () const
 
timecnt_t time_since_capture_start (timepos_t const &pos)
 
void set_allow_remove_if_empty (bool yn)
 
Glib::Threads::RWLock & mutex ()
 
Flag flags () const
 
virtual void inc_use_count ()
 
virtual void dec_use_count ()
 
int use_count () const
 
bool used () const
 
uint32_t level () const
 
std::string ancestor_name ()
 
void set_ancestor_name (const std::string &name)
 
void set_captured_for (std::string str)
 
std::string captured_for () const
 
bool get_segment_descriptor (TimelineRange const &, SegmentDescriptor &)
 
int set_segment_descriptor (SegmentDescriptor const &)
 
- Public Member Functions inherited from ARDOUR::SessionObject
 SessionObject (Session &session, const std::string &name)
 
Sessionsession () const
 
std::string name () const
 
virtual bool set_name (const std::string &str)
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
virtual ~Destructible ()
 
virtual void drop_references ()
 

Public Attributes

PBD::Signal< void()> AnalysisChanged
 
AnalysisFeatureList transients
 
PBD::Signal< void()> CueMarkersChanged
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal< void()> Destroyed
 
PBD::Signal< void()> DropReferences
 

Static Public Attributes

static PBD::Signal< void(Source *)> SourceCreated
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 

Protected Types

typedef std::vector< SegmentDescriptorSegmentDescriptors
 

Protected Attributes

DataType _type
 
Flag _flags
 
time_t _timestamp
 
std::string _take_id
 
timepos_t _natural_position
 
bool _have_natural_position
 
bool _analysed
 
std::atomic< int > _use_count
 
uint32_t _level
 
std::string _ancestor_name
 
std::string _captured_for
 
timepos_t _length
 
XrunPositions _xruns
 
CueMarkers _cue_markers
 
SegmentDescriptors segment_descriptors
 
Glib::Threads::RWLock _lock
 
Glib::Threads::Mutex _analysis_lock
 
- Protected Attributes inherited from ARDOUR::SessionObject
PBD::Property< std::string > _name
 
- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Private Member Functions

void fix_writable_flags ()
 
XMLNodeget_cue_state () const
 
int set_cue_state (XMLNode const &, int)
 

Additional Inherited Members

- Static Public Member Functions inherited from ARDOUR::SessionObject
static void make_property_quarks ()
 
- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void session_going_away ()
 
virtual void insanity_check ()
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 

Detailed Description

Definition at line 43 of file ardour/ardour/source.h.

Member Typedef Documentation

◆ ReaderLock

typedef Glib::Threads::RWLock::ReaderLock ARDOUR::Source::ReaderLock

Definition at line 62 of file ardour/ardour/source.h.

◆ SegmentDescriptors

typedef std::vector<SegmentDescriptor> ARDOUR::Source::SegmentDescriptors
protected

Definition at line 175 of file ardour/ardour/source.h.

◆ WriterLock

typedef Glib::Threads::RWLock::WriterLock ARDOUR::Source::WriterLock

Definition at line 63 of file ardour/ardour/source.h.

Member Enumeration Documentation

◆ Flag

Enumerator
Writable 
CanRename 
Broadcast 
Removable 
RemovableIfEmpty 
RemoveAtDestroy 
NoPeakFile 
Destructive 
Empty 
RF64_RIFF 
Missing 

Definition at line 47 of file ardour/ardour/source.h.

Constructor & Destructor Documentation

◆ Source() [1/2]

ARDOUR::Source::Source ( Session ,
DataType  type,
const std::string &  name,
Flag  flags = Flag(0) 
)

◆ Source() [2/2]

ARDOUR::Source::Source ( Session ,
const XMLNode  
)

◆ ~Source()

virtual ARDOUR::Source::~Source ( )
virtual

Member Function Documentation

◆ add_cue_marker()

bool ARDOUR::Source::add_cue_marker ( CueMarker const &  )

◆ ancestor_name()

std::string ARDOUR::Source::ancestor_name ( )
inline

Definition at line 150 of file ardour/ardour/source.h.

◆ can_be_analysed()

virtual bool ARDOUR::Source::can_be_analysed ( ) const
inlinevirtual

◆ captured_for()

std::string ARDOUR::Source::captured_for ( ) const
inline

Definition at line 154 of file ardour/ardour/source.h.

◆ captured_xruns()

XrunPositions const& ARDOUR::Source::captured_xruns ( ) const
inline

Definition at line 116 of file ardour/ardour/source.h.

◆ check_for_analysis_data_on_disk()

virtual bool ARDOUR::Source::check_for_analysis_data_on_disk ( )
virtual

◆ clear_cue_markers()

bool ARDOUR::Source::clear_cue_markers ( )

◆ cue_markers()

CueMarkers const& ARDOUR::Source::cue_markers ( ) const
inline

Definition at line 120 of file ardour/ardour/source.h.

◆ dec_use_count()

virtual void ARDOUR::Source::dec_use_count ( )
virtual

◆ empty()

virtual bool ARDOUR::Source::empty ( ) const
virtual

Reimplemented in ARDOUR::AudioPlaylistSource.

◆ fix_writable_flags()

void ARDOUR::Source::fix_writable_flags ( )
private

◆ flags()

Flag ARDOUR::Source::flags ( ) const
inline

Definition at line 141 of file ardour/ardour/source.h.

◆ get_cue_state()

XMLNode& ARDOUR::Source::get_cue_state ( ) const
private

◆ get_segment_descriptor()

bool ARDOUR::Source::get_segment_descriptor ( TimelineRange const &  ,
SegmentDescriptor  
)

◆ get_state()

XMLNode& ARDOUR::Source::get_state ( ) const
virtual

Implements PBD::Stateful.

◆ get_transients_path()

std::string ARDOUR::Source::get_transients_path ( ) const

◆ has_been_analysed()

bool ARDOUR::Source::has_been_analysed ( ) const

◆ have_natural_position()

bool ARDOUR::Source::have_natural_position ( ) const
inline

Definition at line 131 of file ardour/ardour/source.h.

◆ inc_use_count()

virtual void ARDOUR::Source::inc_use_count ( )
virtual

◆ length()

virtual timepos_t ARDOUR::Source::length ( ) const
inlinevirtual

Reimplemented in ARDOUR::SrcFileSource.

Definition at line 75 of file ardour/ardour/source.h.

◆ length_mutable()

virtual bool ARDOUR::Source::length_mutable ( ) const
inlinevirtual

Reimplemented in ARDOUR::MidiSource.

Definition at line 100 of file ardour/ardour/source.h.

◆ level()

uint32_t ARDOUR::Source::level ( ) const
inline

Definition at line 148 of file ardour/ardour/source.h.

◆ load_transients()

int ARDOUR::Source::load_transients ( const std::string &  )

◆ mark_for_remove()

void ARDOUR::Source::mark_for_remove ( )

◆ mark_streaming_write_completed()

virtual void ARDOUR::Source::mark_streaming_write_completed ( const WriterLock lock,
Temporal::timecnt_t const &  duration 
)
pure virtual

◆ mark_streaming_write_started()

virtual void ARDOUR::Source::mark_streaming_write_started ( const WriterLock lock)
inlinevirtual

Reimplemented in ARDOUR::MidiSource.

Definition at line 85 of file ardour/ardour/source.h.

◆ move_cue_marker()

bool ARDOUR::Source::move_cue_marker ( CueMarker const &  ,
timepos_t const &  source_relative_position 
)

◆ mutex()

Glib::Threads::RWLock& ARDOUR::Source::mutex ( )
inline

Definition at line 140 of file ardour/ardour/source.h.

◆ n_captured_xruns()

size_t ARDOUR::Source::n_captured_xruns ( ) const
inline

Definition at line 115 of file ardour/ardour/source.h.

◆ natural_position()

virtual timepos_t ARDOUR::Source::natural_position ( ) const
inlinevirtual

Reimplemented in ARDOUR::SrcFileSource.

Definition at line 128 of file ardour/ardour/source.h.

◆ remove_cue_marker()

bool ARDOUR::Source::remove_cue_marker ( CueMarker const &  )

◆ rename_cue_marker()

bool ARDOUR::Source::rename_cue_marker ( CueMarker ,
std::string const &   
)

◆ session_saved()

virtual void ARDOUR::Source::session_saved ( )
inlinevirtual

Reimplemented in ARDOUR::MidiSource.

Definition at line 93 of file ardour/ardour/source.h.

◆ set_allow_remove_if_empty()

void ARDOUR::Source::set_allow_remove_if_empty ( bool  yn)

◆ set_ancestor_name()

void ARDOUR::Source::set_ancestor_name ( const std::string &  name)
inline

Definition at line 151 of file ardour/ardour/source.h.

◆ set_been_analysed()

virtual void ARDOUR::Source::set_been_analysed ( bool  yn)
virtual

◆ set_captured_for()

void ARDOUR::Source::set_captured_for ( std::string  str)
inline

Definition at line 153 of file ardour/ardour/source.h.

◆ set_captured_marks()

void ARDOUR::Source::set_captured_marks ( CueMarkers const &  marks)

◆ set_captured_xruns()

void ARDOUR::Source::set_captured_xruns ( XrunPositions const &  xruns)
inline

Definition at line 117 of file ardour/ardour/source.h.

◆ set_cue_state()

int ARDOUR::Source::set_cue_state ( XMLNode const &  ,
int   
)
private

◆ set_natural_position()

virtual void ARDOUR::Source::set_natural_position ( timepos_t const &  pos)
virtual

Reimplemented in ARDOUR::SndFileSource.

◆ set_segment_descriptor()

int ARDOUR::Source::set_segment_descriptor ( SegmentDescriptor const &  )

◆ set_state()

int ARDOUR::Source::set_state ( XMLNode const &  ,
int  version 
)
virtual

Implements PBD::Stateful.

◆ set_take_id()

void ARDOUR::Source::set_take_id ( std::string  id)
inline

Definition at line 80 of file ardour/ardour/source.h.

◆ stamp()

void ARDOUR::Source::stamp ( time_t  when)
inline

Definition at line 73 of file ardour/ardour/source.h.

◆ take_id()

const std::string& ARDOUR::Source::take_id ( ) const
inline

Definition at line 81 of file ardour/ardour/source.h.

◆ time_since_capture_start()

timecnt_t ARDOUR::Source::time_since_capture_start ( timepos_t const &  pos)

◆ timestamp()

time_t ARDOUR::Source::timestamp ( ) const
inline

Definition at line 72 of file ardour/ardour/source.h.

◆ type()

DataType ARDOUR::Source::type ( )
inline

Definition at line 70 of file ardour/ardour/source.h.

◆ update_length()

virtual void ARDOUR::Source::update_length ( timepos_t const &  dur)
inlinevirtual

Reimplemented in ARDOUR::SMFSource, and ARDOUR::AudioSource.

Definition at line 78 of file ardour/ardour/source.h.

◆ use_count()

int ARDOUR::Source::use_count ( ) const
inline

Definition at line 145 of file ardour/ardour/source.h.

◆ used()

bool ARDOUR::Source::used ( ) const
inline

Definition at line 146 of file ardour/ardour/source.h.

◆ writable()

bool ARDOUR::Source::writable ( ) const

Member Data Documentation

◆ _analysed

bool ARDOUR::Source::_analysed
protected

Definition at line 166 of file ardour/ardour/source.h.

◆ _analysis_lock

Glib::Threads::Mutex ARDOUR::Source::_analysis_lock
mutableprotected

Definition at line 179 of file ardour/ardour/source.h.

◆ _ancestor_name

std::string ARDOUR::Source::_ancestor_name
protected

Definition at line 169 of file ardour/ardour/source.h.

◆ _captured_for

std::string ARDOUR::Source::_captured_for
protected

Definition at line 170 of file ardour/ardour/source.h.

◆ _cue_markers

CueMarkers ARDOUR::Source::_cue_markers
protected

Definition at line 173 of file ardour/ardour/source.h.

◆ _flags

Flag ARDOUR::Source::_flags
protected

Definition at line 161 of file ardour/ardour/source.h.

◆ _have_natural_position

bool ARDOUR::Source::_have_natural_position
protected

Definition at line 165 of file ardour/ardour/source.h.

◆ _length

timepos_t ARDOUR::Source::_length
protected

Definition at line 171 of file ardour/ardour/source.h.

◆ _level

uint32_t ARDOUR::Source::_level
protected

Definition at line 168 of file ardour/ardour/source.h.

◆ _lock

Glib::Threads::RWLock ARDOUR::Source::_lock
mutableprotected

Definition at line 178 of file ardour/ardour/source.h.

◆ _natural_position

timepos_t ARDOUR::Source::_natural_position
protected

Definition at line 164 of file ardour/ardour/source.h.

◆ _take_id

std::string ARDOUR::Source::_take_id
protected

Definition at line 163 of file ardour/ardour/source.h.

◆ _timestamp

time_t ARDOUR::Source::_timestamp
protected

Definition at line 162 of file ardour/ardour/source.h.

◆ _type

DataType ARDOUR::Source::_type
protected

Definition at line 160 of file ardour/ardour/source.h.

◆ _use_count

std::atomic<int> ARDOUR::Source::_use_count
protected

Definition at line 167 of file ardour/ardour/source.h.

◆ _xruns

XrunPositions ARDOUR::Source::_xruns
protected

Definition at line 172 of file ardour/ardour/source.h.

◆ AnalysisChanged

PBD::Signal<void()> ARDOUR::Source::AnalysisChanged

Definition at line 109 of file ardour/ardour/source.h.

◆ CueMarkersChanged

PBD::Signal<void()> ARDOUR::Source::CueMarkersChanged

Definition at line 126 of file ardour/ardour/source.h.

◆ segment_descriptors

SegmentDescriptors ARDOUR::Source::segment_descriptors
protected

Definition at line 176 of file ardour/ardour/source.h.

◆ SourceCreated

PBD::Signal<void(Source*)> ARDOUR::Source::SourceCreated
static

Definition at line 102 of file ardour/ardour/source.h.

◆ transients

AnalysisFeatureList ARDOUR::Source::transients

Definition at line 111 of file ardour/ardour/source.h.


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