Commit 1ec2775b authored by sletz's avatar sletz
Browse files

Correct JackEngine::NotifyGraphReorder, update JackDebugClient with latest API.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4192 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 84879fe8
......@@ -34,6 +34,10 @@ Valerio Pilo
Jackdmp changes log
---------------------------
2011-03-14 Stephane Letz <letz@grame.fr>
* Correct JackEngine::NotifyGraphReorder, update JackDebugClient with latest API.
2011-03-13 Stephane Letz <letz@grame.fr>
* Rework internal slave driver management, JackServerGlobals now handle same parameters as jackdmp.
......
......@@ -195,15 +195,15 @@ class SERVER_EXPORT JackClient : public JackClientInterface, public JackRunnable
// RT Thread
jack_nframes_t CycleWait();
void CycleSignal(int status);
int SetProcessThread(JackThreadCallback fun, void *arg);
virtual int SetProcessThread(JackThreadCallback fun, void *arg);
// Session API
virtual jack_session_command_t* SessionNotify(const char* target, jack_session_event_type_t type, const char* path);
virtual int SessionReply(jack_session_event_t* ev);
char* GetUUIDForClientName(const char* client_name);
char* GetClientNameByUUID(const char* uuid);
int ReserveClientName(const char* client_name, const char* uuid);
int ClientHasSessionCallback(const char* client_name);
virtual char* GetUUIDForClientName(const char* client_name);
virtual char* GetClientNameByUUID(const char* uuid);
virtual int ReserveClientName(const char* client_name, const char* uuid);
virtual int ClientHasSessionCallback(const char* client_name);
// JackRunnableInterface interface
bool Init();
......
......@@ -505,6 +505,54 @@ int JackDebugClient::SetPortRenameCallback(JackPortRenameCallback callback, void
return fClient->SetPortRenameCallback(callback, arg);
}
int JackDebugClient::SetSessionCallback(JackSessionCallback callback, void *arg)
{
CheckClient("SetSessionCallback");
return fClient->SetSessionCallback(callback, arg);
}
int JackDebugClient::SetLatencyCallback(JackLatencyCallback callback, void *arg)
{
CheckClient("SetLatencyCallback");
return fClient->SetLatencyCallback(callback, arg);
}
jack_session_command_t* JackDebugClient::SessionNotify(const char* target, jack_session_event_type_t type, const char* path)
{
CheckClient("SessionNotify");
return fClient->SessionNotify(target, type, path);
}
int JackDebugClient::SessionReply(jack_session_event_t* ev)
{
CheckClient("SessionReply");
return fClient->SessionReply(ev);
}
char* JackDebugClient::GetUUIDForClientName(const char* client_name)
{
CheckClient("GetUUIDForClientName");
return fClient->GetUUIDForClientName(client_name);
}
char* JackDebugClient::GetClientNameByUUID(const char* uuid)
{
CheckClient("GetClientNameByUUID");
return fClient->GetClientNameByUUID(uuid);
}
int JackDebugClient::ReserveClientName(const char* client_name, const char* uuid)
{
CheckClient("ReserveClientName");
return fClient->ReserveClientName(client_name, uuid);
}
int JackDebugClient::ClientHasSessionCallback(const char* client_name)
{
CheckClient("ClientHasSessionCallback");
return fClient->ClientHasSessionCallback(client_name);
}
JackClientControl* JackDebugClient::GetClientControl() const
{
CheckClient("GetClientControl");
......
......@@ -121,6 +121,8 @@ class SERVER_EXPORT JackDebugClient : public JackClient
int SetPortRegistrationCallback(JackPortRegistrationCallback callback, void* arg);
int SetPortConnectCallback(JackPortConnectCallback callback, void *arg);
int SetPortRenameCallback(JackPortRenameCallback callback, void *arg);
int SetSessionCallback(JackSessionCallback callback, void *arg);
int SetLatencyCallback(JackLatencyCallback callback, void *arg);
// Internal clients
char* GetInternalClientName(int ref);
......@@ -128,6 +130,14 @@ class SERVER_EXPORT JackDebugClient : public JackClient
int InternalClientLoad(const char* client_name, jack_options_t options, jack_status_t* status, jack_varargs_t* va);
void InternalClientUnload(int ref, jack_status_t* status);
// Session API
jack_session_command_t* SessionNotify(const char* target, jack_session_event_type_t type, const char* path);
int SessionReply(jack_session_event_t* ev);
char* GetUUIDForClientName(const char* client_name);
char* GetClientNameByUUID(const char* uuid);
int ReserveClientName(const char* client_name, const char* uuid);
int ClientHasSessionCallback(const char* client_name);
JackClientControl* GetClientControl() const;
void CheckClient(const char* function_name) const;
......
......@@ -223,7 +223,6 @@ int JackEngine::ComputeTotalLatencies()
*/
for (it = sorted.begin(); it != sorted.end(); it++) {
jack_log("Sorted %d", *it);
NotifyClient(*it, kLatencyCallback, true, "", 0, 0);
}
......@@ -322,8 +321,8 @@ void JackEngine::NotifyXRun(int refnum)
void JackEngine::NotifyGraphReorder()
{
ComputeTotalLatencies();
NotifyClients(kGraphOrderCallback, false, "", 0, 0);
ComputeTotalLatencies();
}
void JackEngine::NotifyBufferSize(jack_nframes_t buffer_size)
......@@ -762,7 +761,7 @@ int JackEngine::ClientDeactivate(int refnum)
fGraphManager->GetInputPorts(refnum, input_ports);
fGraphManager->GetOutputPorts(refnum, output_ports);
// First disconnect all ports and remove their JackPortIsActive state
// First disconnect all ports
for (int i = 0; (i < PORT_NUM_FOR_CLIENT) && (input_ports[i] != EMPTY); i++) {
PortDisconnect(refnum, input_ports[i], ALL_PORTS);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment