Skip to content

Draft: RFC: pipewire: properties: introduce `pw_properties_move()`

Barnabás Pőcze requested to merge pobrn/pipewire:pw_props_move into master

A recurring pattern that appears in multiple protocol-pulse modules is the following (or similar):

value = pw_properties_get(A, keyA);
if (value != NULL) {
	pw_properties_set(B, keyB, value);
	pw_properties_set(A, keyA, NULL);
}
else {
	pw_properties_set(B, keyB, defaultForKeyB);
}

Introduce pw_properties_move() to encapsulate this pattern. pw_properties_rename() is also introduced, but it is not made part of the public API yet.

See the commit messages for more detailed description.

Edited by Barnabás Pőcze

Merge request reports