}
PARA_INFO_LOG("current MPS = %d bytes\n", mps);
assert(mps > 0);
+ if (conf.dccp_max_slice_size_arg > 0)
+ mps = PARA_MIN(mps, conf.dccp_max_slice_size_arg);
return mps;
}
}
dfc = para_calloc(sizeof(*dfc));
sc->private_data = dfc;
- dfc->fcp.slices_per_group = 4;
- dfc->fcp.data_slices_per_group = 3;
+ dfc->fcp.data_slices_per_group = conf.dccp_data_slices_per_group_arg;
+ dfc->fcp.slices_per_group = conf.dccp_slices_per_group_arg;
dfc->fcp.init_fec = dccp_init_fec;
dfc->fcp.send_fec = dccp_send_fec;
dfc->fc = vss_add_fec_client(sc, &dfc->fcp);
*/
void dccp_send_init(struct sender *s)
{
- int ret;
+ int ret, k, n;
s->info = dccp_info;
s->send = NULL;
s->client_cmds[SENDER_ADD] = NULL;
s->client_cmds[SENDER_DELETE] = NULL;
+ k = conf.dccp_data_slices_per_group_arg;
+ n = conf.dccp_slices_per_group_arg;
+
+ if (k <= 0 || n <= 0 || k >= n) {
+ PARA_WARNING_LOG("invalid FEC parameters, using defaults\n");
+ conf.dccp_data_slices_per_group_arg = 3;
+ conf.dccp_slices_per_group_arg = 4;
+ }
+
init_sender_status(dss, conf.dccp_access_arg, conf.dccp_access_given,
conf.dccp_port_arg, conf.dccp_max_clients_arg,
conf.dccp_default_deny_given);
See http_max_clients for details.
"
+option "dccp_max_slice_size" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"Upper bound for the FEC slice size"
+int typestr = "size"
+default = "0"
+details = "
+ If this value is non-positive (the default) the dccp sender
+ uses the maximum packet size (MPS) of the connection as the
+ slice size. The MPS is a network parameter and depends on
+ the path maximum transmission unit (path MTU) of an incoming
+ connection, i.e. on the largest packet size that can be
+ transmitted without causing fragmentation.
+
+ This option allows to use a value less than the MPS in order
+ to fine-tune application performance. Values greater than
+ the MPS of an incoming connection can not be set.
+"
+
+option "dccp_data_slices_per_group" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"The number of non-redundant slices per FEC group"
+int typestr = "num"
+default = "3"
+details = "
+ This determines the number of slices in each FEC group that are
+ necessary to decode the group. The given number must be smaller
+ than the value of the dccp_slices_per_group option below.
+
+ Note that the duration of a FEC group is proportional to the
+ product dccp_max_slice_size * dccp_data_slices_per_group.
+"
+
+option "dccp_slices_per_group" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"The total number of slices per FEC group"
+int typestr = "num"
+default = "4"
+details = "
+ This value must be larger than the value given for above
+ dccp_data_slices_per_group above. The difference being the
+ number of redundant slices per group, i.e. the number of
+ data packets that may be lost without causing interruptions
+ of the resulting audio stream.
+
+ Increase this value if for lossy networks.
+"
+
####################
section "udp sender"
####################