Use int64_t more consistently for times, in particular for RTT values.

Existing code was inconsistent about whether to use uint16_t, int, unsigned int,
or uint32_t, and sometimes silently truncated one to another, or truncated
int64_t.  Because most core time-handling functions use int64_t, being
consistent about using int64_t unless otherwise necessary minimizes the number
of explicit or implicit casts.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, holmer@google.com, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31349004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8045 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pkasting@chromium.org
2015-01-12 21:51:21 +00:00
parent a7add19cf4
commit 16825b1a82
124 changed files with 422 additions and 417 deletions

View File

@ -153,7 +153,7 @@ class VCMJitterBuffer {
uint32_t EstimatedJitterMs();
// Updates the round-trip time estimate.
void UpdateRtt(uint32_t rtt_ms);
void UpdateRtt(int64_t rtt_ms);
// Set the NACK mode. |highRttNackThreshold| is an RTT threshold in ms above
// which NACK will be disabled if the NACK mode is |kNackHybrid|, -1 meaning
@ -161,8 +161,8 @@ class VCMJitterBuffer {
// |lowRttNackThreshold| is an RTT threshold in ms below which we expect to
// rely on NACK only, and therefore are using larger buffers to have time to
// wait for retransmissions.
void SetNackMode(VCMNackMode mode, int low_rtt_nack_threshold_ms,
int high_rtt_nack_threshold_ms);
void SetNackMode(VCMNackMode mode, int64_t low_rtt_nack_threshold_ms,
int64_t high_rtt_nack_threshold_ms);
void SetNackSettings(size_t max_nack_list_size,
int max_packet_age_to_nack,
@ -331,12 +331,12 @@ class VCMJitterBuffer {
// Calculates network delays used for jitter calculations.
VCMInterFrameDelay inter_frame_delay_;
VCMJitterSample waiting_for_completion_;
uint32_t rtt_ms_;
int64_t rtt_ms_;
// NACK and retransmissions.
VCMNackMode nack_mode_;
int low_rtt_nack_threshold_ms_;
int high_rtt_nack_threshold_ms_;
int64_t low_rtt_nack_threshold_ms_;
int64_t high_rtt_nack_threshold_ms_;
// Holds the internal NACK list (the missing sequence numbers).
SequenceNumberSet missing_sequence_numbers_;
uint16_t latest_received_sequence_number_;