Use backticks not vertical bars to denote variables in comments for /modules/pacing

Bug: webrtc:12338
Change-Id: Id3b5081cf73be31829d75d7ef34942c2259053da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227096
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34674}
This commit is contained in:
Artem Titov 2021-07-28 20:28:28 +02:00 committed by WebRTC LUCI CQ
parent 3754e7c7ad
commit ee3e3fdfb6
12 changed files with 26 additions and 26 deletions

View File

@ -164,7 +164,7 @@ absl::optional<PacedPacketInfo> BitrateProber::CurrentCluster(Timestamp now) {
}
// Probe size is recommended based on the probe bitrate required. We choose
// a minimum of twice |kMinProbeDeltaMs| interval to allow scheduling to be
// a minimum of twice `kMinProbeDeltaMs` interval to allow scheduling to be
// feasible.
DataSize BitrateProber::RecommendedMinProbeSize() const {
if (clusters_.empty()) {

View File

@ -38,7 +38,7 @@ struct BitrateProberConfig {
// Maximum amount of time each probe can be delayed.
FieldTrialParameter<TimeDelta> max_probe_delay;
// If NextProbeTime() is called with a delay higher than specified by
// |max_probe_delay|, abort it.
// `max_probe_delay`, abort it.
FieldTrialParameter<bool> abort_delayed_probes;
};
@ -61,14 +61,14 @@ class BitrateProber {
// with.
void OnIncomingPacket(DataSize packet_size);
// Create a cluster used to probe for |bitrate_bps| with |num_probes| number
// Create a cluster used to probe for `bitrate_bps` with `num_probes` number
// of probes.
void CreateProbeCluster(DataRate bitrate, Timestamp now, int cluster_id);
// Returns the time at which the next probe should be sent to get accurate
// probing. If probing is not desired at this time, Timestamp::PlusInfinity()
// will be returned.
// TODO(bugs.webrtc.org/11780): Remove |now| argument when old mode is gone.
// TODO(bugs.webrtc.org/11780): Remove `now` argument when old mode is gone.
Timestamp NextProbeTime(Timestamp now) const;
// Information about the current probing cluster.
@ -80,7 +80,7 @@ class BitrateProber {
// Called to report to the prober that a probe has been sent. In case of
// multiple packets per probe, this call would be made at the end of sending
// the last packet in probe. |size| is the total size of all packets in probe.
// the last packet in probe. `size` is the total size of all packets in probe.
void ProbeSent(Timestamp now, DataSize size);
private:

View File

@ -57,7 +57,7 @@ class PacedSender : public Module,
// overshoots from the encoder.
static const float kDefaultPaceMultiplier;
// TODO(bugs.webrtc.org/10937): Make the |process_thread| argument be non
// TODO(bugs.webrtc.org/10937): Make the `process_thread` argument be non
// optional once all callers have been updated.
PacedSender(Clock* clock,
PacketRouter* packet_router,

View File

@ -346,7 +346,7 @@ Timestamp PacingController::NextSendTime() const {
// If probing is active, that always takes priority.
if (prober_.is_probing()) {
Timestamp probe_time = prober_.NextProbeTime(now);
// |probe_time| == PlusInfinity indicates no probe scheduled.
// `probe_time` == PlusInfinity indicates no probe scheduled.
if (probe_time != Timestamp::PlusInfinity() && !probing_send_failure_) {
return probe_time;
}

View File

@ -73,7 +73,7 @@ class PacingController {
// Increasing this factor will result in lower delays in cases of bitrate
// overshoots from the encoder.
static const float kDefaultPaceMultiplier;
// If no media or paused, wake up at least every |kPausedProcessIntervalMs| in
// If no media or paused, wake up at least every `kPausedProcessIntervalMs` in
// order to send a keep-alive packet so we don't get stuck in a bad state due
// to lack of feedback.
static const TimeDelta kPausedProcessInterval;
@ -192,11 +192,11 @@ class PacingController {
DataSize transport_overhead_per_packet_;
// TODO(webrtc:9716): Remove this when we are certain clocks are monotonic.
// The last millisecond timestamp returned by |clock_|.
// The last millisecond timestamp returned by `clock_`.
mutable Timestamp last_timestamp_;
bool paused_;
// If |use_interval_budget_| is true, |media_budget_| and |padding_budget_|
// If `use_interval_budget_` is true, `media_budget_` and `padding_budget_`
// will be used to track when packets can be sent. Otherwise the media and
// padding debt counters will be used together with the target rates.

View File

@ -63,7 +63,7 @@ class PacketRouter : public PacingController::PacketSender {
// Send REMB feedback.
void SendRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs);
// Sends |packets| in one or more IP packets.
// Sends `packets` in one or more IP packets.
void SendCombinedRtcpPacket(
std::vector<std::unique_ptr<rtcp::RtcpPacket>> packets);

View File

@ -174,7 +174,7 @@ std::unique_ptr<RtpPacketToSend> RoundRobinPacketQueue::Pop() {
stream_priorities_.erase(stream->priority_it);
// Calculate the total amount of time spent by this packet in the queue
// while in a non-paused state. Note that the |pause_time_sum_ms_| was
// while in a non-paused state. Note that the `pause_time_sum_ms_` was
// subtracted from |packet.enqueue_time_ms| when the packet was pushed, and
// by subtracting it now we effectively remove the time spent in in the
// queue while in a paused state.
@ -185,11 +185,11 @@ std::unique_ptr<RtpPacketToSend> RoundRobinPacketQueue::Pop() {
RTC_CHECK(queued_packet.EnqueueTimeIterator() != enqueue_times_.end());
enqueue_times_.erase(queued_packet.EnqueueTimeIterator());
// Update |bytes| of this stream. The general idea is that the stream that
// Update `bytes` of this stream. The general idea is that the stream that
// has sent the least amount of bytes should have the highest priority.
// The problem with that is if streams send with different rates, in which
// case a "budget" will be built up for the stream sending at the lower
// rate. To avoid building a too large budget we limit |bytes| to be within
// rate. To avoid building a too large budget we limit `bytes` to be within
// kMaxLeading bytes of the stream that has sent the most amount of bytes.
DataSize packet_size = PacketSize(queued_packet);
stream->size =
@ -331,13 +331,13 @@ void RoundRobinPacketQueue::Push(QueuedPacket packet) {
Stream* stream = &stream_info_it->second;
if (stream->priority_it == stream_priorities_.end()) {
// If the SSRC is not currently scheduled, add it to |stream_priorities_|.
// If the SSRC is not currently scheduled, add it to `stream_priorities_`.
RTC_CHECK(!IsSsrcScheduled(stream->ssrc));
stream->priority_it = stream_priorities_.emplace(
StreamPrioKey(packet.Priority(), stream->size), packet.Ssrc());
} else if (packet.Priority() < stream->priority_it->first.priority) {
// If the priority of this SSRC increased, remove the outdated StreamPrioKey
// and insert a new one with the new priority. Note that |priority_| uses
// and insert a new one with the new priority. Note that `priority_` uses
// lower ordinal for higher priority.
stream_priorities_.erase(stream->priority_it);
stream->priority_it = stream_priorities_.emplace(

View File

@ -128,8 +128,8 @@ class RoundRobinPacketQueue {
PriorityPacketQueue packet_queue;
// Whenever a packet is inserted for this stream we check if |priority_it|
// points to an element in |stream_priorities_|, and if it does it means
// Whenever a packet is inserted for this stream we check if `priority_it`
// points to an element in `stream_priorities_`, and if it does it means
// this stream has already been scheduled, and if the scheduled priority is
// lower than the priority of the incoming packet we reschedule this stream
// with the higher priority.

View File

@ -56,7 +56,7 @@ class RtpPacketPacer {
// Set the average upper bound on pacer queuing delay. The pacer may send at
// a higher rate than what was configured via SetPacingRates() in order to
// keep ExpectedQueueTimeMs() below |limit_ms| on average.
// keep ExpectedQueueTimeMs() below `limit_ms` on average.
virtual void SetQueueTimeLimit(TimeDelta limit) = 0;
// Currently audio traffic is not accounted by pacer and passed through.

View File

@ -22,10 +22,10 @@
namespace webrtc {
namespace {
// If no calls to MaybeProcessPackets() happen, make sure we update stats
// at least every |kMaxTimeBetweenStatsUpdates| as long as the pacer isn't
// at least every `kMaxTimeBetweenStatsUpdates` as long as the pacer isn't
// completely drained.
constexpr TimeDelta kMaxTimeBetweenStatsUpdates = TimeDelta::Millis(33);
// Don't call UpdateStats() more than |kMinTimeBetweenStatsUpdates| apart,
// Don't call UpdateStats() more than `kMinTimeBetweenStatsUpdates` apart,
// for performance reasons.
constexpr TimeDelta kMinTimeBetweenStatsUpdates = TimeDelta::Millis(1);
} // namespace
@ -243,7 +243,7 @@ void TaskQueuePacedSender::MaybeProcessPackets(
} else if (next_process_time_.IsMinusInfinity() ||
next_process_time <= next_process_time_ - hold_back_window_) {
// Schedule a new task since there is none currently scheduled
// (|next_process_time_| is infinite), or the new process time is at least
// (`next_process_time_` is infinite), or the new process time is at least
// one holdback window earlier than whatever is currently scheduled.
time_to_next_process = std::max(next_process_time - now, hold_back_window_);
}

View File

@ -39,7 +39,7 @@ class RtcEventLog;
class TaskQueuePacedSender : public RtpPacketPacer, public RtpPacketSender {
public:
// The |hold_back_window| parameter sets a lower bound on time to sleep if
// The `hold_back_window` parameter sets a lower bound on time to sleep if
// there is currently a pacer queue and packets can't immediately be
// processed. Increasing this reduces thread wakeups at the expense of higher
// latency.
@ -136,7 +136,7 @@ class TaskQueuePacedSender : public RtpPacketPacer, public RtpPacketSender {
PacingController pacing_controller_ RTC_GUARDED_BY(task_queue_);
// We want only one (valid) delayed process task in flight at a time.
// If the value of |next_process_time_| is finite, it is an id for a
// If the value of `next_process_time_` is finite, it is an id for a
// delayed task that will call MaybeProcessPackets() with that time
// as parameter.
// Timestamp::MinusInfinity() indicates no valid pending task.
@ -144,7 +144,7 @@ class TaskQueuePacedSender : public RtpPacketPacer, public RtpPacketSender {
// Since we don't want to support synchronous calls that wait for a
// task execution, we poll the stats at some interval and update
// |current_stats_|, which can in turn be polled at any time.
// `current_stats_`, which can in turn be polled at any time.
// True iff there is delayed task in flight that that will call
// UdpateStats().

View File

@ -424,7 +424,7 @@ namespace test {
// At this point, the pace queue is drained so there is no more intersting
// update to be made - but there is still as schduled task that should run
// |kMaxTimeBetweenStatsUpdates| after the first update.
// `kMaxTimeBetweenStatsUpdates` after the first update.
time_controller.AdvanceTime(start_time + kMaxTimeBetweenStatsUpdates -
clock->CurrentTime());
EXPECT_EQ(pacer.num_stats_updates_, ++num_expected_stats_updates);