diff --git a/build/win32native/ortp.def b/build/win32native/ortp.def index 0cb5c33c98d33b37fcef34830a0763839c3428cf..5aa75ab5562b6b36ed7490103192f42198937903 100755 --- a/build/win32native/ortp.def +++ b/build/win32native/ortp.def @@ -53,6 +53,7 @@ EXPORTS rtp_session_get_rtcp_socket rtp_session_set_payload_type + rtp_session_get_send_profile rtp_session_set_send_payload_type rtp_session_get_send_payload_type rtp_session_set_recv_payload_type @@ -184,6 +185,8 @@ EXPORTS rtp_session_set_rtp_socket_recv_buffer_size rtp_session_set_rtp_socket_send_buffer_size rtp_session_set_jitter_buffer_params + rtp_session_get_round_trip_propagation + rtp_session_set_rtcp_report_interval rtp_get_payload diff --git a/src/rtcp.c b/src/rtcp.c index e0929e8e0d1def2f2dedd53a3bb0720985351a05..a5e1998ffff8f2a18e516ecf44987aa6b65b293b 100644 --- a/src/rtcp.c +++ b/src/rtcp.c @@ -281,12 +281,13 @@ static void report_block_init(report_block_t *b, RtpSession *session){ /* If the test mode is enabled, modifies the returned ts (LSR) so it matches the value of the delay test value */ /* refer to the rtp_session_rtcp_set_delay_value() documentation for further explanations */ double new_ts = ( (double)stream->last_rcv_SR_time.tv_sec + (double)stream->last_rcv_SR_time.tv_usec * 1e-6 ) - ( (double)session->delay_test_vector / 1000.0 ); + uint32_t new_ts2; /* Converting the time format in RFC3550 (par. 4) format */ new_ts += 2208988800.0; /* 2208988800 is the number of seconds from 1900 to 1970 (January 1, Oh TU) */ - new_ts = round( 65536.0 * new_ts ); + new_ts = 65536.0 * new_ts; /* This non-elegant way of coding fits with the gcc and the icc compilers */ - uint32_t new_ts2 = (uint32_t)( (uint64_t)new_ts & 0xffffffff ); + new_ts2 = (uint32_t)( (uint64_t)new_ts & 0xffffffff ); b->lsr = htonl( new_ts2 ); } else { @@ -296,16 +297,17 @@ static void report_block_init(report_block_t *b, RtpSession *session){ } static void extended_statistics( RtpSession *session, report_block_t * rb ) { - session->rtp.stats.sent_rtcp_packets ++; /* the jitter raw value is kept in stream clock units */ uint32_t jitter = session->rtp.jittctl.inter_jitter; + session->rtp.stats.sent_rtcp_packets ++; session->rtp.jitter_stats.sum_jitter += jitter; session->rtp.jitter_stats.jitter=jitter; /* stores the biggest jitter for that session and its date (in millisecond) since Epoch */ if ( jitter > session->rtp.jitter_stats.max_jitter ) { + struct timeval now; + session->rtp.jitter_stats.max_jitter = jitter ; - struct timeval now; gettimeofday( &now, NULL ); session->rtp.jitter_stats.max_jitter_ts = ( now.tv_sec * 1000 ) + ( now.tv_usec / 1000 ); }