87 float fract_lost, tmp;
88 uint32_t ntp_sec, ntp_frac, now;
102 if (fract_lost > 20) {
103 printf(
"Receiver 0x%08x reports excessive congestion\n",
112 if ((now < r->lsr) || (now - r->
lsr < r->
dlsr)) {
117 debug_msg(
"Bogus RTT from 0x%08x ignored\n",
120 tmp = ((float)(now - r->
lsr - r->
dlsr)) / 65536.0;
126 int packet_count = 1;
131 if(packet_count < 1) packet_count = 1;
134 "RR of 0x%08x: RTT=%d usec, loss %.2f%% (of %d pkts)\n",
135 r->
ssrc,
RTT, fract_lost, packet_count);
151 (
"Added previously unseen participant 0x%08" PRIx32
" due to receipt of SDES\n",
157 sdes_item = calloc(d->
length + 1, 1);
207 (
"Ignored unknown SDES item (type=0x%02" PRIx32
") from 0x%08" PRIx32
"\n",
222 pckt_rtp->data_len + 40);
223 if (pckt_rtp->data_len > 0) {
245 if (strncmp(pckt_app->
name,
"RTT_", 4) == 0) {
246 assert(pckt_app->
length == 3);
247 assert(pckt_app->
subtype == 0);
255 struct pdb_e *pdb_item = NULL;
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_INFO
normal reporting
#define debug_msg(...)
#define debug_msg(...) log_msg(LOG_LEVEL_DEBUG, "[pid/%d +%d %s] ", getpid(), LINE,...
void ntp64_time(uint32_t *ntp_sec, uint32_t *ntp_frac)
#define ntp64_to_ntp32(ntp_sec, ntp_frac)
void pbuf_insert(struct pbuf *playout_buf, rtp_packet *pkt)
int pdb_add(struct pdb *db, uint32_t ssrc)
void pdb_destroy_item(struct pdb_e *item)
int pdb_remove(struct pdb *db, uint32_t ssrc, struct pdb_e **item)
struct pdb_e * pdb_get(struct pdb *db, uint32_t ssrc)
const rtcp_rr * rtp_get_rr(struct rtp *session, uint32_t reporter, uint32_t reportee)
uint32_t rtp_my_ssrc(struct rtp *session)
uint8_t * rtp_get_userdata(struct rtp *session)
void rtp_recv_callback(struct rtp *session, rtp_event *e)
static void process_sdes(struct pdb *participants, uint32_t ssrc, rtcp_sdes_item *d)
static void process_rr(struct rtp *session, rtp_event *e)
void tfrc_recv_data(struct tfrc *state, time_ns_t curr_time, uint16_t seqnum, unsigned length)
static time_ns_t get_time_in_ns()