[pulseaudio-discuss] Custom client-server communication
gmane at colin.guthr.ie
Tue Oct 19 16:17:32 PDT 2010
'Twas brillig, and tarantism at 19/10/10 23:06 did gyre and gimble:
> Hi Colin,
> Thanks for your quick response.
> On Tue, 2010-10-19 at 22:46 +0100, Colin Guthrie wrote:
>> 'Twas brillig, and tarantism at 19/10/10 22:16 did gyre and gimble:
>>> I'd like to pass custom messages from the client to this module. I can
>>> see how to pass messages on the server side to a pa_msgobject but can't
>>> see how to do this from client to server.
>> There is sadly no easy way to do this generically.
>> You can build protocol extensions but the "core" of PA needs to have
>> some degree of knowledge of this.
>> Some modules do create protocol extensions tho'. e.g. see
>> module-device-manager (not present until 0.9.21) and
>> module-stream-restore (which should be available under 0.9.15) to see
>> how this is done.
> I'd spotted the PA_COMMAND_EXTENSION but in 0.9.15, this (from
> context.c) kinda precludes general usage:
> void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t
> if (!strcmp(name, "module-stream-restore"))
> pa_ext_stream_restore_command(c, tag, t);
> pa_log(_("Received message for unknown extension '%s'"), name);
> What are my options? I can distribute a pa module but not a completely
> new pa core!
There are likely no ways to piggy back onto the existing protocol for
this kind of hacking sadly. The same mechanism is still used in latest
PA, but in git master there is a dbus based protocol which I'd wager
would be easier to extend.
As it stands now, I do grant you that the modifications to the core are
highly undesirable. I may try and factor this out but it doesn't really
help you just now.
I guess you'll have to use some kind of independent IPC to allow a given
app to talk to your module.
Tribalogic Limited [http://www.tribalogic.net/]
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss