ardour
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ARDOUR::Graph Class Reference

#include <graph.h>

Inheritance diagram for ARDOUR::Graph:
ARDOUR::SessionHandleRef PBD::ScopedConnectionList

Public Member Functions

 Graph (Session &session)
 
void prep ()
 
void trigger (GraphNode *n)
 
void rechain (boost::shared_ptr< RouteList >, GraphEdges const &)
 
void dump (int chain)
 
void process ()
 
void dec_ref ()
 
void restart_cycle ()
 
bool run_one ()
 
void helper_thread ()
 
void main_thread ()
 
int silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool &need_butler)
 
int process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool &need_butler)
 
int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool non_rt_pending, int declick)
 
void process_one_route (Route *route)
 
void clear_other_chain ()
 
bool in_process_thread () const
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Protected Member Functions

virtual void session_going_away ()
 
- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void insanity_check ()
 

Private Member Functions

void reset_thread_list ()
 
void drop_threads ()
 
void engine_stopped ()
 

Private Attributes

volatile bool _threads_active
 
node_list_t _nodes_rt [2]
 
node_list_t _init_trigger_list [2]
 
std::vector< GraphNode * > _trigger_queue
 
pthread_mutex_t _trigger_mutex
 
PBD::ProcessSemaphore _execution_sem
 
PBD::ProcessSemaphore _callback_start_sem
 
PBD::ProcessSemaphore _callback_done_sem
 
PBD::ProcessSemaphore _cleanup_sem
 
volatile gint _execution_tokens
 
volatile gint _finished_refcount
 
volatile gint _init_finished_refcount [2]
 
bool _graph_empty
 
Glib::Threads::Mutex _swap_mutex
 
Glib::Threads::Cond _cleanup_cond
 
volatile int _current_chain
 
volatile int _pending_chain
 
volatile int _setup_chain
 
pframes_t _process_nframes
 
framepos_t _process_start_frame
 
framepos_t _process_end_frame
 
bool _process_can_record
 
bool _process_non_rt_pending
 
int _process_declick
 
bool _process_silent
 
bool _process_noroll
 
int _process_retval
 
bool _process_need_butler
 
PBD::ScopedConnectionList engine_connections
 

Additional Inherited Members

- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 

Detailed Description

Definition at line 55 of file graph.h.

Constructor & Destructor Documentation

Graph::Graph ( Session session)

Definition at line 54 of file graph.cc.

Member Function Documentation

void Graph::clear_other_chain ( )

Definition at line 164 of file graph.cc.

void Graph::dec_ref ( )

Called when a node at the `output' end of the chain (ie one that has no-one to feed) is finished.

Definition at line 234 of file graph.cc.

void Graph::drop_threads ( )
private

Definition at line 146 of file graph.cc.

void Graph::dump ( int  chain)

Definition at line 459 of file graph.cc.

void Graph::engine_stopped ( )
private

Definition at line 90 of file graph.cc.

void Graph::helper_thread ( )

Definition at line 403 of file graph.cc.

bool Graph::in_process_thread ( ) const

Definition at line 593 of file graph.cc.

void Graph::main_thread ( )

Here's the main graph thread

Definition at line 422 of file graph.cc.

void Graph::prep ( )

Definition at line 187 of file graph.cc.

void ARDOUR::Graph::process ( )
void Graph::process_one_route ( Route route)

Definition at line 564 of file graph.cc.

int Graph::process_routes ( pframes_t  nframes,
framepos_t  start_frame,
framepos_t  end_frame,
int  declick,
bool &  need_butler 
)

Definition at line 511 of file graph.cc.

void Graph::rechain ( boost::shared_ptr< RouteList routelist,
GraphEdges const &  edges 
)

Rechain our stuff using a list of routes (which can be in any order) and a directed graph of their interconnections, which is guaranteed to be acyclic.

Definition at line 277 of file graph.cc.

void Graph::reset_thread_list ( )
private

Set up threads for running the graph

Definition at line 99 of file graph.cc.

void Graph::restart_cycle ( )

Definition at line 247 of file graph.cc.

int Graph::routes_no_roll ( pframes_t  nframes,
framepos_t  start_frame,
framepos_t  end_frame,
bool  non_rt_pending,
int  declick 
)

Definition at line 539 of file graph.cc.

bool Graph::run_one ( )

Called by both the main thread and all helpers.

Returns
true to quit, false to carry on.

Definition at line 349 of file graph.cc.

void Graph::session_going_away ( )
protectedvirtual

Reimplemented from ARDOUR::SessionHandleRef.

Definition at line 133 of file graph.cc.

int Graph::silent_process_routes ( pframes_t  nframes,
framepos_t  start_frame,
framepos_t  end_frame,
bool &  need_butler 
)

Definition at line 486 of file graph.cc.

void Graph::trigger ( GraphNode n)

Definition at line 223 of file graph.cc.

Member Data Documentation

PBD::ProcessSemaphore ARDOUR::Graph::_callback_done_sem
private

Definition at line 108 of file graph.h.

PBD::ProcessSemaphore ARDOUR::Graph::_callback_start_sem
private

Signalled to start a run of the graph for a process callback

Definition at line 107 of file graph.h.

Glib::Threads::Cond ARDOUR::Graph::_cleanup_cond
private

Definition at line 122 of file graph.h.

PBD::ProcessSemaphore ARDOUR::Graph::_cleanup_sem
private

Definition at line 109 of file graph.h.

volatile int ARDOUR::Graph::_current_chain
private

Definition at line 123 of file graph.h.

PBD::ProcessSemaphore ARDOUR::Graph::_execution_sem
private

Definition at line 104 of file graph.h.

volatile gint ARDOUR::Graph::_execution_tokens
private

The number of processing threads that are asleep

Definition at line 112 of file graph.h.

volatile gint ARDOUR::Graph::_finished_refcount
private

The number of unprocessed nodes that do not feed any other node; updated during processing

Definition at line 114 of file graph.h.

bool ARDOUR::Graph::_graph_empty
private

Definition at line 118 of file graph.h.

volatile gint ARDOUR::Graph::_init_finished_refcount[2]
private

The initial number of nodes that do not feed any other node (for each chain)

Definition at line 116 of file graph.h.

node_list_t ARDOUR::Graph::_init_trigger_list[2]
private

Definition at line 99 of file graph.h.

node_list_t ARDOUR::Graph::_nodes_rt[2]
private

Definition at line 97 of file graph.h.

volatile int ARDOUR::Graph::_pending_chain
private

Definition at line 124 of file graph.h.

bool ARDOUR::Graph::_process_can_record
private

Definition at line 131 of file graph.h.

int ARDOUR::Graph::_process_declick
private

Definition at line 133 of file graph.h.

framepos_t ARDOUR::Graph::_process_end_frame
private

Definition at line 130 of file graph.h.

bool ARDOUR::Graph::_process_need_butler
private

Definition at line 138 of file graph.h.

pframes_t ARDOUR::Graph::_process_nframes
private

Definition at line 128 of file graph.h.

bool ARDOUR::Graph::_process_non_rt_pending
private

Definition at line 132 of file graph.h.

bool ARDOUR::Graph::_process_noroll
private

Definition at line 136 of file graph.h.

int ARDOUR::Graph::_process_retval
private

Definition at line 137 of file graph.h.

bool ARDOUR::Graph::_process_silent
private

Definition at line 135 of file graph.h.

framepos_t ARDOUR::Graph::_process_start_frame
private

Definition at line 129 of file graph.h.

volatile int ARDOUR::Graph::_setup_chain
private

Definition at line 125 of file graph.h.

Glib::Threads::Mutex ARDOUR::Graph::_swap_mutex
private

Definition at line 121 of file graph.h.

volatile bool ARDOUR::Graph::_threads_active
private

Definition at line 92 of file graph.h.

pthread_mutex_t ARDOUR::Graph::_trigger_mutex
private

Definition at line 102 of file graph.h.

std::vector<GraphNode *> ARDOUR::Graph::_trigger_queue
private

Definition at line 101 of file graph.h.

PBD::ScopedConnectionList ARDOUR::Graph::engine_connections
private

Definition at line 141 of file graph.h.


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