summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e5f02e0)
This adds the new flag need_periodic_header to struct fec_client_parms. It is
true for the UDP transport and false for the DCCP transport.
vss checks this flag in need_audio_header() and does not send the header
periodically if the flag is false.
#include <dirent.h>
#include <openssl/rc4.h>
#include <osl.h>
#include <dirent.h>
#include <openssl/rc4.h>
#include <osl.h>
#include "para.h"
#include "error.h"
#include "para.h"
#include "error.h"
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->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->fcp.need_periodic_header = false;
dfc->fc = vss_add_fec_client(sc, &dfc->fcp);
}
dfc->fc = vss_add_fec_client(sc, &dfc->fcp);
}
#include <sys/types.h>
#include <dirent.h>
#include <osl.h>
#include <sys/types.h>
#include <dirent.h>
#include <osl.h>
#include "para.h"
#include "error.h"
#include "para.h"
#include "error.h"
uint8_t slices_per_group;
/** Number of slices minus number of redundant slices. */
uint8_t data_slices_per_group;
uint8_t slices_per_group;
/** Number of slices minus number of redundant slices. */
uint8_t data_slices_per_group;
+ /** Whether the header must be sent periodically. */
+ bool need_periodic_header;
/**
* Transport-layer initialisation for FEC support.
*
/**
* Transport-layer initialisation for FEC support.
*
#include <openssl/rc4.h>
#include <regex.h>
#include <osl.h>
#include <openssl/rc4.h>
#include <regex.h>
#include <osl.h>
#include "para.h"
#include "error.h"
#include "para.h"
#include "error.h"
#include <netinet/udp.h>
#include <net/if.h>
#include <osl.h>
#include <netinet/udp.h>
#include <net/if.h>
#include <osl.h>
#include "server.cmdline.h"
#include "para.h"
#include "server.cmdline.h"
#include "para.h"
ut->fcp.data_slices_per_group = scd->data_slices_per_group;
ut->fcp.init_fec = udp_init_fec;
ut->fcp.send_fec = udp_send_fec;
ut->fcp.data_slices_per_group = scd->data_slices_per_group;
ut->fcp.init_fec = udp_init_fec;
ut->fcp.send_fec = udp_send_fec;
+ ut->fcp.need_periodic_header = true;
sc->private_data = ut;
sc->fd = -1;
sc->private_data = ut;
sc->fd = -1;
return false;
if (vsst->header_len == 0)
return false;
return false;
if (vsst->header_len == 0)
return false;
- if (fc->group.num && tv_diff(&fc->next_header_time, now, NULL) > 0)
- return false;
+ if (fc->group.num > 0) {
+ if (!fc->fcp->need_periodic_header)
+ return false;
+ if (tv_diff(&fc->next_header_time, now, NULL) > 0)
+ return false;
+ }
tv_add(now, &vsst->header_interval, &fc->next_header_time);
return true;
}
tv_add(now, &vsst->header_interval, &fc->next_header_time);
return true;
}