diff --git a/modules/pacing/bitrate_prober.cc b/modules/pacing/bitrate_prober.cc index 381a54d50a..ed4b7760c7 100644 --- a/modules/pacing/bitrate_prober.cc +++ b/modules/pacing/bitrate_prober.cc @@ -164,7 +164,7 @@ absl::optional 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()) { diff --git a/modules/pacing/bitrate_prober.h b/modules/pacing/bitrate_prober.h index 5a89aac435..3ac431cee3 100644 --- a/modules/pacing/bitrate_prober.h +++ b/modules/pacing/bitrate_prober.h @@ -38,7 +38,7 @@ struct BitrateProberConfig { // Maximum amount of time each probe can be delayed. FieldTrialParameter 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 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: diff --git a/modules/pacing/paced_sender.h b/modules/pacing/paced_sender.h index c819f3fb79..fe29bc567b 100644 --- a/modules/pacing/paced_sender.h +++ b/modules/pacing/paced_sender.h @@ -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, diff --git a/modules/pacing/pacing_controller.cc b/modules/pacing/pacing_controller.cc index e0ace4e65e..27cfb9210a 100644 --- a/modules/pacing/pacing_controller.cc +++ b/modules/pacing/pacing_controller.cc @@ -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; } diff --git a/modules/pacing/pacing_controller.h b/modules/pacing/pacing_controller.h index b0bdfb2e42..38bb9e543e 100644 --- a/modules/pacing/pacing_controller.h +++ b/modules/pacing/pacing_controller.h @@ -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. diff --git a/modules/pacing/packet_router.h b/modules/pacing/packet_router.h index 7a6e24d7ea..3e8a0f3312 100644 --- a/modules/pacing/packet_router.h +++ b/modules/pacing/packet_router.h @@ -63,7 +63,7 @@ class PacketRouter : public PacingController::PacketSender { // Send REMB feedback. void SendRemb(int64_t bitrate_bps, std::vector ssrcs); - // Sends |packets| in one or more IP packets. + // Sends `packets` in one or more IP packets. void SendCombinedRtcpPacket( std::vector> packets); diff --git a/modules/pacing/round_robin_packet_queue.cc b/modules/pacing/round_robin_packet_queue.cc index 8094ccdc84..1feb5a96c8 100644 --- a/modules/pacing/round_robin_packet_queue.cc +++ b/modules/pacing/round_robin_packet_queue.cc @@ -174,7 +174,7 @@ std::unique_ptr 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 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( diff --git a/modules/pacing/round_robin_packet_queue.h b/modules/pacing/round_robin_packet_queue.h index cad555a1af..dd35b90d93 100644 --- a/modules/pacing/round_robin_packet_queue.h +++ b/modules/pacing/round_robin_packet_queue.h @@ -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. diff --git a/modules/pacing/rtp_packet_pacer.h b/modules/pacing/rtp_packet_pacer.h index d826eddd87..3dc2b27612 100644 --- a/modules/pacing/rtp_packet_pacer.h +++ b/modules/pacing/rtp_packet_pacer.h @@ -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. diff --git a/modules/pacing/task_queue_paced_sender.cc b/modules/pacing/task_queue_paced_sender.cc index 709718ff16..515cba31dd 100644 --- a/modules/pacing/task_queue_paced_sender.cc +++ b/modules/pacing/task_queue_paced_sender.cc @@ -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_); } diff --git a/modules/pacing/task_queue_paced_sender.h b/modules/pacing/task_queue_paced_sender.h index 0673441e52..d39417bf45 100644 --- a/modules/pacing/task_queue_paced_sender.h +++ b/modules/pacing/task_queue_paced_sender.h @@ -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(). diff --git a/modules/pacing/task_queue_paced_sender_unittest.cc b/modules/pacing/task_queue_paced_sender_unittest.cc index 3806ec28d2..aca1ba0b4d 100644 --- a/modules/pacing/task_queue_paced_sender_unittest.cc +++ b/modules/pacing/task_queue_paced_sender_unittest.cc @@ -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);