mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pipewire: module-roc-{sink,source}: deduplicate protocol selection
This commit is contained in:
parent
333fd8d2ae
commit
6d8a31a3e4
3 changed files with 21 additions and 30 deletions
|
|
@ -282,21 +282,7 @@ static int roc_sink_setup(struct module_roc_sink_data *data)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (data->fec_code) {
|
||||
case ROC_FEC_ENCODING_DEFAULT:
|
||||
case ROC_FEC_ENCODING_RS8M:
|
||||
audio_proto = ROC_PROTO_RTP_RS8M_SOURCE;
|
||||
repair_proto = ROC_PROTO_RS8M_REPAIR;
|
||||
break;
|
||||
case ROC_FEC_ENCODING_LDPC_STAIRCASE:
|
||||
audio_proto = ROC_PROTO_RTP_LDPC_SOURCE;
|
||||
repair_proto = ROC_PROTO_LDPC_REPAIR;
|
||||
break;
|
||||
default:
|
||||
audio_proto = ROC_PROTO_RTP;
|
||||
repair_proto = 0;
|
||||
break;
|
||||
}
|
||||
pw_roc_fec_encoding_to_proto(data->fec_code, &audio_proto, &repair_proto);
|
||||
|
||||
res = pw_roc_create_endpoint(&data->remote_source_addr, audio_proto, data->remote_ip, data->remote_source_port);
|
||||
if (res < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue