mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
stream: pass properties to context_new
Whe using pw_*_new_simple(), pass the properties to the automatically created context as well so that we can configure it. This makes it possible to, for example, load the client-rf.conf using the simple API as well.
This commit is contained in:
parent
f14572648a
commit
a336aabe43
3 changed files with 3 additions and 2 deletions
|
|
@ -143,6 +143,7 @@ int main(int argc, char *argv[])
|
|||
* the data.
|
||||
*/
|
||||
props = pw_properties_new(PW_KEY_MEDIA_TYPE, "Audio",
|
||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
||||
PW_KEY_MEDIA_CATEGORY, "Capture",
|
||||
PW_KEY_MEDIA_ROLE, "Music",
|
||||
NULL);
|
||||
|
|
|
|||
|
|
@ -1334,7 +1334,7 @@ pw_filter_new_simple(struct pw_loop *loop,
|
|||
if (props == NULL)
|
||||
return NULL;
|
||||
|
||||
context = pw_context_new(loop, NULL, 0);
|
||||
context = pw_context_new(loop, pw_properties_copy(props), 0);
|
||||
if (context == NULL) {
|
||||
res = -errno;
|
||||
goto error_cleanup;
|
||||
|
|
|
|||
|
|
@ -1595,7 +1595,7 @@ pw_stream_new_simple(struct pw_loop *loop,
|
|||
if (props == NULL)
|
||||
return NULL;
|
||||
|
||||
context = pw_context_new(loop, NULL, 0);
|
||||
context = pw_context_new(loop, pw_properties_copy(props), 0);
|
||||
if (context == NULL) {
|
||||
res = -errno;
|
||||
goto error_cleanup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue