mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
move PIPEWIRE_PROPS to stream and filter
Make all streams and filters handle PIPEWIRE_PROPS. The order for applying stream/filter properties is: 1) application provided properties. 2) generic config. 3) match rules. 4) environment variables (PIPEWIRE_PROPS, ...) from generic to more specific. 5) defaults.
This commit is contained in:
parent
5a023c8c84
commit
61d318125e
5 changed files with 51 additions and 54 deletions
|
|
@ -1426,7 +1426,6 @@ static int connect_stream(struct file *file)
|
|||
{
|
||||
int res;
|
||||
struct global *g = file->node;
|
||||
const char *str;
|
||||
struct timespec abstime;
|
||||
const char *error = NULL;
|
||||
uint8_t buffer[1024];
|
||||
|
|
@ -1442,11 +1441,7 @@ static int connect_stream(struct file *file)
|
|||
|
||||
disconnect_stream(file);
|
||||
|
||||
props = NULL;
|
||||
if ((str = getenv("PIPEWIRE_PROPS")) != NULL)
|
||||
props = pw_properties_new_string(str);
|
||||
if (props == NULL)
|
||||
props = pw_properties_new(NULL, NULL);
|
||||
props = pw_properties_new(NULL, NULL);
|
||||
if (props == NULL) {
|
||||
res = -errno;
|
||||
goto exit;
|
||||
|
|
@ -1470,6 +1465,7 @@ static int connect_stream(struct file *file)
|
|||
&file->stream_listener,
|
||||
&stream_events, file);
|
||||
|
||||
|
||||
file->error = 0;
|
||||
|
||||
pw_stream_connect(file->stream,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue