gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <JackPortMonitor.H>
Classes | |
struct | CompareStrings |
Public Member Functions | |
JackPortMonitor () | |
JackPortMonitor (bool monitorPorts) | |
JackPortMonitor (bool monitorPorts, bool autoConnectNetClientsIn) | |
JackPortMonitor (string clientName_) | |
JackPortMonitor (string clientName_, bool monitorPorts) | |
JackPortMonitor (string clientName_, bool monitorPorts, bool autoConnectNetClientsIn) | |
JackPortMonitor (string clientName_, string serverName) | |
JackPortMonitor (string clientName_, string serverName, bool monitorPorts) | |
JackPortMonitor (string clientName_, string serverName, bool monitorPorts, bool autoConnectNetClients) | |
JackPortMonitor (JackBase &jb) | |
virtual | ~JackPortMonitor () |
Destructor. More... | |
virtual void | print (ostream &os) |
void | connectPortRenameCallback (void) |
void | connectPortRegistrationCallback (void) |
void | connectPortConnectCallback (void) |
Public Member Functions inherited from JackBase | |
JackBase () | |
JackBase (string clientName_) | |
JackBase (string clientName_, string serverName) | |
virtual | ~JackBase () |
Destructor. More... | |
virtual int | stopClient (void) |
int | getSampleRate (void) const |
virtual int | createPorts (string inName, int inCnt, string outName, int outCnt) |
virtual int | destroyPorts () |
void | getPhysicalPorts (vector< jack_port_t *> &inPorts, vector< jack_port_t *> &outPorts) |
void | getPhysicalPortCount (int &in, int &out) |
bool | connected () |
string | getClientName () |
virtual void | setClientName (string cn) |
string | portNameFromPort (jack_port_id_t p) |
string | portNameFromPort (jack_port_t *p) |
string | clientNameFromPort (jack_port_id_t p) |
string | clientNameFromPort (jack_port_t *p) |
string | clientNameFromPortName (string fullPortName) |
string | clientNameFromPortNames (string fullPortName, string shortPortName) |
string | shortPortNameFromPortName (const string fullPortName) |
bool | operator== (const string &cn) |
int | getInputPortSize () |
jack_port_t * | getInputPort (int i) |
jack_port_t * | getOutputPort (int i) |
void | addInputPort (jack_port_t *inP) |
void | addOutputPort (jack_port_t *outP) |
int | populatInOutPorts (const string &inName, vector< string > &inPorts, const string &outName, vector< string > &outPorts) |
int | connectPorts (const string inName, const string outName) |
virtual int | disconnectPorts (const string &inName, const string &outName) |
void | setClient (jack_client_t *c) |
Public Member Functions inherited from WaitingThread | |
virtual | ~WaitingThread (void) |
Public Member Functions inherited from ThreadedMethod | |
virtual int | run (int priority=0) |
Public Member Functions inherited from Thread | |
Thread (void) | |
virtual | ~Thread (void) |
void * | stop (void) |
int | run (void *(*start_routine)(void *), void *data, int priority=0) |
int | setPriority (pthread_attr_t *attributes, int priority) |
int | getPriority () |
void * | meetThread (void) |
void | exit (void *retVal) |
bool | running () |
Protected Member Functions | |
virtual void | autoConnectNetClientsPorts (void) |
virtual void | reSyncPorts (void) |
virtual void | reSyncConnections (void) |
virtual void | jackPortConnected (jack_port_id_t a, jack_port_id_t b, int connect) |
virtual void | jackPortRegistered (jack_port_id_t port, int reg) |
virtual void | jackPortRenamed (jack_port_id_t port, const char *oldName, const char *newName) |
Protected Member Functions inherited from JackBase | |
virtual void | determineLatencies () |
int | getPortListAndCount (JackPortFlags flags, vector< jack_port_t *> *ports, const char *portNamePattern, const char *typeNamePattern) |
int | getPortListAndCount (JackPortFlags flags, vector< string > *ports, const char *portNamePattern, const char *typeNamePattern) |
Protected Attributes | |
vector< JackBaseWithPortNames * > | knownClients |
A vector of clients and their ports both ids and names. More... | |
bool | autoConnectNetClients |
When true, autoconnect networked client's ports to the system ports. More... | |
Protected Attributes inherited from JackBase | |
jack_client_t * | client |
The jack client. More... | |
string | clientName |
The name of this client. More... | |
jack_options_t | jackOptions |
Options for jack. More... | |
jack_status_t | status |
The status of jack. More... | |
int | physicalInputPortCnt |
The number of physical input ports. More... | |
int | physicalOutputPortCnt |
The number of physical input ports. More... | |
vector< jack_port_t * > | inputPorts |
The input ports. More... | |
vector< jack_port_t * > | outputPorts |
The output ports. More... | |
vector< jack_nframes_t > | inputLatencies |
The input latencies, one for each port. More... | |
vector< jack_nframes_t > | outputLatencies |
The output latencies, one for each port. More... | |
Private Member Functions | |
void | init (bool monitorPorts) |
void | init (bool monitorPorts, bool autoConnectNetClientsIn) |
void | connectPortMonitoringCallbacks (void) |
virtual void | breakDownPortsToClients (vector< jack_port_t *> &ports) |
void | reSyncPorts (JackPortFlags flags) |
virtual int | disconnect (void) |
virtual int | connect (string clientName_) |
virtual int | connect (const string &clientName_, const string &serverName) |
virtual void * | threadMain (void) |
Static Private Member Functions | |
static void | jackPortConnectCallback (jack_port_id_t a, jack_port_id_t b, int connect, void *arg) |
static void | jackPortRegistrationCallback (jack_port_id_t port, int reg, void *arg) |
static void | jackPortRenameCallback (jack_port_id_t port, const char *oldName, const char *newName, void *arg) |
Additional Inherited Members | |
Public Attributes inherited from JackBase | |
bool | connect1To1 |
When true, then connections are made in a 1 to 1 manner. When False, then connections are made in an all to all manner. More... | |
Public Attributes inherited from WaitingThread | |
Cond | cond |
Maintains knowledge of jack ports. Operates by reconstructing clients to hold only their ports in the knownClients member variable. The list of physical ports are maintained first. Provides methods for connection, disconnection and monitoring.
NOTE: This class requires linking against the gtkIOStream library.
Definition at line 34 of file JackPortMonitor.H.
JackPortMonitor::JackPortMonitor | ( | ) |
Constructor. Doesn't connect the jack client. By default monitors ports.
Definition at line 181 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | bool | monitorPorts | ) |
Constructor. Doesn't connect the jack client.
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
Definition at line 186 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | bool | monitorPorts, |
bool | autoConnectNetClientsIn | ||
) |
Constructor. Doesn't connect the jack client.
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
autoConnectNetClientsIn | If true, autoconnect network clients. |
Definition at line 190 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_ | ) |
Constructor. Connecting the client to the default server. By default monitors ports.
clientName_ | The client name, which will initiate a server connection. |
Definition at line 194 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_, |
bool | monitorPorts | ||
) |
Constructor. Connecting the client to the default server.
clientName_ | The client name, which will initiate a server connection. |
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
Definition at line 199 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_, |
bool | monitorPorts, | ||
bool | autoConnectNetClientsIn | ||
) |
Constructor. Connecting the client to the default server.
clientName_ | The client name, which will initiate a server connection. |
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
autoConnectNetClientsIn | If true, autoconnect network clients. |
Definition at line 203 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_, |
string | serverName | ||
) |
Constructor. Connecting the client to a particular server. By default monitors ports.
clientName_ | The client name, which will initiate a server connection. |
serverName | The server to connect to. |
Definition at line 208 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_, |
string | serverName, | ||
bool | monitorPorts | ||
) |
Constructor. Connecting the client to a particular server.
clientName_ | The client name, which will initiate a server connection. |
serverName | The server to connect to. |
monitorPorts | If true, then monitor changes to the prots and connections. |
Definition at line 213 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | string | clientName_, |
string | serverName, | ||
bool | monitorPorts, | ||
bool | autoConnectNetClients | ||
) |
Constructor. Connecting the client to a particular server.
clientName_ | The client name, which will initiate a server connection. |
serverName | The server to connect to. |
monitorPorts | If true, then monitor changes to the prots and connections. |
autoConnectNetClientsIn | If true, autoconnect network clients. |
Definition at line 217 of file JackPortMonitor.C.
JackPortMonitor::JackPortMonitor | ( | JackBase & | jb | ) |
This constructor does no setup nor port monitoring. No connections to servers or port monitoring are setup.
jb | The instance of a JackBase object to |
Definition at line 221 of file JackPortMonitor.C.
|
inlinevirtual |
Destructor.
Definition at line 265 of file JackPortMonitor.H.
|
protectedvirtual |
Find net client's ports and autoconnect them to system ports.
Definition at line 55 of file JackPortMonitor.C.
|
privatevirtual |
Given a list of ports, associate each port with the client it belongs to. If the client doesn't exist, then create the client.
ports | The vector of port ids to associate. |
Definition at line 115 of file JackPortMonitor.C.
|
inlineprivatevirtual |
Connect to the server This starts the server and sets up the process callback/arg to use.
clientName_ | The name of the client to use |
Reimplemented from JackBase.
Definition at line 109 of file JackPortMonitor.H.
|
privatevirtual |
Connect to the server. This starts the server and sets up the process callback/arg to use. When the client starts running and is set, reset all known client's client pointers.
clientName_ | The name of the client to use |
serverName | The name of the server to use |
Reimplemented from JackBase.
Definition at line 48 of file JackPortMonitor.C.
void JackPortMonitor::connectPortConnectCallback | ( | void | ) |
Connect the jackPortConnected method for callback. This can be done automatically at class construction time.
Definition at line 110 of file JackPortMonitor.C.
|
private |
Connect callbacks to execute when ports change in any way.
Definition at line 91 of file JackPortMonitor.C.
void JackPortMonitor::connectPortRegistrationCallback | ( | void | ) |
Connect the jackPortRegistered method for callback. This can be done automatically at class construction time.
Definition at line 105 of file JackPortMonitor.C.
void JackPortMonitor::connectPortRenameCallback | ( | void | ) |
Connect the jackPortRenamed method for callback. This can be done automatically at class construction time.
Definition at line 100 of file JackPortMonitor.C.
|
privatevirtual |
Stop the client running. When the client stops running and is set to NULL, reset all known client's client pointers.
Reimplemented from JackBase.
Definition at line 41 of file JackPortMonitor.C.
|
private |
Common intialiser.
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
Definition at line 19 of file JackPortMonitor.C.
|
private |
Common intialiser.
monitorPorts | True if port monitoring callbacks are connected, false and ports aren't monitored. |
autoConnectNetClientsIn | If true, autoconnect network clients. |
Definition at line 23 of file JackPortMonitor.C.
|
inlinestaticprivate |
Static callback to handle port connections and disconnections.
a | A port (dis)connected |
b | A port (dis)connected |
connect | 0 for connection removed, connection made otherwise |
arg | The pointer to the instance of this class for which the callback was connected. |
Definition at line 57 of file JackPortMonitor.H.
|
inlineprotectedvirtual |
Method to handle the occasion where ports were connected or disconnected.
a | A port (dis)connected |
b | A port (dis)connected |
connect | 0 for connection removed, connection made otherwise |
Reimplemented in JackPortMonitorGui.
Definition at line 166 of file JackPortMonitor.H.
|
inlineprotectedvirtual |
Method to handle to handle port registration or deregistration.
port | The port which was (de)registered. |
reg | Zero if the port is deregistered, otherwise registration. |
Reimplemented in JackPortMonitorGui.
Definition at line 175 of file JackPortMonitor.H.
|
inlinestaticprivate |
Static callback to handle port registration or deregistration.
port | The port which was (de)registered. |
reg | Zero if the port is deregistered, otherwise registration. |
arg | The pointer to the instance of this class for which the callback was connected. |
Definition at line 67 of file JackPortMonitor.H.
|
inlinestaticprivate |
Static callback to handle port renaming.
port | The port which was renamed. |
oldName | The original name of the port. |
newName | The new name of the port. |
arg | The pointer to the instance of this class for which the callback was connected. |
Definition at line 78 of file JackPortMonitor.H.
|
inlineprotectedvirtual |
Method to handle port renaming.
port | The port which was renamed. |
oldName | The original name of the port. |
newName | The new name of the port. |
Reimplemented in JackPortMonitorGui.
Definition at line 193 of file JackPortMonitor.H.
|
virtual |
Print ports and clients. On a client by client basis.
os | The output stream to print to. |
Reimplemented from JackBase.
Definition at line 223 of file JackPortMonitor.C.
|
protectedvirtual |
Find all input and output ports which aren't already in the port list.
Reimplemented from JackBase.
Reimplemented in JackPortMonitorGui.
Definition at line 174 of file JackPortMonitor.C.
|
private |
Resynchronise either input or output ports. Find all physical ports first and then other ports. Using these ports, rebuild the client objects, breaking down ports to which client they belong to and whether they belong to the input or output set for that client.
flags | Either JackPortIsInput or JackPortIsOutput, indicating whether we are looking for input or output ports. |
Definition at line 140 of file JackPortMonitor.C.
|
protectedvirtual |
Find all input and output ports which aren't already in the port list.
Reimplemented from JackBase.
Reimplemented in JackPortMonitorGui.
Definition at line 158 of file JackPortMonitor.C.
|
privatevirtual |
This threaded method waits for a signal to attempt to autoconnect netjack ports to the system ports.
Implements ThreadedMethod.
Definition at line 81 of file JackPortMonitor.C.
|
protected |
When true, autoconnect networked client's ports to the system ports.
Definition at line 147 of file JackPortMonitor.H.
|
protected |
A vector of clients and their ports both ids and names.
Definition at line 145 of file JackPortMonitor.H.
GTK+ IOStream
Beta
|