Hello,
I am writing a program that needs jack_get_client_pid (I don't want to
use dbus). I first tried to link with libjack, but that function is
"not implemented on library side". So, after interpreting some mails in
this list I tried linking with libjackserver, which worked.
Just to remind:
int jack_get_client_pid (const char *name);
I do not completely understood what is libjackserver compared to
libjack but what I do is that libjackserver defines a larger API and I
noticed differences in number/ownage of threads and initialisation of
the server. The best way to keep a client's code clean and simple seems
to be to link with libjack.
If I understood well, libjackserver is supposed to define functions in
'jack/control.h'.
What about jack_get_client_pid, then? jack_get_client_pid is declared
in 'jack.h'.
Moreover, it is declared in 'jack.h' for jack2 (line 225):
https://github.com/jackaudio/jack2/blob/master/common/jack/jack.h
but it is not in jack1's API:
https://github.com/jackaudio/headers/blob/07f1ecf1ce119d861ec631cb4a6a81a1a…
I thought about implementing that function in jack2 on library side.
I guess that this function is similar to, for instance,
jack_get_uuid_for_client_name, even if the process identifier is sort
of outside jack. Anyway, jack_get_client_pid seems a bit inconsistent
with the rest of the API. Why is it not declared (and renamed):
int jack_client_get_pid(jack_client_t* client, const char* name);
? Moreover, declared like that, the implementation on library side is
straightforward (because we have 'client'). But it's too late for the
API to change.
I actually implemented jack_client_get_pid (thus augmenting the API)
and can request for a 'to review with care' pull if you are interested.
bye