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

@ -71,7 +71,7 @@ class RawRtpPacket {
class LostPackets {
public:
LostPackets(Clock* clock, uint32_t rtt_ms)
LostPackets(Clock* clock, int64_t rtt_ms)
: crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
debug_file_(fopen("PacketLossDebug.txt", "w")),
loss_count_(0),
@ -180,7 +180,7 @@ class LostPackets {
int loss_count_;
RtpPacketList packets_;
Clock* clock_;
uint32_t rtt_ms_;
int64_t rtt_ms_;
DISALLOW_IMPLICIT_CONSTRUCTORS(LostPackets);
};
@ -323,7 +323,7 @@ class RtpPlayerImpl : public RtpPlayerInterface {
RtpPlayerImpl(PayloadSinkFactoryInterface* payload_sink_factory,
const PayloadTypes& payload_types, Clock* clock,
scoped_ptr<test::RtpFileReader>* packet_source,
float loss_rate, uint32_t rtt_ms, bool reordering)
float loss_rate, int64_t rtt_ms, bool reordering)
: ssrc_handlers_(payload_sink_factory, payload_types),
clock_(clock),
next_rtp_time_(0),
@ -468,7 +468,7 @@ class RtpPlayerImpl : public RtpPlayerInterface {
RtpPlayerInterface* Create(const std::string& input_filename,
PayloadSinkFactoryInterface* payload_sink_factory, Clock* clock,
const PayloadTypes& payload_types, float loss_rate, uint32_t rtt_ms,
const PayloadTypes& payload_types, float loss_rate, int64_t rtt_ms,
bool reordering) {
scoped_ptr<test::RtpFileReader> packet_source(test::RtpFileReader::Create(
test::RtpFileReader::kRtpDump, input_filename));