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:
parent
15df2ef2c0
commit
aa01f27667
@ -35,7 +35,7 @@ constexpr TimeDelta kPacerQueueUpdateInterval = TimeDelta::Millis<25>();
|
|||||||
TargetRateConstraints ConvertConstraints(int min_bitrate_bps,
|
TargetRateConstraints ConvertConstraints(int min_bitrate_bps,
|
||||||
int max_bitrate_bps,
|
int max_bitrate_bps,
|
||||||
int start_bitrate_bps,
|
int start_bitrate_bps,
|
||||||
const Clock* clock) {
|
Clock* clock) {
|
||||||
TargetRateConstraints msg;
|
TargetRateConstraints msg;
|
||||||
msg.at_time = Timestamp::ms(clock->TimeInMilliseconds());
|
msg.at_time = Timestamp::ms(clock->TimeInMilliseconds());
|
||||||
msg.min_data_rate =
|
msg.min_data_rate =
|
||||||
@ -48,7 +48,7 @@ TargetRateConstraints ConvertConstraints(int min_bitrate_bps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TargetRateConstraints ConvertConstraints(const BitrateConstraints& contraints,
|
TargetRateConstraints ConvertConstraints(const BitrateConstraints& contraints,
|
||||||
const Clock* clock) {
|
Clock* clock) {
|
||||||
return ConvertConstraints(contraints.min_bitrate_bps,
|
return ConvertConstraints(contraints.min_bitrate_bps,
|
||||||
contraints.max_bitrate_bps,
|
contraints.max_bitrate_bps,
|
||||||
contraints.start_bitrate_bps, clock);
|
contraints.start_bitrate_bps, clock);
|
||||||
|
|||||||
@ -133,7 +133,7 @@ class RtpTransportControllerSend final
|
|||||||
void PostUpdates(NetworkControlUpdate update) RTC_RUN_ON(task_queue_);
|
void PostUpdates(NetworkControlUpdate update) RTC_RUN_ON(task_queue_);
|
||||||
void UpdateControlState() RTC_RUN_ON(task_queue_);
|
void UpdateControlState() RTC_RUN_ON(task_queue_);
|
||||||
|
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
PacketRouter packet_router_;
|
PacketRouter packet_router_;
|
||||||
std::vector<std::unique_ptr<RtpVideoSenderInterface>> video_rtp_senders_;
|
std::vector<std::unique_ptr<RtpVideoSenderInterface>> video_rtp_senders_;
|
||||||
PacedSender pacer_;
|
PacedSender pacer_;
|
||||||
|
|||||||
@ -201,7 +201,7 @@ class AcmReceiver {
|
|||||||
std::unique_ptr<int16_t[]> last_audio_buffer_ RTC_GUARDED_BY(crit_sect_);
|
std::unique_ptr<int16_t[]> last_audio_buffer_ RTC_GUARDED_BY(crit_sect_);
|
||||||
CallStatistics call_stats_ RTC_GUARDED_BY(crit_sect_);
|
CallStatistics call_stats_ RTC_GUARDED_BY(crit_sect_);
|
||||||
const std::unique_ptr<NetEq> neteq_; // NetEq is thread-safe; no lock needed.
|
const std::unique_ptr<NetEq> neteq_; // NetEq is thread-safe; no lock needed.
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
bool resampled_last_output_frame_ RTC_GUARDED_BY(crit_sect_);
|
bool resampled_last_output_frame_ RTC_GUARDED_BY(crit_sect_);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -54,19 +54,19 @@ class BitrateControllerImpl::RtcpBandwidthObserverImpl
|
|||||||
};
|
};
|
||||||
|
|
||||||
BitrateController* BitrateController::CreateBitrateController(
|
BitrateController* BitrateController::CreateBitrateController(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
BitrateObserver* observer,
|
BitrateObserver* observer,
|
||||||
RtcEventLog* event_log) {
|
RtcEventLog* event_log) {
|
||||||
return new BitrateControllerImpl(clock, observer, event_log);
|
return new BitrateControllerImpl(clock, observer, event_log);
|
||||||
}
|
}
|
||||||
|
|
||||||
BitrateController* BitrateController::CreateBitrateController(
|
BitrateController* BitrateController::CreateBitrateController(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
RtcEventLog* event_log) {
|
RtcEventLog* event_log) {
|
||||||
return CreateBitrateController(clock, nullptr, event_log);
|
return CreateBitrateController(clock, nullptr, event_log);
|
||||||
}
|
}
|
||||||
|
|
||||||
BitrateControllerImpl::BitrateControllerImpl(const Clock* clock,
|
BitrateControllerImpl::BitrateControllerImpl(Clock* clock,
|
||||||
BitrateObserver* observer,
|
BitrateObserver* observer,
|
||||||
RtcEventLog* event_log)
|
RtcEventLog* event_log)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class BitrateControllerImpl : public BitrateController {
|
|||||||
public:
|
public:
|
||||||
// TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC.
|
// TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC.
|
||||||
// |observer| is left for project that is not yet updated.
|
// |observer| is left for project that is not yet updated.
|
||||||
BitrateControllerImpl(const Clock* clock,
|
BitrateControllerImpl(Clock* clock,
|
||||||
BitrateObserver* observer,
|
BitrateObserver* observer,
|
||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
virtual ~BitrateControllerImpl() {}
|
virtual ~BitrateControllerImpl() {}
|
||||||
@ -83,7 +83,7 @@ class BitrateControllerImpl : public BitrateController {
|
|||||||
int64_t rtt) RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
int64_t rtt) RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
||||||
|
|
||||||
// Used by process thread.
|
// Used by process thread.
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
BitrateObserver* const observer_;
|
BitrateObserver* const observer_;
|
||||||
int64_t last_bitrate_update_ms_;
|
int64_t last_bitrate_update_ms_;
|
||||||
RtcEventLog* const event_log_;
|
RtcEventLog* const event_log_;
|
||||||
|
|||||||
@ -62,11 +62,11 @@ class BitrateController : public Module, public RtcpBandwidthObserver {
|
|||||||
// Deprecated:
|
// Deprecated:
|
||||||
// TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC.
|
// TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC.
|
||||||
// Remove this method once other other projects does not use it.
|
// Remove this method once other other projects does not use it.
|
||||||
static BitrateController* CreateBitrateController(const Clock* clock,
|
static BitrateController* CreateBitrateController(Clock* clock,
|
||||||
BitrateObserver* observer,
|
BitrateObserver* observer,
|
||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
|
|
||||||
static BitrateController* CreateBitrateController(const Clock* clock,
|
static BitrateController* CreateBitrateController(Clock* clock,
|
||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
|
|
||||||
~BitrateController() override {}
|
~BitrateController() override {}
|
||||||
|
|||||||
@ -30,8 +30,7 @@ class RemoteBitrateObserver;
|
|||||||
class ReceiveSideCongestionController : public CallStatsObserver,
|
class ReceiveSideCongestionController : public CallStatsObserver,
|
||||||
public Module {
|
public Module {
|
||||||
public:
|
public:
|
||||||
ReceiveSideCongestionController(const Clock* clock,
|
ReceiveSideCongestionController(Clock* clock, PacketRouter* packet_router);
|
||||||
PacketRouter* packet_router);
|
|
||||||
|
|
||||||
~ReceiveSideCongestionController() override {}
|
~ReceiveSideCongestionController() override {}
|
||||||
|
|
||||||
@ -57,8 +56,7 @@ class ReceiveSideCongestionController : public CallStatsObserver,
|
|||||||
private:
|
private:
|
||||||
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
||||||
public:
|
public:
|
||||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer,
|
WrappingBitrateEstimator(RemoteBitrateObserver* observer, Clock* clock);
|
||||||
const Clock* clock);
|
|
||||||
|
|
||||||
~WrappingBitrateEstimator() override;
|
~WrappingBitrateEstimator() override;
|
||||||
|
|
||||||
@ -84,7 +82,7 @@ class ReceiveSideCongestionController : public CallStatsObserver,
|
|||||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||||
void PickEstimator() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
void PickEstimator() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||||
RemoteBitrateObserver* observer_;
|
RemoteBitrateObserver* observer_;
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
rtc::CriticalSection crit_sect_;
|
rtc::CriticalSection crit_sect_;
|
||||||
std::unique_ptr<RemoteBitrateEstimator> rbe_;
|
std::unique_ptr<RemoteBitrateEstimator> rbe_;
|
||||||
bool using_absolute_send_time_;
|
bool using_absolute_send_time_;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class DEPRECATED_SendSideCongestionController
|
|||||||
public:
|
public:
|
||||||
using Observer = NetworkChangedObserver;
|
using Observer = NetworkChangedObserver;
|
||||||
DEPRECATED_SendSideCongestionController(
|
DEPRECATED_SendSideCongestionController(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
Observer* observer,
|
Observer* observer,
|
||||||
RtcEventLog* event_log,
|
RtcEventLog* event_log,
|
||||||
PacedSender* pacer,
|
PacedSender* pacer,
|
||||||
@ -140,7 +140,7 @@ class DEPRECATED_SendSideCongestionController
|
|||||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(&probe_lock_);
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(&probe_lock_);
|
||||||
const FieldTrialBasedConfig field_trial_config_;
|
const FieldTrialBasedConfig field_trial_config_;
|
||||||
const WebRtcKeyValueConfig* const key_value_config_;
|
const WebRtcKeyValueConfig* const key_value_config_;
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
rtc::CriticalSection observer_lock_;
|
rtc::CriticalSection observer_lock_;
|
||||||
Observer* observer_ RTC_GUARDED_BY(observer_lock_);
|
Observer* observer_ RTC_GUARDED_BY(observer_lock_);
|
||||||
RtcEventLog* const event_log_;
|
RtcEventLog* const event_log_;
|
||||||
|
|||||||
@ -23,8 +23,7 @@ static const uint32_t kTimeOffsetSwitchThreshold = 30;
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
ReceiveSideCongestionController::WrappingBitrateEstimator::
|
ReceiveSideCongestionController::WrappingBitrateEstimator::
|
||||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer,
|
WrappingBitrateEstimator(RemoteBitrateObserver* observer, Clock* clock)
|
||||||
const Clock* clock)
|
|
||||||
: observer_(observer),
|
: observer_(observer),
|
||||||
clock_(clock),
|
clock_(clock),
|
||||||
rbe_(new RemoteBitrateEstimatorSingleStream(observer_, clock_)),
|
rbe_(new RemoteBitrateEstimatorSingleStream(observer_, clock_)),
|
||||||
@ -120,7 +119,7 @@ void ReceiveSideCongestionController::WrappingBitrateEstimator::
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReceiveSideCongestionController::ReceiveSideCongestionController(
|
ReceiveSideCongestionController::ReceiveSideCongestionController(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
PacketRouter* packet_router)
|
PacketRouter* packet_router)
|
||||||
: remote_bitrate_estimator_(packet_router, clock),
|
: remote_bitrate_estimator_(packet_router, clock),
|
||||||
remote_estimator_proxy_(clock, packet_router) {}
|
remote_estimator_proxy_(clock, packet_router) {}
|
||||||
|
|||||||
@ -84,7 +84,7 @@ bool IsPacerPushbackExperimentEnabled(
|
|||||||
|
|
||||||
DEPRECATED_SendSideCongestionController::
|
DEPRECATED_SendSideCongestionController::
|
||||||
DEPRECATED_SendSideCongestionController(
|
DEPRECATED_SendSideCongestionController(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
Observer* observer,
|
Observer* observer,
|
||||||
RtcEventLog* event_log,
|
RtcEventLog* event_log,
|
||||||
PacedSender* pacer,
|
PacedSender* pacer,
|
||||||
|
|||||||
@ -29,8 +29,7 @@ const int64_t kBaseTimestampScaleFactor =
|
|||||||
rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8);
|
rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8);
|
||||||
const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24);
|
const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24);
|
||||||
|
|
||||||
LegacyTransportFeedbackAdapter::LegacyTransportFeedbackAdapter(
|
LegacyTransportFeedbackAdapter::LegacyTransportFeedbackAdapter(Clock* clock)
|
||||||
const Clock* clock)
|
|
||||||
: send_time_history_(kSendTimeHistoryWindowMs),
|
: send_time_history_(kSendTimeHistoryWindowMs),
|
||||||
clock_(clock),
|
clock_(clock),
|
||||||
current_offset_ms_(kNoTimestamp),
|
current_offset_ms_(kNoTimestamp),
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class TransportFeedback;
|
|||||||
// modules/congeestion_controller/rtp/transport_feedback_adapter.h
|
// modules/congeestion_controller/rtp/transport_feedback_adapter.h
|
||||||
class LegacyTransportFeedbackAdapter {
|
class LegacyTransportFeedbackAdapter {
|
||||||
public:
|
public:
|
||||||
explicit LegacyTransportFeedbackAdapter(const Clock* clock);
|
explicit LegacyTransportFeedbackAdapter(Clock* clock);
|
||||||
virtual ~LegacyTransportFeedbackAdapter();
|
virtual ~LegacyTransportFeedbackAdapter();
|
||||||
|
|
||||||
void RegisterPacketFeedbackObserver(PacketFeedbackObserver* observer);
|
void RegisterPacketFeedbackObserver(PacketFeedbackObserver* observer);
|
||||||
@ -64,7 +64,7 @@ class LegacyTransportFeedbackAdapter {
|
|||||||
|
|
||||||
rtc::CriticalSection lock_;
|
rtc::CriticalSection lock_;
|
||||||
SendTimeHistory send_time_history_ RTC_GUARDED_BY(&lock_);
|
SendTimeHistory send_time_history_ RTC_GUARDED_BY(&lock_);
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
int64_t current_offset_ms_;
|
int64_t current_offset_ms_;
|
||||||
int64_t last_timestamp_us_;
|
int64_t last_timestamp_us_;
|
||||||
std::vector<PacketFeedback> last_packet_feedback_vector_;
|
std::vector<PacketFeedback> last_packet_feedback_vector_;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace webrtc {
|
|||||||
const int64_t PacedSender::kMaxQueueLengthMs = 2000;
|
const int64_t PacedSender::kMaxQueueLengthMs = 2000;
|
||||||
const float PacedSender::kDefaultPaceMultiplier = 2.5f;
|
const float PacedSender::kDefaultPaceMultiplier = 2.5f;
|
||||||
|
|
||||||
PacedSender::PacedSender(const Clock* clock,
|
PacedSender::PacedSender(Clock* clock,
|
||||||
PacketSender* packet_sender,
|
PacketSender* packet_sender,
|
||||||
RtcEventLog* event_log)
|
RtcEventLog* event_log)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class PacedSender : public Pacer {
|
|||||||
// overshoots from the encoder.
|
// overshoots from the encoder.
|
||||||
static const float kDefaultPaceMultiplier;
|
static const float kDefaultPaceMultiplier;
|
||||||
|
|
||||||
PacedSender(const Clock* clock,
|
PacedSender(Clock* clock,
|
||||||
PacketSender* packet_sender,
|
PacketSender* packet_sender,
|
||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ class PacedSender : public Pacer {
|
|||||||
bool Congested() const RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
bool Congested() const RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
||||||
int64_t TimeMilliseconds() const RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
int64_t TimeMilliseconds() const RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_);
|
||||||
|
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
PacketSender* const packet_sender_;
|
PacketSender* const packet_sender_;
|
||||||
std::unique_ptr<AlrDetector> alr_detector_ RTC_PT_GUARDED_BY(critsect_);
|
std::unique_ptr<AlrDetector> alr_detector_ RTC_PT_GUARDED_BY(critsect_);
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ void RemoteBitrateEstimatorAbsSendTime::AddCluster(std::list<Cluster>* clusters,
|
|||||||
|
|
||||||
RemoteBitrateEstimatorAbsSendTime::RemoteBitrateEstimatorAbsSendTime(
|
RemoteBitrateEstimatorAbsSendTime::RemoteBitrateEstimatorAbsSendTime(
|
||||||
RemoteBitrateObserver* observer,
|
RemoteBitrateObserver* observer,
|
||||||
const Clock* clock)
|
Clock* clock)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
observer_(observer),
|
observer_(observer),
|
||||||
inter_arrival_(),
|
inter_arrival_(),
|
||||||
|
|||||||
@ -73,7 +73,7 @@ struct Cluster {
|
|||||||
class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator {
|
class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator {
|
||||||
public:
|
public:
|
||||||
RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver* observer,
|
RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver* observer,
|
||||||
const Clock* clock);
|
Clock* clock);
|
||||||
~RemoteBitrateEstimatorAbsSendTime() override;
|
~RemoteBitrateEstimatorAbsSendTime() override;
|
||||||
|
|
||||||
void IncomingPacket(int64_t arrival_time_ms,
|
void IncomingPacket(int64_t arrival_time_ms,
|
||||||
@ -120,7 +120,7 @@ class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator {
|
|||||||
void TimeoutStreams(int64_t now_ms) RTC_EXCLUSIVE_LOCKS_REQUIRED(&crit_);
|
void TimeoutStreams(int64_t now_ms) RTC_EXCLUSIVE_LOCKS_REQUIRED(&crit_);
|
||||||
|
|
||||||
rtc::RaceChecker network_race_;
|
rtc::RaceChecker network_race_;
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
RemoteBitrateObserver* const observer_;
|
RemoteBitrateObserver* const observer_;
|
||||||
std::unique_ptr<InterArrival> inter_arrival_;
|
std::unique_ptr<InterArrival> inter_arrival_;
|
||||||
std::unique_ptr<OveruseEstimator> estimator_;
|
std::unique_ptr<OveruseEstimator> estimator_;
|
||||||
|
|||||||
@ -59,7 +59,7 @@ struct RemoteBitrateEstimatorSingleStream::Detector {
|
|||||||
|
|
||||||
RemoteBitrateEstimatorSingleStream::RemoteBitrateEstimatorSingleStream(
|
RemoteBitrateEstimatorSingleStream::RemoteBitrateEstimatorSingleStream(
|
||||||
RemoteBitrateObserver* observer,
|
RemoteBitrateObserver* observer,
|
||||||
const Clock* clock)
|
Clock* clock)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
incoming_bitrate_(kBitrateWindowMs, 8000),
|
incoming_bitrate_(kBitrateWindowMs, 8000),
|
||||||
last_valid_incoming_bitrate_(0),
|
last_valid_incoming_bitrate_(0),
|
||||||
|
|||||||
@ -32,7 +32,7 @@ struct RTPHeader;
|
|||||||
class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator {
|
class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator {
|
||||||
public:
|
public:
|
||||||
RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver* observer,
|
RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver* observer,
|
||||||
const Clock* clock);
|
Clock* clock);
|
||||||
~RemoteBitrateEstimatorSingleStream() override;
|
~RemoteBitrateEstimatorSingleStream() override;
|
||||||
|
|
||||||
void IncomingPacket(int64_t arrival_time_ms,
|
void IncomingPacket(int64_t arrival_time_ms,
|
||||||
@ -62,7 +62,7 @@ class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator {
|
|||||||
// otherwise creates it.
|
// otherwise creates it.
|
||||||
AimdRateControl* GetRemoteRate() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
AimdRateControl* GetRemoteRate() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||||
|
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
SsrcOveruseEstimatorMap overuse_detectors_ RTC_GUARDED_BY(crit_sect_);
|
SsrcOveruseEstimatorMap overuse_detectors_ RTC_GUARDED_BY(crit_sect_);
|
||||||
RateStatistics incoming_bitrate_ RTC_GUARDED_BY(crit_sect_);
|
RateStatistics incoming_bitrate_ RTC_GUARDED_BY(crit_sect_);
|
||||||
uint32_t last_valid_incoming_bitrate_ RTC_GUARDED_BY(crit_sect_);
|
uint32_t last_valid_incoming_bitrate_ RTC_GUARDED_BY(crit_sect_);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ static constexpr int64_t kMaxTimeMs =
|
|||||||
std::numeric_limits<int64_t>::max() / 1000;
|
std::numeric_limits<int64_t>::max() / 1000;
|
||||||
|
|
||||||
RemoteEstimatorProxy::RemoteEstimatorProxy(
|
RemoteEstimatorProxy::RemoteEstimatorProxy(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
TransportFeedbackSenderInterface* feedback_sender)
|
TransportFeedbackSenderInterface* feedback_sender)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
feedback_sender_(feedback_sender),
|
feedback_sender_(feedback_sender),
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class TransportFeedback;
|
|||||||
|
|
||||||
class RemoteEstimatorProxy : public RemoteBitrateEstimator {
|
class RemoteEstimatorProxy : public RemoteBitrateEstimator {
|
||||||
public:
|
public:
|
||||||
RemoteEstimatorProxy(const Clock* clock,
|
RemoteEstimatorProxy(Clock* clock,
|
||||||
TransportFeedbackSenderInterface* feedback_sender);
|
TransportFeedbackSenderInterface* feedback_sender);
|
||||||
~RemoteEstimatorProxy() override;
|
~RemoteEstimatorProxy() override;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ class RemoteEstimatorProxy : public RemoteBitrateEstimator {
|
|||||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_);
|
RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_);
|
||||||
bool BuildFeedbackPacket(rtcp::TransportFeedback* feedback_packet);
|
bool BuildFeedbackPacket(rtcp::TransportFeedback* feedback_packet);
|
||||||
|
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
TransportFeedbackSenderInterface* const feedback_sender_;
|
TransportFeedbackSenderInterface* const feedback_sender_;
|
||||||
int64_t last_process_time_ms_;
|
int64_t last_process_time_ms_;
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
BbrPacedSender::BbrPacedSender(const Clock* clock,
|
BbrPacedSender::BbrPacedSender(Clock* clock,
|
||||||
PacedSender::PacketSender* packet_sender,
|
PacedSender::PacketSender* packet_sender,
|
||||||
RtcEventLog* event_log)
|
RtcEventLog* event_log)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class RtcEventLog;
|
|||||||
struct Packet;
|
struct Packet;
|
||||||
class BbrPacedSender : public Pacer {
|
class BbrPacedSender : public Pacer {
|
||||||
public:
|
public:
|
||||||
BbrPacedSender(const Clock* clock,
|
BbrPacedSender(Clock* clock,
|
||||||
PacedSender::PacketSender* packet_sender,
|
PacedSender::PacketSender* packet_sender,
|
||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
~BbrPacedSender() override;
|
~BbrPacedSender() override;
|
||||||
@ -75,7 +75,7 @@ class BbrPacedSender : public Pacer {
|
|||||||
bool TryToSendPacket(Packet* packet);
|
bool TryToSendPacket(Packet* packet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
PacedSender::PacketSender* const packet_sender_;
|
PacedSender::PacketSender* const packet_sender_;
|
||||||
uint32_t estimated_bitrate_bps_;
|
uint32_t estimated_bitrate_bps_;
|
||||||
uint32_t min_send_bitrate_kbps_;
|
uint32_t min_send_bitrate_kbps_;
|
||||||
|
|||||||
@ -323,7 +323,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
|
|||||||
RTCPReceiver* rtcp_receiver() { return &rtcp_receiver_; }
|
RTCPReceiver* rtcp_receiver() { return &rtcp_receiver_; }
|
||||||
const RTCPReceiver* rtcp_receiver() const { return &rtcp_receiver_; }
|
const RTCPReceiver* rtcp_receiver() const { return &rtcp_receiver_; }
|
||||||
|
|
||||||
const Clock* clock() const { return clock_; }
|
Clock* clock() const { return clock_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt);
|
FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt);
|
||||||
@ -339,7 +339,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
|
|||||||
RTCPSender rtcp_sender_;
|
RTCPSender rtcp_sender_;
|
||||||
RTCPReceiver rtcp_receiver_;
|
RTCPReceiver rtcp_receiver_;
|
||||||
|
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
|
|
||||||
const bool audio_;
|
const bool audio_;
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ static constexpr int64_t kNackCountTimeoutMs = 60000;
|
|||||||
static constexpr double kDefaultMaxTimestampDeviationInSigmas = 3.5;
|
static constexpr double kDefaultMaxTimestampDeviationInSigmas = 3.5;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
VCMJitterEstimator::VCMJitterEstimator(const Clock* clock,
|
VCMJitterEstimator::VCMJitterEstimator(Clock* clock,
|
||||||
int32_t vcmId,
|
int32_t vcmId,
|
||||||
int32_t receiverId)
|
int32_t receiverId)
|
||||||
: _vcmId(vcmId),
|
: _vcmId(vcmId),
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class Clock;
|
|||||||
|
|
||||||
class VCMJitterEstimator {
|
class VCMJitterEstimator {
|
||||||
public:
|
public:
|
||||||
VCMJitterEstimator(const Clock* clock,
|
explicit VCMJitterEstimator(Clock* clock,
|
||||||
int32_t vcmId = 0,
|
int32_t vcmId = 0,
|
||||||
int32_t receiverId = 0);
|
int32_t receiverId = 0);
|
||||||
virtual ~VCMJitterEstimator();
|
virtual ~VCMJitterEstimator();
|
||||||
@ -158,7 +158,7 @@ class VCMJitterEstimator {
|
|||||||
|
|
||||||
rtc::RollingAccumulator<uint64_t> fps_counter_;
|
rtc::RollingAccumulator<uint64_t> fps_counter_;
|
||||||
const double time_deviation_upper_bound_;
|
const double time_deviation_upper_bound_;
|
||||||
const Clock* clock_;
|
Clock* clock_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
RateLimiter::RateLimiter(const Clock* clock, int64_t max_window_ms)
|
RateLimiter::RateLimiter(Clock* clock, int64_t max_window_ms)
|
||||||
: clock_(clock),
|
: clock_(clock),
|
||||||
current_rate_(max_window_ms, RateStatistics::kBpsScale),
|
current_rate_(max_window_ms, RateStatistics::kBpsScale),
|
||||||
window_size_ms_(max_window_ms),
|
window_size_ms_(max_window_ms),
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class Clock;
|
|||||||
// methods will acquire (the same) lock befeore executing.
|
// methods will acquire (the same) lock befeore executing.
|
||||||
class RateLimiter {
|
class RateLimiter {
|
||||||
public:
|
public:
|
||||||
RateLimiter(const Clock* clock, int64_t max_window_ms);
|
RateLimiter(Clock* clock, int64_t max_window_ms);
|
||||||
~RateLimiter();
|
~RateLimiter();
|
||||||
|
|
||||||
// Try to use rate to send bytes. Returns true on success and if so updates
|
// Try to use rate to send bytes. Returns true on success and if so updates
|
||||||
@ -44,7 +44,7 @@ class RateLimiter {
|
|||||||
bool SetWindowSize(int64_t window_size_ms);
|
bool SetWindowSize(int64_t window_size_ms);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Clock* const clock_;
|
Clock* const clock_;
|
||||||
rtc::CriticalSection lock_;
|
rtc::CriticalSection lock_;
|
||||||
RateStatistics current_rate_ RTC_GUARDED_BY(lock_);
|
RateStatistics current_rate_ RTC_GUARDED_BY(lock_);
|
||||||
int64_t window_size_ms_ RTC_GUARDED_BY(lock_);
|
int64_t window_size_ms_ RTC_GUARDED_BY(lock_);
|
||||||
|
|||||||
@ -59,6 +59,7 @@ class FrameGeneratorCapturer : public TestVideoCapturer {
|
|||||||
int frame_repeat_count,
|
int frame_repeat_count,
|
||||||
int target_fps,
|
int target_fps,
|
||||||
Clock* clock);
|
Clock* clock);
|
||||||
|
|
||||||
static FrameGeneratorCapturer* Create(
|
static FrameGeneratorCapturer* Create(
|
||||||
std::unique_ptr<FrameGenerator> frame_generator,
|
std::unique_ptr<FrameGenerator> frame_generator,
|
||||||
int target_fps,
|
int target_fps,
|
||||||
|
|||||||
@ -78,7 +78,7 @@ SimulationNode::SimulationNode(
|
|||||||
simulated_network_(simulation),
|
simulated_network_(simulation),
|
||||||
config_(config) {}
|
config_(config) {}
|
||||||
|
|
||||||
NetworkNodeTransport::NetworkNodeTransport(const Clock* sender_clock,
|
NetworkNodeTransport::NetworkNodeTransport(Clock* sender_clock,
|
||||||
Call* sender_call)
|
Call* sender_call)
|
||||||
: sender_clock_(sender_clock), sender_call_(sender_call) {}
|
: sender_clock_(sender_clock), sender_call_(sender_call) {}
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class SimulationNode : public EmulatedNetworkNode {
|
|||||||
|
|
||||||
class NetworkNodeTransport : public Transport {
|
class NetworkNodeTransport : public Transport {
|
||||||
public:
|
public:
|
||||||
NetworkNodeTransport(const Clock* sender_clock, Call* sender_call);
|
NetworkNodeTransport(Clock* sender_clock, Call* sender_call);
|
||||||
~NetworkNodeTransport() override;
|
~NetworkNodeTransport() override;
|
||||||
|
|
||||||
bool SendRtp(const uint8_t* packet,
|
bool SendRtp(const uint8_t* packet,
|
||||||
@ -85,7 +85,7 @@ class NetworkNodeTransport : public Transport {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
rtc::CriticalSection crit_sect_;
|
rtc::CriticalSection crit_sect_;
|
||||||
const Clock* const sender_clock_;
|
Clock* const sender_clock_;
|
||||||
Call* const sender_call_;
|
Call* const sender_call_;
|
||||||
EmulatedNetworkNode* send_net_ RTC_GUARDED_BY(crit_sect_) = nullptr;
|
EmulatedNetworkNode* send_net_ RTC_GUARDED_BY(crit_sect_) = nullptr;
|
||||||
uint64_t receiver_id_ RTC_GUARDED_BY(crit_sect_) = 0;
|
uint64_t receiver_id_ RTC_GUARDED_BY(crit_sect_) = 0;
|
||||||
|
|||||||
@ -134,7 +134,7 @@ void VideoQualityStats::HandleFrameInfo(VideoFrameQualityInfo sample) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ForwardingCapturedFrameTap::ForwardingCapturedFrameTap(
|
ForwardingCapturedFrameTap::ForwardingCapturedFrameTap(
|
||||||
const Clock* clock,
|
Clock* clock,
|
||||||
VideoQualityAnalyzer* analyzer,
|
VideoQualityAnalyzer* analyzer,
|
||||||
rtc::VideoSourceInterface<VideoFrame>* source)
|
rtc::VideoSourceInterface<VideoFrame>* source)
|
||||||
: clock_(clock), analyzer_(analyzer), source_(source) {}
|
: clock_(clock), analyzer_(analyzer), source_(source) {}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class VideoQualityAnalyzer {
|
|||||||
void OnDecodedFrame(const VideoFrame& frame);
|
void OnDecodedFrame(const VideoFrame& frame);
|
||||||
void Synchronize();
|
void Synchronize();
|
||||||
bool Active() const;
|
bool Active() const;
|
||||||
const Clock* clock();
|
Clock* clock();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int64_t DecodedFrameCaptureTimeOffsetMs(const VideoFrame& decoded) const;
|
int64_t DecodedFrameCaptureTimeOffsetMs(const VideoFrame& decoded) const;
|
||||||
@ -73,7 +73,7 @@ class ForwardingCapturedFrameTap
|
|||||||
: public rtc::VideoSinkInterface<VideoFrame>,
|
: public rtc::VideoSinkInterface<VideoFrame>,
|
||||||
public rtc::VideoSourceInterface<VideoFrame> {
|
public rtc::VideoSourceInterface<VideoFrame> {
|
||||||
public:
|
public:
|
||||||
ForwardingCapturedFrameTap(const Clock* clock,
|
ForwardingCapturedFrameTap(Clock* clock,
|
||||||
VideoQualityAnalyzer* analyzer,
|
VideoQualityAnalyzer* analyzer,
|
||||||
rtc::VideoSourceInterface<VideoFrame>* source);
|
rtc::VideoSourceInterface<VideoFrame>* source);
|
||||||
ForwardingCapturedFrameTap(ForwardingCapturedFrameTap&) = delete;
|
ForwardingCapturedFrameTap(ForwardingCapturedFrameTap&) = delete;
|
||||||
@ -91,7 +91,7 @@ class ForwardingCapturedFrameTap
|
|||||||
VideoFrame PopFrame();
|
VideoFrame PopFrame();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Clock* clock_;
|
Clock* const clock_;
|
||||||
VideoQualityAnalyzer* const analyzer_;
|
VideoQualityAnalyzer* const analyzer_;
|
||||||
rtc::VideoSourceInterface<VideoFrame>* const source_;
|
rtc::VideoSourceInterface<VideoFrame>* const source_;
|
||||||
VideoSinkInterface<VideoFrame>* sink_;
|
VideoSinkInterface<VideoFrame>* sink_;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user