mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
roc: add fec_code option
Add fec_code option. Fix resample.profile parsing.
This commit is contained in:
parent
1e244b4ebd
commit
09ea37cfdf
5 changed files with 152 additions and 78 deletions
|
|
@ -116,6 +116,7 @@ static const struct spa_dict_item module_roc_sink_input_info[] = {
|
|||
{ PW_KEY_MODULE_USAGE, "sink=<name for the sink> "
|
||||
"sink_input_properties=<properties for the sink_input> "
|
||||
"resampler_profile=<empty>|disable|high|medium|low "
|
||||
"fec_code=<empty>|disable|rs8m|ldpc "
|
||||
"sess_latency_msec=<target network latency in milliseconds> "
|
||||
"local_ip=<local receiver ip> "
|
||||
"local_source_port=<local receiver port for source packets> "
|
||||
|
|
@ -178,6 +179,11 @@ struct module *create_module_roc_sink_input(struct impl *impl, const char *argum
|
|||
pw_properties_set(props, "resampler_profile", NULL);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "fec_code")) != NULL) {
|
||||
pw_properties_set(roc_props, "fec.code", str);
|
||||
pw_properties_set(props, "fec_code", NULL);
|
||||
}
|
||||
|
||||
module = module_new(impl, sizeof(*d));
|
||||
if (module == NULL) {
|
||||
res = -errno;
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@
|
|||
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
|
||||
#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_sink_data {
|
||||
struct module *module;
|
||||
|
||||
|
|
@ -119,6 +115,7 @@ static const struct spa_dict_item module_roc_sink_info[] = {
|
|||
{ PW_KEY_MODULE_DESCRIPTION, "roc sink" },
|
||||
{ PW_KEY_MODULE_USAGE, "sink_name=<name for the sink> "
|
||||
"sink_properties=<properties for the sink> "
|
||||
"fec_code=<empty>|disable|rs8m|ldpc "
|
||||
"local_ip=<local sender ip> "
|
||||
"remote_ip=<remote receiver ip> "
|
||||
"remote_source_port=<remote receiver port for source packets> "
|
||||
|
|
@ -172,22 +169,20 @@ struct module *create_module_roc_sink(struct impl *impl, const char *argument)
|
|||
if ((str = pw_properties_get(props, "local_ip")) != NULL) {
|
||||
pw_properties_set(roc_props, "local.ip", str);
|
||||
pw_properties_set(props, "local_ip", NULL);
|
||||
} else {
|
||||
pw_properties_set(roc_props, "local.ip", ROC_DEFAULT_IP);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "remote_source_port")) != NULL) {
|
||||
pw_properties_set(roc_props, "remote.source.port", str);
|
||||
pw_properties_set(props, "remote_source_port", NULL);
|
||||
} else {
|
||||
pw_properties_set(roc_props, "remote.source.port", ROC_DEFAULT_SOURCE_PORT);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "remote_repair_port")) != NULL) {
|
||||
pw_properties_set(roc_props, "remote.repair.port", str);
|
||||
pw_properties_set(props, "remote_repair_port", NULL);
|
||||
} else {
|
||||
pw_properties_set(roc_props, "remote.repair.port", ROC_DEFAULT_REPAIR_PORT);
|
||||
}
|
||||
if ((str = pw_properties_get(props, "fec_code")) != NULL) {
|
||||
pw_properties_set(roc_props, "fec.code", str);
|
||||
pw_properties_set(props, "fec_code", NULL);
|
||||
}
|
||||
|
||||
module = module_new(impl, sizeof(*d));
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ static const struct spa_dict_item module_roc_source_info[] = {
|
|||
{ PW_KEY_MODULE_USAGE, "source_name=<name for the source> "
|
||||
"source_properties=<properties for the source> "
|
||||
"resampler_profile=<empty>|disable|high|medium|low "
|
||||
"fec_code=<empty>|disable|rs8m|ldpc "
|
||||
"sess_latency_msec=<target network latency in milliseconds> "
|
||||
"local_ip=<local receiver ip> "
|
||||
"local_source_port=<local receiver port for source packets> "
|
||||
|
|
@ -183,6 +184,11 @@ struct module *create_module_roc_source(struct impl *impl, const char *argument)
|
|||
pw_properties_set(props, "resampler_profile", NULL);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "fec_code")) != NULL) {
|
||||
pw_properties_set(roc_props, "fec.code", str);
|
||||
pw_properties_set(props, "fec_code", NULL);
|
||||
}
|
||||
|
||||
module = module_new(impl, sizeof(*d));
|
||||
if (module == NULL) {
|
||||
res = -errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue