sink-input, source-output: rework property setting

System Internals / PulseAudio - Tanu Kaskinen [iki.fi] - 25 April 2016 05:50 UTC

pa_sink_input_update_proplist() is inconvenient in many cases, because it requires allocating a new proplist, even if the goal is to just set one property. pa_sink_input_update_properties also can't properly log property changes, because it has to assume that all values are arbitrary binary data.

This patch adds pa_sink_input_set_property() for setting a string
value for a single property, and pa_sink_input_set_property_arbitrary() for setting a binary value for a single property. pa_sink_input_update_properties() is reimplemented as a wrapper around pa_sink_input_set_property_arbitrary() to centralize logging and sending change notifications.

(The above mentions only sink input functions for brevity, but the same changes are implemented for source outputs too.)

3e7e901 sink-input, source-output: rework property setting
src/pulsecore/sink-input.c | 117 +++++++++++++++++++++++++++++++++++++++--
src/pulsecore/sink-input.h | 2 +
src/pulsecore/source-output.c | 117 +++++++++++++++++++++++++++++++++++++++--
src/pulsecore/source-output.h | 2 +
4 files changed, 228 insertions(+), 10 deletions(-)

Upstream: cgit.freedesktop.org


  • Share