aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/mgcp_internal.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-10-24 20:31:25 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-11-12 10:45:03 +0100
commit30690adbc81a1fe15eb5e48b3201772486d79ed0 (patch)
tree0efb8f0cb11025304234cfe718076b9b55df615e /openbsc/include/openbsc/mgcp_internal.h
parent38e02c51250d61bb78912a4f8e67a650691c5149 (diff)
mgcp: Calculate the jitter with the formula/code from the appendix
Use a usec timestamp for the local time. The seconds to usec will swap over to the lower bits but this appears to be correct. The CLOCK_MONOTONIC is used to fulfill the RFC 3550 requirement even if it is a bit slower than the gettimeofday. Make sure to initialize transit in a way that the first transit time will be 0. Otherwise the jitter will contain the difference of the localtime and the remote time.
Diffstat (limited to 'openbsc/include/openbsc/mgcp_internal.h')
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 6e2072fdb..759745a07 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -54,6 +54,8 @@ struct mgcp_rtp_state {
uint32_t last_timestamp;
int32_t timestamp_offset;
+ uint32_t jitter;
+ int32_t transit;
};
struct mgcp_rtp_end {