[pulseaudio-discuss] [PATCH] added two new commands to native API to control the combine sink slaves after the combine sink has been created

Tanu Kaskinen tanuk at iki.fi
Tue Jan 10 22:15:33 UTC 2017


Thanks for the patch!

On Thu, 2017-01-05 at 20:13 +0100, Steffen Pfendtner wrote:
> Subject: [PATCH] added two new commands to native API to control the combine sink slaves after the combine sink has been created

There's a misunderstanding: you edited the command line interface, not
the native protocol. Applications use libpulse, which implements the
native protocol, so that's where the client interface should be added.
The command line interface is used by pacmd and the startup script
interpreter. If you already integrated this feature in pulseaudio-dlna, 
I guess you run pacmd commands from pulseaudio-dlna?

We have two similar tools: pacmd and pactl. Unlike pacmd, pactl is a
regular client that uses libpulse to interact with the server. It's
pretty pointless to have two tools that do the same thing, so I hope we
can get rid of pacmd some day. pacmd doesn't work over the network, and
also doesn't work when pulseaudio runs in the system mode.

You can add this functionality in the command line interface if you
really want to, but if you do that, you have to add it to pactl as
well, because I don't want new features in pacmd that are not supported
by pactl. Adding the functionality to pactl is highly desirable even if
you don't add the functionality to the command line interface, though.

Assuming that the API is added to the "core" instead as a protocol
extension (see my previous mails: [1][2][3]), you'll need to add new
commands that are sent from src/pulse/introspect.c and handled in
src/pulsecore/protocol-native.c. I would suggest adding
src/pulsecore/combine-sink.[ch] that has pa_combine_sink_add_output()
and pa_combine_sink_remove_output() along with anything else protocol-
native.c needs for dealing with the new commands. The API shouldn't be
in sink.h, because that's for common sink functionality, while this API
is only for one specific sink implementation.

[1] https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-December/027234.html
[2] https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-December/027235.html
[3] https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-December/027236.html

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list