/** * Print RTP statistics. **/ void rtp_stats_display(const rtp_stats_t *stats, const char *header) { #ifndef WIN32 ortp_log(ORTP_MESSAGE, "oRTP-stats:\n %s :\n" " number of rtp packet sent=%lld\n" " number of rtp bytes sent=%lld bytes\n" " number of rtp packet received=%lld\n" " number of rtp bytes received=%lld bytes\n" " number of incoming rtp bytes successfully delivered to the application=%lld \n" " number of times the application queried a packet that didn't exist=%lld \n" " number of rtp packet lost=%lld\n" " number of rtp packets received too late=%lld\n" " number of bad formatted rtp packets=%lld\n" " number of packet discarded because of queue overflow=%lld\n", header, (long long)stats->packet_sent, (long long)stats->sent, (long long)stats->packet_recv, (long long)stats->hw_recv, (long long)stats->recv, (long long)stats->unavaillable, (long long)stats->cum_packet_loss, (long long)stats->outoftime, (long long)stats->bad, (long long)stats->discarded); #else ortp_log(ORTP_MESSAGE, "oRTP-stats:\n %s :\n" " number of rtp packet sent=%I64d\n" " number of rtp bytes sent=%I64d bytes\n" " number of rtp packet received=%I64d\n" " number of rtp bytes received=%I64d bytes\n" " number of incoming rtp bytes successfully delivered to the application=%I64d \n" " number of times the application queried a packet that didn't exist=%I64d \n" " number of rtp packet lost=%I64d\n" " number of rtp packets received too late=%I64d\n" " number of bad formatted rtp packets=%I64d\n" " number of packet discarded because of queue overflow=%I64d\n", header, (uint64_t)stats->packet_sent, (uint64_t)stats->sent, (uint64_t)stats->packet_recv, (uint64_t)stats->hw_recv, (uint64_t)stats->recv, (uint64_t)stats->unavaillable, (uint64_t) stats->cum_packet_loss, (uint64_t)stats->outoftime, (uint64_t)stats->bad, (uint64_t)stats->discarded); #endif }
/** * Print RTP statistics. **/ void rtp_stats_display(const rtp_stats_t *stats, const char *header) { ortp_log(ORTP_MESSAGE, "==========================================================="); ortp_log(ORTP_MESSAGE, "%s", header); ortp_log(ORTP_MESSAGE, "-----------------------------------------------------------"); ortp_log(ORTP_MESSAGE, "sent %10"PRId64" packets", stats->packet_sent); ortp_log(ORTP_MESSAGE, " %10"PRId64" duplicated packets", stats->packet_dup_sent); ortp_log(ORTP_MESSAGE, " %10"PRId64" bytes ", stats->sent); ortp_log(ORTP_MESSAGE, "received %10"PRId64" packets", stats->packet_recv); ortp_log(ORTP_MESSAGE, " %10"PRId64" duplicated packets", stats->packet_dup_recv); ortp_log(ORTP_MESSAGE, " %10"PRId64" bytes ", stats->hw_recv); ortp_log(ORTP_MESSAGE, "incoming delivered to the app %10"PRId64" bytes ", stats->recv); ortp_log(ORTP_MESSAGE, "incoming cumulative lost %10"PRId64" packets", stats->cum_packet_loss); ortp_log(ORTP_MESSAGE, "incoming received too late %10"PRId64" packets", stats->outoftime); ortp_log(ORTP_MESSAGE, "incoming bad formatted %10"PRId64" packets", stats->bad); ortp_log(ORTP_MESSAGE, "incoming discarded (queue overflow) %10"PRId64" packets", stats->discarded); ortp_log(ORTP_MESSAGE, "sent rtcp %10"PRId64" packets", stats->sent_rtcp_packets); ortp_log(ORTP_MESSAGE, "received rtcp %10"PRId64" packets", stats->recv_rtcp_packets); ortp_log(ORTP_MESSAGE, "==========================================================="); }