summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-05-18 18:35:05 +0000
committerBenny Prijono <bennylp@teluu.com>2006-05-18 18:35:05 +0000
commit202d1a5c4b12735e9f7811c83a0e9494971b19fc (patch)
tree68a07c7e1d9887fa8b2ec8b14bc3dd989847c98a /pjmedia/include
parente134ae3866d21d3b6d0dd9d8d5599655573cf7eb (diff)
Changed the way average jitter is calculated in rtcp
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@455 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/rtcp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/rtcp.h b/pjmedia/include/pjmedia/rtcp.h
index dcb800b5..12408fa4 100644
--- a/pjmedia/include/pjmedia/rtcp.h
+++ b/pjmedia/include/pjmedia/rtcp.h
@@ -175,6 +175,7 @@ struct pjmedia_rtcp_stream_stat
} loss_type; /**< Types of loss detected. */
struct {
+ unsigned count; /**< Number of updates. */
unsigned min; /**< Minimum jitter (in usec) */
unsigned avg; /**< Average jitter (in usec) */
unsigned max; /**< Maximum jitter (in usec) */
@@ -217,6 +218,13 @@ struct pjmedia_rtcp_stat
typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat;
+#if defined(PJ_HAS_FLOATING_POINT) && PJ_HAS_FLOATING_POINT!=0
+ typedef double PJMEDIA_AVG_JITTER_TYPE;
+#else
+ typedef pj_uint32_t PJMEDIA_AVG_JITTER_TYPE;
+#endif;
+
+
/**
* RTCP session is used to monitor the RTP session of one endpoint. There
* should only be one RTCP session for a bidirectional RTP streams.
@@ -244,6 +252,11 @@ struct pjmedia_rtcp_session
pj_uint32_t peer_ssrc; /**< Peer SSRC */
pjmedia_rtcp_stat stat; /**< Bidirectional stream stat. */
+
+ /* Keep jitter calculation in floating point to prevent the values
+ * from being rounded-down to nearest integer.
+ */
+ PJMEDIA_AVG_JITTER_TYPE avg_jitter; /**< Average RX jitter. */
};
/**