Use backticks not vertical bars to denote variables in comments for /modules/rtp_rtcp
Bug: webrtc:12338 Change-Id: I52eb3b6675c4705e22f51b70799ed6139a3b46bc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227164 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34686}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
7f9ab1aa1b
commit
913cfa76ec
@ -40,17 +40,17 @@ constexpr int kMaxExcessOverhead = 50; // Q8.
|
||||
constexpr size_t kMinMediaPackets = 4;
|
||||
|
||||
// Threshold on the received FEC protection level, above which we enforce at
|
||||
// least |kMinMediaPackets| packets for the FEC code. Below this
|
||||
// threshold |kMinMediaPackets| is set to default value of 1.
|
||||
// least `kMinMediaPackets` packets for the FEC code. Below this
|
||||
// threshold `kMinMediaPackets` is set to default value of 1.
|
||||
//
|
||||
// The range is between 0 and 255, where 255 corresponds to 100% overhead
|
||||
// (relative to the number of protected media packets).
|
||||
constexpr uint8_t kHighProtectionThreshold = 80;
|
||||
|
||||
// This threshold is used to adapt the |kMinMediaPackets| threshold, based
|
||||
// This threshold is used to adapt the `kMinMediaPackets` threshold, based
|
||||
// on the average number of packets per frame seen so far. When there are few
|
||||
// packets per frame (as given by this threshold), at least
|
||||
// |kMinMediaPackets| + 1 packets are sent to the FEC code.
|
||||
// `kMinMediaPackets` + 1 packets are sent to the FEC code.
|
||||
constexpr float kMinMediaPacketsAdaptationThreshold = 2.0f;
|
||||
|
||||
// At construction time, we don't know the SSRC that is used for the generated
|
||||
@ -129,7 +129,7 @@ void UlpfecGenerator::AddPacketAndGenerateFec(const RtpPacketToSend& packet) {
|
||||
}
|
||||
const bool complete_frame = packet.Marker();
|
||||
if (media_packets_.size() < kUlpfecMaxMediaPackets) {
|
||||
// Our packet masks can only protect up to |kUlpfecMaxMediaPackets| packets.
|
||||
// Our packet masks can only protect up to `kUlpfecMaxMediaPackets` packets.
|
||||
auto fec_packet = std::make_unique<ForwardErrorCorrection::Packet>();
|
||||
fec_packet->data = packet.Buffer();
|
||||
media_packets_.push_back(std::move(fec_packet));
|
||||
@ -148,8 +148,8 @@ void UlpfecGenerator::AddPacketAndGenerateFec(const RtpPacketToSend& packet) {
|
||||
|
||||
// Produce FEC over at most |params_.max_fec_frames| frames, or as soon as:
|
||||
// (1) the excess overhead (actual overhead - requested/target overhead) is
|
||||
// less than |kMaxExcessOverhead|, and
|
||||
// (2) at least |min_num_media_packets_| media packets is reached.
|
||||
// less than `kMaxExcessOverhead`, and
|
||||
// (2) at least `min_num_media_packets_` media packets is reached.
|
||||
if (complete_frame &&
|
||||
(num_protected_frames_ >= params.max_fec_frames ||
|
||||
(ExcessOverheadBelowMax() && MinimumMediaPacketsReached()))) {
|
||||
@ -203,7 +203,7 @@ std::vector<std::unique_ptr<RtpPacketToSend>> UlpfecGenerator::GetFecPackets() {
|
||||
}
|
||||
|
||||
// Wrap FEC packet (including FEC headers) in a RED packet. Since the
|
||||
// FEC packets in |generated_fec_packets_| don't have RTP headers, we
|
||||
// FEC packets in `generated_fec_packets_` don't have RTP headers, we
|
||||
// reuse the header from the last media packet.
|
||||
RTC_CHECK(last_media_packet_.has_value());
|
||||
last_media_packet_->SetPayloadSize(0);
|
||||
|
||||
Reference in New Issue
Block a user