Removes all const Clock*.

This prepares for making the Clock interface fully mutable.

Calls to the time functions in Clock can have side effects in some
circumstances. It's also questionable if it's a good idea to allow
repeated calls to a const method return different values without
any changed to the class instance.

Bug: webrtc:9883
Change-Id: I96fb9230705f7c80a4c0702132fd9dc73899fc5e
Reviewed-on: https://webrtc-review.googlesource.com/c/120347
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26467}
This commit is contained in:
Sebastian Jansson
2019-01-30 11:28:59 +01:00
committed by Commit Bot
parent 15df2ef2c0
commit aa01f27667
32 changed files with 55 additions and 58 deletions

View File

@ -32,7 +32,7 @@ static constexpr int64_t kNackCountTimeoutMs = 60000;
static constexpr double kDefaultMaxTimestampDeviationInSigmas = 3.5;
} // namespace
VCMJitterEstimator::VCMJitterEstimator(const Clock* clock,
VCMJitterEstimator::VCMJitterEstimator(Clock* clock,
int32_t vcmId,
int32_t receiverId)
: _vcmId(vcmId),

View File

@ -20,9 +20,9 @@ class Clock;
class VCMJitterEstimator {
public:
VCMJitterEstimator(const Clock* clock,
int32_t vcmId = 0,
int32_t receiverId = 0);
explicit VCMJitterEstimator(Clock* clock,
int32_t vcmId = 0,
int32_t receiverId = 0);
virtual ~VCMJitterEstimator();
VCMJitterEstimator& operator=(const VCMJitterEstimator& rhs);
@ -158,7 +158,7 @@ class VCMJitterEstimator {
rtc::RollingAccumulator<uint64_t> fps_counter_;
const double time_deviation_upper_bound_;
const Clock* clock_;
Clock* clock_;
};
} // namespace webrtc