mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
jack: don't abuse the node.passive property
PIPEWIRE_LINK_PASSIVE is to let this client make passive links, this doesn't mean that the client wants passive links to its own node in all cases so don't use the node.passive for that. Instead use a new jack.passive-links. This can then also be set per client to make it make passive links.
This commit is contained in:
parent
40f43d4715
commit
b2ba946625
1 changed files with 4 additions and 4 deletions
|
|
@ -384,6 +384,7 @@ struct client {
|
||||||
int rt_max;
|
int rt_max;
|
||||||
unsigned int fix_midi_events:1;
|
unsigned int fix_midi_events:1;
|
||||||
unsigned int global_buffer_size:1;
|
unsigned int global_buffer_size:1;
|
||||||
|
unsigned int passive_links:1;
|
||||||
char filter_char;
|
char filter_char;
|
||||||
|
|
||||||
jack_position_t jack_position;
|
jack_position_t jack_position;
|
||||||
|
|
@ -3406,7 +3407,7 @@ jack_client_t * jack_client_open (const char *client_name,
|
||||||
if ((str = getenv("PIPEWIRE_RATE")) != NULL)
|
if ((str = getenv("PIPEWIRE_RATE")) != NULL)
|
||||||
pw_properties_set(client->props, PW_KEY_NODE_RATE, str);
|
pw_properties_set(client->props, PW_KEY_NODE_RATE, str);
|
||||||
if ((str = getenv("PIPEWIRE_LINK_PASSIVE")) != NULL)
|
if ((str = getenv("PIPEWIRE_LINK_PASSIVE")) != NULL)
|
||||||
pw_properties_set(client->props, PW_KEY_NODE_PASSIVE, str);
|
pw_properties_set(client->props, "jack.passive-links", str);
|
||||||
|
|
||||||
if ((str = pw_properties_get(client->props, PW_KEY_NODE_LATENCY)) != NULL) {
|
if ((str = pw_properties_get(client->props, PW_KEY_NODE_LATENCY)) != NULL) {
|
||||||
uint32_t num, denom;
|
uint32_t num, denom;
|
||||||
|
|
@ -3463,6 +3464,7 @@ jack_client_t * jack_client_open (const char *client_name,
|
||||||
client->merge_monitor = pw_properties_get_bool(client->props, "jack.merge-monitor", true);
|
client->merge_monitor = pw_properties_get_bool(client->props, "jack.merge-monitor", true);
|
||||||
client->short_name = pw_properties_get_bool(client->props, "jack.short-name", false);
|
client->short_name = pw_properties_get_bool(client->props, "jack.short-name", false);
|
||||||
client->filter_name = pw_properties_get_bool(client->props, "jack.filter-name", false);
|
client->filter_name = pw_properties_get_bool(client->props, "jack.filter-name", false);
|
||||||
|
client->passive_links = pw_properties_get_bool(client->props, "jack.passive-links", false);
|
||||||
client->filter_char = ' ';
|
client->filter_char = ' ';
|
||||||
if ((str = pw_properties_get(client->props, "jack.filter-char")) != NULL && str[0] != '\0')
|
if ((str = pw_properties_get(client->props, "jack.filter-char")) != NULL && str[0] != '\0')
|
||||||
client->filter_char = str[0];
|
client->filter_char = str[0];
|
||||||
|
|
@ -5155,7 +5157,6 @@ int jack_connect (jack_client_t *client,
|
||||||
struct pw_proxy *proxy;
|
struct pw_proxy *proxy;
|
||||||
struct spa_hook listener;
|
struct spa_hook listener;
|
||||||
char val[4][16];
|
char val[4][16];
|
||||||
const char *str;
|
|
||||||
int res, link_res = 0;
|
int res, link_res = 0;
|
||||||
|
|
||||||
spa_return_val_if_fail(c != NULL, EINVAL);
|
spa_return_val_if_fail(c != NULL, EINVAL);
|
||||||
|
|
@ -5190,8 +5191,7 @@ int jack_connect (jack_client_t *client,
|
||||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_NODE, val[2]);
|
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_NODE, val[2]);
|
||||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_PORT, val[3]);
|
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_PORT, val[3]);
|
||||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_OBJECT_LINGER, "true");
|
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_OBJECT_LINGER, "true");
|
||||||
if ((str = pw_properties_get(c->props, PW_KEY_NODE_PASSIVE)) != NULL &&
|
if (c->passive_links)
|
||||||
pw_properties_parse_bool(str))
|
|
||||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_PASSIVE, "true");
|
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_PASSIVE, "true");
|
||||||
|
|
||||||
proxy = pw_core_create_object(c->core,
|
proxy = pw_core_create_object(c->core,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue