mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
parent
6d081d5214
commit
163c365340
2 changed files with 28 additions and 2 deletions
|
|
@ -84,11 +84,24 @@ static int module_ladspa_sink_load(struct client *client, struct module *module)
|
||||||
fprintf(f, " type = ladspa ");
|
fprintf(f, " type = ladspa ");
|
||||||
fprintf(f, " plugin = \"%s\" ", plugin);
|
fprintf(f, " plugin = \"%s\" ", plugin);
|
||||||
fprintf(f, " label = \"%s\" ", label);
|
fprintf(f, " label = \"%s\" ", label);
|
||||||
|
if ((str = pw_properties_get(module->props, "control")) != NULL) {
|
||||||
|
size_t len;
|
||||||
|
const char *s, *state = NULL;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
fprintf(f, " control = {");
|
||||||
|
while ((s = pw_split_walk(str, ", ", &len, &state))) {
|
||||||
|
fprintf(f, " \"%d\" = %.*s", count, (int)len, s);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
fprintf(f, " }");
|
||||||
|
}
|
||||||
|
fprintf(f, " } ]");
|
||||||
if ((str = pw_properties_get(module->props, "inputs")) != NULL)
|
if ((str = pw_properties_get(module->props, "inputs")) != NULL)
|
||||||
fprintf(f, " inputs = [ %s ] ", str);
|
fprintf(f, " inputs = [ %s ] ", str);
|
||||||
if ((str = pw_properties_get(module->props, "outputs")) != NULL)
|
if ((str = pw_properties_get(module->props, "outputs")) != NULL)
|
||||||
fprintf(f, " outputs = [ %s ] ", str);
|
fprintf(f, " outputs = [ %s ] ", str);
|
||||||
fprintf(f, " } ] }");
|
fprintf(f, " }");
|
||||||
fprintf(f, " capture.props = {");
|
fprintf(f, " capture.props = {");
|
||||||
pw_properties_serialize_dict(f, &data->capture_props->dict, 0);
|
pw_properties_serialize_dict(f, &data->capture_props->dict, 0);
|
||||||
fprintf(f, " } playback.props = {");
|
fprintf(f, " } playback.props = {");
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,24 @@ static int module_ladspa_source_load(struct client *client, struct module *modul
|
||||||
fprintf(f, " type = ladspa ");
|
fprintf(f, " type = ladspa ");
|
||||||
fprintf(f, " plugin = \"%s\" ", plugin);
|
fprintf(f, " plugin = \"%s\" ", plugin);
|
||||||
fprintf(f, " label = \"%s\" ", label);
|
fprintf(f, " label = \"%s\" ", label);
|
||||||
|
if ((str = pw_properties_get(module->props, "control")) != NULL) {
|
||||||
|
size_t len;
|
||||||
|
const char *s, *state = NULL;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
fprintf(f, " control = {");
|
||||||
|
while ((s = pw_split_walk(str, ", ", &len, &state))) {
|
||||||
|
fprintf(f, " \"%d\" = %.*s", count, (int)len, s);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
fprintf(f, " }");
|
||||||
|
}
|
||||||
|
fprintf(f, " } ]");
|
||||||
if ((str = pw_properties_get(module->props, "inputs")) != NULL)
|
if ((str = pw_properties_get(module->props, "inputs")) != NULL)
|
||||||
fprintf(f, " inputs = [ %s ] ", str);
|
fprintf(f, " inputs = [ %s ] ", str);
|
||||||
if ((str = pw_properties_get(module->props, "outputs")) != NULL)
|
if ((str = pw_properties_get(module->props, "outputs")) != NULL)
|
||||||
fprintf(f, " outputs = [ %s ] ", str);
|
fprintf(f, " outputs = [ %s ] ", str);
|
||||||
fprintf(f, " } ] }");
|
fprintf(f, " }");
|
||||||
fprintf(f, " capture.props = {");
|
fprintf(f, " capture.props = {");
|
||||||
pw_properties_serialize_dict(f, &data->capture_props->dict, 0);
|
pw_properties_serialize_dict(f, &data->capture_props->dict, 0);
|
||||||
fprintf(f, " } playback.props = {");
|
fprintf(f, " } playback.props = {");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue