module-roc-source: don't set defaults

Don't set defaults, the real roc-source will handle that. Especially,
don't set the remote port as the latency.

See #2331
This commit is contained in:
Wim Taymans 2022-04-25 15:14:50 +02:00
parent 277447d8f9
commit 037304ce70

View file

@ -35,10 +35,6 @@
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME); PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
#define PW_LOG_TOPIC_DEFAULT mod_topic #define PW_LOG_TOPIC_DEFAULT mod_topic
#define ROC_DEFAULT_IP "0.0.0.0"
#define ROC_DEFAULT_SOURCE_PORT "10001"
#define ROC_DEFAULT_REPAIR_PORT "10002"
struct module_roc_source_data { struct module_roc_source_data {
struct module *module; struct module *module;
@ -165,36 +161,26 @@ struct module *create_module_roc_source(struct impl *impl, const char *argument)
if ((str = pw_properties_get(props, "local_ip")) != NULL) { if ((str = pw_properties_get(props, "local_ip")) != NULL) {
pw_properties_set(roc_props, "local.ip", str); pw_properties_set(roc_props, "local.ip", str);
pw_properties_set(props, "local_ip", NULL); pw_properties_set(props, "local_ip", NULL);
} else {
pw_properties_set(roc_props, "local.ip", ROC_DEFAULT_IP);
} }
if ((str = pw_properties_get(props, "local_source_port")) != NULL) { if ((str = pw_properties_get(props, "local_source_port")) != NULL) {
pw_properties_set(roc_props, "local.source.port", str); pw_properties_set(roc_props, "local.source.port", str);
pw_properties_set(props, "local_source_port", NULL); pw_properties_set(props, "local_source_port", NULL);
} else {
pw_properties_set(roc_props, "local.source.port", ROC_DEFAULT_SOURCE_PORT);
} }
if ((str = pw_properties_get(props, "local_repair_port")) != NULL) { if ((str = pw_properties_get(props, "local_repair_port")) != NULL) {
pw_properties_set(roc_props, "local.repair.port", str); pw_properties_set(roc_props, "local.repair.port", str);
pw_properties_set(props, "local_repair_port", NULL); pw_properties_set(props, "local_repair_port", NULL);
} else {
pw_properties_set(roc_props, "local.repair.port", ROC_DEFAULT_REPAIR_PORT);
} }
if ((str = pw_properties_get(props, "sess_latency_msec")) != NULL) { if ((str = pw_properties_get(props, "sess_latency_msec")) != NULL) {
pw_properties_set(roc_props, "sess.latency.msec", str); pw_properties_set(roc_props, "sess.latency.msec", str);
pw_properties_set(props, "sess_latency_msec", NULL); pw_properties_set(props, "sess_latency_msec", NULL);
} else {
pw_properties_set(roc_props, "sess.latency.msec", ROC_DEFAULT_REPAIR_PORT);
} }
if ((str = pw_properties_get(props, "resampler_profile")) != NULL) { if ((str = pw_properties_get(props, "resampler_profile")) != NULL) {
pw_properties_set(roc_props, "resampler.profile", str); pw_properties_set(roc_props, "resampler.profile", str);
pw_properties_set(props, "resampler_profile", NULL); pw_properties_set(props, "resampler_profile", NULL);
} else {
pw_properties_set(roc_props, "resampler.profile", ROC_DEFAULT_REPAIR_PORT);
} }
module = module_new(impl, sizeof(*d)); module = module_new(impl, sizeof(*d));