20 init(monitorPorts,
false);
56 cout<<
"JackPortMonitor::autoConnectNetClientsPorts"<<endl;
58 vector<string> slavePorts;
65 vector<string> uniqueClientNames;
66 for (vector<string>::iterator pn=slavePorts.begin(); pn!=slavePorts.end(); ++pn) {
69 if (cn.size() && find(uniqueClientNames.begin(), uniqueClientNames.end(), cn.c_str()) == uniqueClientNames.end())
70 uniqueClientNames.push_back(cn);
74 for (vector<string>::iterator cn=uniqueClientNames.begin(); cn!=uniqueClientNames.end(); ++cn){
116 for (vector<jack_port_t *>::iterator
p=ports.begin();
p!=ports.end(); ++
p) {
118 vector<JackBaseWithPortNames *>::iterator kc;
141 vector<jack_port_t *> *portsIO;
148 vector<jack_port_t *> ports;
150 for (vector<jack_port_t *>::iterator
p=ports.begin();
p!=ports.end(); ++
p)
151 if(std::find(portsIO->begin(), portsIO->end(), *
p) == portsIO->end())
152 portsIO->push_back(*
p);
176 vector<JackBaseWithPortNames *>::iterator kc;
178 (*kc)->findInputConnections();
182 bool monitorPorts=
true;
191 init(monitorPorts, autoConnectNetClientsIn);
195 bool monitorPorts=
true;
204 init(monitorPorts, autoConnectNetClientsIn);
209 bool monitorPorts=
true;
218 init(monitorPorts, autoConnectNetClientsIn);
225 map<string, map<string, vector<string> > >::iterator
p;
229 p=(*kc)->inputPortNamesAndConnections.begin();
230 for (
int i=0; i<max((*kc)->inputPortNamesAndConnections.size(), (*kc)->outputPortNames.size()); i++) {
231 if ((*kc)->inputPortNamesAndConnections.size()>i) {
232 os<<
'\t'<<(*p).first<<
"\t\t";
236 if ((*kc)->outputPortNames.size()>i)
237 os<<(*kc)->outputPortNames[i]<<
'\n';
243 os<<
"\n=== Connections ===\n";
245 os<<(*kc)->getClientName()<<
":\n";
246 for (p=(*kc)->inputPortNamesAndConnections.begin(); p!=(*kc)->inputPortNamesAndConnections.end(); ++
p) {
247 os<<(*p).first<<
" ---> {";
248 map<string, vector<string> >::iterator pcs;
249 for (pcs=(*p).second.begin(); pcs!=(*p).second.end(); ++pcs) {
250 if (pcs!=(*p).second.begin())
252 os<<(*pcs).first<<
"(";
253 for (vector<string>::iterator pn=(*pcs).second.begin(); pn!=(*pcs).second.end(); ++pn) {
254 if (pn!=(*pcs).second.begin())
vector< string > outputPortNames
The output port names.
bool autoConnectNetClients
When true, autoconnect networked client's ports to the system ports.
virtual int disconnect(void)
string clientNameFromPort(jack_port_id_t p)
#define JACK_CLIENT_NULL_ERROR
client is null
virtual int connect(string clientName_)
string clientNameFromPortName(string fullPortName)
int getPortListAndCount(JackPortFlags flags, vector< jack_port_t *> *ports, const char *portNamePattern, const char *typeNamePattern)
#define JACK_PORT_CALLBACK_SETUP_ERROR
error when trying to connect the port monitoring callbacks
virtual int evaluateError(int errorNum)
virtual void print(ostream &os)
virtual int connect(string clientName_)
virtual void reSyncPorts(void)
string cn
The string to compare against.
virtual int disconnect(void)
#define NO_ERROR
There is no error.
static void jackPortConnectCallback(jack_port_id_t a, jack_port_id_t b, int connect, void *arg)
virtual int run(int priority=0)
virtual void breakDownPortsToClients(vector< jack_port_t *> &ports)
virtual void * threadMain(void)
void addInputPort(jack_port_t *inP)
void connectPortRenameCallback(void)
vector< JackBaseWithPortNames * > knownClients
A vector of clients and their ports both ids and names.
#define JACK_NETPORT_AUTOCONNECT_ERROR
error when trying to connect network ports automatically.
static void jackPortRegistrationCallback(jack_port_id_t port, int reg, void *arg)
virtual void reSyncPorts(void)
virtual void reSyncConnections(void)
jack_client_t * client
The jack client.
static void jackPortRenameCallback(jack_port_id_t port, const char *oldName, const char *newName, void *arg)
#define JACK_PORT_MONITOR_CLIENT_NAME
The name to give port monitoring clients.
vector< jack_port_t * > inputPorts
The input ports.
bool connect1To1
When true, then connections are made in a 1 to 1 manner. When False, then connections are made in an ...
virtual void autoConnectNetClientsPorts(void)
void connectPortRegistrationCallback(void)
void connectPortMonitoringCallbacks(void)
void setClient(jack_client_t *c)
#define JACK_ACTIVATE_ERROR
Couldn't activate the client with the server.
map< string, map< string, vector< string > > > inputPortNamesAndConnections
The input port names which map to a vector of the connected clients and each of their connected ports...
vector< jack_port_t * > outputPorts
The output ports.
int connectPorts(const string inName, const string outName)
virtual void setClientName(string cn)
void addOutputPort(jack_port_t *outP)
void connectPortConnectCallback(void)