Change default timestamp to 64 bits in all webrtc directories.
BUG=
R=pbos@webrtc.org, pthatcher@webrtc.org, solenberg@webrtc.org
Review URL: https://codereview.webrtc.org/1835053002 .
Cr-Original-Commit-Position: refs/heads/master@{#12646}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 82d7862fe736f851ea1cf28e8b2ce9fa6be37e45
diff --git a/pc/currentspeakermonitor.cc b/pc/currentspeakermonitor.cc
index e84aa82..ce0d579 100644
--- a/pc/currentspeakermonitor.cc
+++ b/pc/currentspeakermonitor.cc
@@ -63,7 +63,7 @@
}
void CurrentSpeakerMonitor::set_min_time_between_switches(
- uint32_t min_time_between_switches) {
+ int min_time_between_switches) {
min_time_between_switches_ = min_time_between_switches;
}
@@ -165,7 +165,7 @@
// We avoid over-switching by disabling switching for a period of time after
// a switch is done.
- uint32_t now = rtc::Time();
+ int64_t now = rtc::TimeMillis();
if (earliest_permitted_switch_time_ <= now &&
current_speaker_ssrc_ != loudest_speaker_ssrc) {
current_speaker_ssrc_ = loudest_speaker_ssrc;
diff --git a/pc/currentspeakermonitor.h b/pc/currentspeakermonitor.h
index 19a61f9..730ded0 100644
--- a/pc/currentspeakermonitor.h
+++ b/pc/currentspeakermonitor.h
@@ -54,7 +54,7 @@
// Used by tests. Note that the actual minimum time between switches
// enforced by the monitor will be the given value plus or minus the
// resolution of the system clock.
- void set_min_time_between_switches(uint32_t min_time_between_switches);
+ void set_min_time_between_switches(int min_time_between_switches);
// This is fired when the current speaker changes, and provides his audio
// SSRC. This only fires after the audio monitor on the underlying
@@ -86,8 +86,8 @@
uint32_t current_speaker_ssrc_;
// To prevent overswitching, switching is disabled for some time after a
// switch is made. This gives us the earliest time a switch is permitted.
- uint32_t earliest_permitted_switch_time_;
- uint32_t min_time_between_switches_;
+ int64_t earliest_permitted_switch_time_;
+ int min_time_between_switches_;
};
} // namespace cricket
diff --git a/pc/srtpfilter.cc b/pc/srtpfilter.cc
index e8ea289..e4796fd 100644
--- a/pc/srtpfilter.cc
+++ b/pc/srtpfilter.cc
@@ -259,7 +259,7 @@
return send_session_->GetRtpAuthParams(key, key_len, tag_len);
}
-void SrtpFilter::set_signal_silent_time(uint32_t signal_silent_time_in_ms) {
+void SrtpFilter::set_signal_silent_time(int signal_silent_time_in_ms) {
signal_silent_time_in_ms_ = signal_silent_time_in_ms;
if (IsActive()) {
ASSERT(send_session_ != NULL);
@@ -641,7 +641,7 @@
return true;
}
-void SrtpSession::set_signal_silent_time(uint32_t signal_silent_time_in_ms) {
+void SrtpSession::set_signal_silent_time(int signal_silent_time_in_ms) {
srtp_stat_->set_signal_silent_time(signal_silent_time_in_ms);
}
@@ -891,10 +891,10 @@
if (key.error != SrtpFilter::ERROR_NONE) {
// For errors, signal first time and wait for 1 sec.
FailureStat* stat = &(failures_[key]);
- uint32_t current_time = rtc::Time();
+ int64_t current_time = rtc::TimeMillis();
if (stat->last_signal_time == 0 ||
rtc::TimeDiff(current_time, stat->last_signal_time) >
- static_cast<int>(signal_silent_time_)) {
+ signal_silent_time_) {
SignalSrtpError(key.ssrc, key.mode, key.error);
stat->last_signal_time = current_time;
}
diff --git a/pc/srtpfilter.h b/pc/srtpfilter.h
index 523ac1d..b54eb8b 100644
--- a/pc/srtpfilter.h
+++ b/pc/srtpfilter.h
@@ -120,7 +120,7 @@
bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len);
// Update the silent threshold (in ms) for signaling errors.
- void set_signal_silent_time(uint32_t signal_silent_time_in_ms);
+ void set_signal_silent_time(int signal_silent_time_in_ms);
bool ResetParams();
@@ -166,7 +166,7 @@
ST_RECEIVEDPRANSWER
};
State state_;
- uint32_t signal_silent_time_in_ms_;
+ int signal_silent_time_in_ms_;
std::vector<CryptoParams> offer_params_;
std::unique_ptr<SrtpSession> send_session_;
std::unique_ptr<SrtpSession> recv_session_;
@@ -208,7 +208,7 @@
bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len);
// Update the silent threshold (in ms) for signaling errors.
- void set_signal_silent_time(uint32_t signal_silent_time_in_ms);
+ void set_signal_silent_time(int signal_silent_time_in_ms);
// Calls srtp_shutdown if it's initialized.
static void Terminate();
@@ -252,9 +252,9 @@
void AddUnprotectRtcpResult(int result);
// Get silent time (in ms) for SRTP statistics handler.
- uint32_t signal_silent_time() const { return signal_silent_time_; }
+ int signal_silent_time() const { return signal_silent_time_; }
// Set silent time (in ms) for SRTP statistics handler.
- void set_signal_silent_time(uint32_t signal_silent_time) {
+ void set_signal_silent_time(int signal_silent_time) {
signal_silent_time_ = signal_silent_time;
}
@@ -296,7 +296,7 @@
void Reset() {
last_signal_time = 0;
}
- uint32_t last_signal_time;
+ int64_t last_signal_time;
};
// Inspect SRTP result and signal error if needed.
@@ -304,7 +304,7 @@
std::map<FailureKey, FailureStat> failures_;
// Threshold in ms to silent the signaling errors.
- uint32_t signal_silent_time_;
+ int signal_silent_time_;
RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat);
};