copy relevant props

This commit is contained in:
Frank Krick 2025-08-28 19:16:11 -04:00
parent 2f7d2a6668
commit cec3130c77

View file

@ -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 SPA_EXPORT
int pipewire__module_init(struct pw_impl_module *module, const char *args) 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, PW_KEY_MEDIA_NAME);
copy_props(impl, props, "resample.prefill"); 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->capture_props, &impl->capture_info);
parse_audio_info(impl->playback_props, &impl->playback_info); parse_audio_info(impl->playback_props, &impl->playback_info);