mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
copy relevant props
This commit is contained in:
parent
2f7d2a6668
commit
cec3130c77
1 changed files with 22 additions and 0 deletions
|
|
@ -2197,6 +2197,22 @@ static void copy_props(struct impl *impl, struct pw_properties *props, const cha
|
|||
}
|
||||
}
|
||||
|
||||
static void copy_props_control(struct impl *impl, struct pw_properties *props, const char *key)
|
||||
{
|
||||
const char *str;
|
||||
if ((str = pw_properties_get(props, key)) != NULL) {
|
||||
if (impl->control_stream_active) {
|
||||
if (pw_properties_get(impl->control_props, key) == NULL)
|
||||
pw_properties_set(impl->control_props, key, str);
|
||||
}
|
||||
|
||||
if (impl->feedback_stream_active) {
|
||||
if (pw_properties_get(impl->feedback_props, key) == NULL)
|
||||
pw_properties_set(impl->feedback_props, key, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
||||
{
|
||||
|
|
@ -2277,6 +2293,12 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
copy_props(impl, props, PW_KEY_MEDIA_NAME);
|
||||
copy_props(impl, props, "resample.prefill");
|
||||
|
||||
copy_props_control(impl, props, PW_KEY_NODE_DESCRIPTION);
|
||||
copy_props_control(impl, props, PW_KEY_NODE_GROUP);
|
||||
copy_props_control(impl, props, PW_KEY_NODE_LINK_GROUP);
|
||||
copy_props_control(impl, props, PW_KEY_NODE_VIRTUAL);
|
||||
copy_props_control(impl, props, PW_KEY_MEDIA_NAME);
|
||||
|
||||
parse_audio_info(impl->capture_props, &impl->capture_info);
|
||||
parse_audio_info(impl->playback_props, &impl->playback_info);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue