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

#include <transport_master.h>

Inheritance diagram for ARDOUR::LTC_TransportMaster:
[legend]

Classes

struct  Biquad
 

Public Member Functions

 LTC_TransportMaster (std::string const &)
 
 ~LTC_TransportMaster ()
 
void set_session (Session *)
 
void pre_process (pframes_t nframes, samplepos_t now, std::optional< samplepos_t >)
 
void reset (bool with_pos)
 
bool locked () const
 
bool ok () const
 
samplecnt_t update_interval () const
 
samplecnt_t resolution () const
 
bool requires_seekahead () const
 
samplecnt_t seekahead_distance () const
 
void init ()
 
void set_sample_clock_synced (bool)
 
Timecode::TimecodeFormat apparent_timecode_format () const
 
std::string position_string () const
 
std::string delta_string () const
 
void create_port ()
 
- Public Member Functions inherited from ARDOUR::TimecodeTransportMaster
 TimecodeTransportMaster (std::string const &name, SyncSource type)
 
bool apparent_timecode_format_valid () const
 
bool fr2997 () const
 
void set_fr2997 (bool)
 
- Public Member Functions inherited from ARDOUR::TransportMaster
 TransportMaster (SyncSource t, std::string const &name)
 
virtual ~TransportMaster ()
 
virtual bool speed_and_position (double &speed, samplepos_t &position, samplepos_t &lp, samplepos_t &when, samplepos_t now)
 
virtual bool usable () const
 
virtual bool starting () const
 
virtual bool sample_clock_synced () const
 
sampleoffset_t current_delta () const
 
virtual bool can_loop () const
 
virtual Locationloop_location () const
 
bool has_loop () const
 
SyncSource type () const
 
TransportRequestSource request_type () const
 
std::string name () const
 
void set_name (std::string const &)
 
int set_state (XMLNode const &, int)
 
XMLNodeget_state () const
 
std::shared_ptr< Portport () const
 
bool check_collect ()
 
virtual void set_collect (bool)
 
bool collect () const
 
virtual void check_backend ()
 
virtual bool allow_request (TransportRequestSource, TransportRequestType) const
 
std::string allowed_request_string () const
 
TransportRequestType request_mask () const
 
void set_request_mask (TransportRequestType)
 
bool removeable () const
 
void set_removeable (bool yn)
 
std::string display_name (bool sh=true) const
 
virtual void unregister_port ()
 
void connect_port_using_state ()
 
- 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
 

Private Member Functions

void parse_ltc (const pframes_t, Sample const *, samplecnt_t)
 
void process_ltc (samplepos_t const)
 
void init_dll (samplepos_t, int32_t)
 
bool detect_discontinuity (LTCFrameExt *, int, bool)
 
bool detect_ltc_fps (int, bool)
 
bool equal_ltc_sample_time (LTCFrame *a, LTCFrame *b)
 
void resync_xrun ()
 
void resync_latency (bool)
 
void parse_timecode_offset ()
 
void parameter_changed (std::string const &p)
 
void connection_handler (std::weak_ptr< ARDOUR::Port >, std::string, std::weak_ptr< ARDOUR::Port >, std::string, bool)
 

Private Attributes

LTCDecoderdecoder
 
double samples_per_ltc_frame
 
Timecode::Time timecode
 
LTCFrameExt prev_frame
 
bool fps_detected
 
samplecnt_t monotonic_cnt
 
uint64_t frames_since_reset
 
int delayedlocked
 
int ltc_detect_fps_cnt
 
int ltc_detect_fps_max
 
bool sync_lock_broken
 
double samples_per_timecode_frame
 
PBD::ScopedConnection port_connection
 
PBD::ScopedConnectionList session_connections
 
LatencyRange ltc_slave_latency
 
bool _filter_enable
 
Biquad _lpf
 
Biquad _hpf
 

Additional Inherited Members

- Static Public Member Functions inherited from ARDOUR::TransportMaster
static std::shared_ptr< TransportMasterfactory (SyncSource, std::string const &, bool removeable)
 
static std::shared_ptr< TransportMasterfactory (XMLNode const &)
 
static void make_property_quarks ()
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Static Public Attributes inherited from ARDOUR::TransportMaster
static const std::string state_node_name
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 
- Protected Member Functions inherited from ARDOUR::TimecodeTransportMaster
void register_properties ()
 
- Protected Member Functions inherited from ARDOUR::TransportMaster
virtual std::string format_delta_time (sampleoffset_t) const
 
- 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
 
- Protected Attributes inherited from ARDOUR::TimecodeTransportMaster
samplepos_t timecode_offset
 
bool timecode_negative_offset
 
bool timecode_format_valid
 
- Protected Attributes inherited from ARDOUR::TransportMaster
SyncSource _type
 
PBD::Property< std::string > _name
 
Session_session
 
sampleoffset_t _current_delta
 
bool _pending_collect
 
bool _removeable
 
PBD::Property< TransportRequestType_request_mask
 
PBD::Property< bool > _sclock_synced
 
PBD::Property< bool > _collect
 
PBD::Property< bool > _connected
 
SafeTime current
 
int transport_direction
 
int dll_initstate
 
double t0
 
double t1
 
double e2
 
double b
 
double c
 
std::shared_ptr< Port_port
 
XMLNode port_node
 
PBD::ScopedConnection port_connection
 
PBD::ScopedConnection backend_connection
 
- 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
 

Detailed Description

Definition at line 580 of file transport_master.h.

Constructor & Destructor Documentation

◆ LTC_TransportMaster()

ARDOUR::LTC_TransportMaster::LTC_TransportMaster ( std::string const &  )

◆ ~LTC_TransportMaster()

ARDOUR::LTC_TransportMaster::~LTC_TransportMaster ( )

Member Function Documentation

◆ apparent_timecode_format()

Timecode::TimecodeFormat ARDOUR::LTC_TransportMaster::apparent_timecode_format ( ) const
virtual

◆ connection_handler()

void ARDOUR::LTC_TransportMaster::connection_handler ( std::weak_ptr< ARDOUR::Port ,
std::string  ,
std::weak_ptr< ARDOUR::Port ,
std::string  ,
bool   
)
privatevirtual

Reimplemented from ARDOUR::TransportMaster.

◆ create_port()

void ARDOUR::LTC_TransportMaster::create_port ( )
virtual

◆ delta_string()

std::string ARDOUR::LTC_TransportMaster::delta_string ( ) const
virtual
Returns
- current time-delta between engine and sync-source

Reimplemented from ARDOUR::TransportMaster.

◆ detect_discontinuity()

bool ARDOUR::LTC_TransportMaster::detect_discontinuity ( LTCFrameExt ,
int  ,
bool   
)
private

◆ detect_ltc_fps()

bool ARDOUR::LTC_TransportMaster::detect_ltc_fps ( int  ,
bool   
)
private

◆ equal_ltc_sample_time()

bool ARDOUR::LTC_TransportMaster::equal_ltc_sample_time ( LTCFrame a,
LTCFrame b 
)
private

◆ init()

void ARDOUR::LTC_TransportMaster::init ( )
virtual

◆ init_dll()

void ARDOUR::LTC_TransportMaster::init_dll ( samplepos_t  ,
int32_t   
)
private

◆ locked()

bool ARDOUR::LTC_TransportMaster::locked ( ) const
virtual

reports to ARDOUR whether the TransportMaster is currently synced to its external time source.

Returns
- when returning false, the transport will stop rolling

Implements ARDOUR::TransportMaster.

◆ ok()

bool ARDOUR::LTC_TransportMaster::ok ( ) const
virtual

reports to ARDOUR whether the slave is in a sane state

Returns
- when returning false, the transport will be stopped and the slave disconnected from ARDOUR.

Implements ARDOUR::TransportMaster.

◆ parameter_changed()

void ARDOUR::LTC_TransportMaster::parameter_changed ( std::string const &  p)
private

◆ parse_ltc()

void ARDOUR::LTC_TransportMaster::parse_ltc ( const  pframes_t,
Sample const *  ,
samplecnt_t   
)
private

◆ parse_timecode_offset()

void ARDOUR::LTC_TransportMaster::parse_timecode_offset ( )
private

◆ position_string()

std::string ARDOUR::LTC_TransportMaster::position_string ( ) const
virtual

◆ pre_process()

void ARDOUR::LTC_TransportMaster::pre_process ( pframes_t  nframes,
samplepos_t  now,
std::optional< samplepos_t  
)
virtual

◆ process_ltc()

void ARDOUR::LTC_TransportMaster::process_ltc ( samplepos_t const  )
private

◆ requires_seekahead()

bool ARDOUR::LTC_TransportMaster::requires_seekahead ( ) const
inlinevirtual
Returns
- when returning true, ARDOUR will wait for seekahead_distance() before transport starts rolling

Implements ARDOUR::TransportMaster.

Definition at line 596 of file transport_master.h.

◆ reset()

void ARDOUR::LTC_TransportMaster::reset ( bool  with_pos)
virtual

◆ resolution()

samplecnt_t ARDOUR::LTC_TransportMaster::resolution ( ) const
virtual
Returns
- the timing resolution of the TransportMaster - If the distance of ARDOURs transport to the slave becomes greater than the resolution, sound will stop

Implements ARDOUR::TransportMaster.

◆ resync_latency()

void ARDOUR::LTC_TransportMaster::resync_latency ( bool  )
private

◆ resync_xrun()

void ARDOUR::LTC_TransportMaster::resync_xrun ( )
private

◆ seekahead_distance()

samplecnt_t ARDOUR::LTC_TransportMaster::seekahead_distance ( ) const
inlinevirtual
Returns
the number of samples that this slave wants to seek ahead. Relevant only if requires_seekahead() returns true.

Reimplemented from ARDOUR::TransportMaster.

Definition at line 600 of file transport_master.h.

◆ set_sample_clock_synced()

void ARDOUR::LTC_TransportMaster::set_sample_clock_synced ( bool  )
virtual

Reimplemented from ARDOUR::TransportMaster.

◆ set_session()

void ARDOUR::LTC_TransportMaster::set_session ( Session )
virtual

Reimplemented from ARDOUR::TransportMaster.

◆ update_interval()

samplecnt_t ARDOUR::LTC_TransportMaster::update_interval ( ) const
virtual
Returns
- the expected update interval for the data source used by this transport master. Even if the data is effectively continuous, this number indicates how long it is between changes to the known position of the master.

Implements ARDOUR::TransportMaster.

Member Data Documentation

◆ _filter_enable

bool ARDOUR::LTC_TransportMaster::_filter_enable
private

Definition at line 652 of file transport_master.h.

◆ _hpf

Biquad ARDOUR::LTC_TransportMaster::_hpf
private

Definition at line 654 of file transport_master.h.

◆ _lpf

Biquad ARDOUR::LTC_TransportMaster::_lpf
private

Definition at line 653 of file transport_master.h.

◆ decoder

LTCDecoder* ARDOUR::LTC_TransportMaster::decoder
private

Definition at line 626 of file transport_master.h.

◆ delayedlocked

int ARDOUR::LTC_TransportMaster::delayedlocked
private

Definition at line 634 of file transport_master.h.

◆ fps_detected

bool ARDOUR::LTC_TransportMaster::fps_detected
private

Definition at line 630 of file transport_master.h.

◆ frames_since_reset

uint64_t ARDOUR::LTC_TransportMaster::frames_since_reset
private

Definition at line 633 of file transport_master.h.

◆ ltc_detect_fps_cnt

int ARDOUR::LTC_TransportMaster::ltc_detect_fps_cnt
private

Definition at line 636 of file transport_master.h.

◆ ltc_detect_fps_max

int ARDOUR::LTC_TransportMaster::ltc_detect_fps_max
private

Definition at line 637 of file transport_master.h.

◆ ltc_slave_latency

LatencyRange ARDOUR::LTC_TransportMaster::ltc_slave_latency
private

Definition at line 643 of file transport_master.h.

◆ monotonic_cnt

samplecnt_t ARDOUR::LTC_TransportMaster::monotonic_cnt
private

Definition at line 632 of file transport_master.h.

◆ port_connection

PBD::ScopedConnection ARDOUR::LTC_TransportMaster::port_connection
private

Definition at line 641 of file transport_master.h.

◆ prev_frame

LTCFrameExt ARDOUR::LTC_TransportMaster::prev_frame
private

Definition at line 629 of file transport_master.h.

◆ samples_per_ltc_frame

double ARDOUR::LTC_TransportMaster::samples_per_ltc_frame
private

Definition at line 627 of file transport_master.h.

◆ samples_per_timecode_frame

double ARDOUR::LTC_TransportMaster::samples_per_timecode_frame
private

Definition at line 639 of file transport_master.h.

◆ session_connections

PBD::ScopedConnectionList ARDOUR::LTC_TransportMaster::session_connections
private

Definition at line 642 of file transport_master.h.

◆ sync_lock_broken

bool ARDOUR::LTC_TransportMaster::sync_lock_broken
private

Definition at line 638 of file transport_master.h.

◆ timecode

Timecode::Time ARDOUR::LTC_TransportMaster::timecode
private

Definition at line 628 of file transport_master.h.


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