pulse-server: add stream_properties for RTP streams

This commit is contained in:
Wim Taymans 2025-06-18 12:29:39 +02:00
parent 54923bf5bd
commit b51755bc8b
2 changed files with 7 additions and 1 deletions

View file

@ -26,7 +26,8 @@
static const char *const pulse_module_options =
"sink=<name of the sink> "
"sap_address=<multicast address to listen on> "
"latency_msec=<latency in ms> ";
"latency_msec=<latency in ms> "
"stream_properties=<properties for the stream> ";
#define NAME "rtp-recv"
@ -141,6 +142,8 @@ static int module_rtp_recv_prepare(struct module * const module)
pw_properties_set(stream_props, PW_KEY_TARGET_OBJECT, str);
if ((str = pw_properties_get(props, "latency_msec")) != NULL)
pw_properties_set(stream_props, "sess.latency.msec", str);
if ((str = pw_properties_get(props, "stream_properties")) != NULL)
module_args_add_props(stream_props, str);
d->module = module;
d->stream_props = stream_props;

View file

@ -36,6 +36,7 @@ static const char *const pulse_module_options =
"ttl=<ttl value> "
"inhibit_auto_suspend=<always|never|only_with_non_monitor_sources> "
"stream_name=<name of the stream> "
"stream_properties=<properties for the stream> "
"enable_opus=<enable OPUS codec>";
#define NAME "rtp-send"
@ -199,6 +200,8 @@ static int module_rtp_send_prepare(struct module * const module)
pw_properties_set(stream_props, PW_KEY_TARGET_OBJECT, str);
}
}
if ((str = pw_properties_get(props, "stream_properties")) != NULL)
module_args_add_props(stream_props, str);
if (module_args_to_audioinfo_keys(module->impl, props,
"format", "rate", "channels", "channel_map", &info) < 0) {