Use backticks not vertical bars to denote variables in comments

Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
This commit is contained in:
Artem Titov 2021-08-10 01:22:31 +02:00 committed by WebRTC LUCI CQ
parent 603e6e3ffc
commit cfea2182f8
114 changed files with 211 additions and 211 deletions

View file

@ -35,9 +35,9 @@ RTC_EXPORT rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
// without using a webrtc::PeerConnection. // without using a webrtc::PeerConnection.
// The returned object must be accessed and destroyed on the thread that // The returned object must be accessed and destroyed on the thread that
// created it. // created it.
// |init.port_allocator()| is required and must outlive the created // `init.port_allocator()` is required and must outlive the created
// IceTransportInterface object. // IceTransportInterface object.
// |init.async_resolver_factory()| and |init.event_log()| are optional, but if // `init.async_resolver_factory()` and `init.event_log()` are optional, but if
// provided must outlive the created IceTransportInterface object. // provided must outlive the created IceTransportInterface object.
RTC_EXPORT rtc::scoped_refptr<IceTransportInterface> CreateIceTransport( RTC_EXPORT rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
IceTransportInit); IceTransportInit);

View file

@ -166,8 +166,8 @@ class RTC_EXPORT SessionDescriptionInterface {
// Ownership is not transferred. // Ownership is not transferred.
// //
// Returns false if the session description does not have a media section // Returns false if the session description does not have a media section
// that corresponds to |candidate.sdp_mid()| or // that corresponds to `candidate.sdp_mid()` or
// |candidate.sdp_mline_index()|. // `candidate.sdp_mline_index()`.
virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0; virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0;
// Removes the candidates from the description, if found. // Removes the candidates from the description, if found.

View file

@ -1295,8 +1295,8 @@ class PeerConnectionObserver {
// This is called when signaling indicates a transceiver will be receiving // This is called when signaling indicates a transceiver will be receiving
// media from the remote endpoint. This is fired during a call to // media from the remote endpoint. This is fired during a call to
// SetRemoteDescription. The receiving track can be accessed by: // SetRemoteDescription. The receiving track can be accessed by:
// |transceiver->receiver()->track()| and its associated streams by // `transceiver->receiver()->track()` and its associated streams by
// |transceiver->receiver()->streams()|. // `transceiver->receiver()->streams()`.
// Note: This will only be called if Unified Plan semantics are specified. // Note: This will only be called if Unified Plan semantics are specified.
// This behavior is specified in section 2.2.8.2.5 of the "Set the // This behavior is specified in section 2.2.8.2.5 of the "Set the
// RTCSessionDescription" algorithm: // RTCSessionDescription" algorithm:

View file

@ -113,7 +113,7 @@ class RTC_EXPORT RtpPacketInfo {
// capture clock offset defined in the Absolute Capture Time header extension. // capture clock offset defined in the Absolute Capture Time header extension.
absl::optional<int64_t> local_capture_clock_offset_; absl::optional<int64_t> local_capture_clock_offset_;
// Local |webrtc::Clock|-based timestamp of when the packet was received. // Local `webrtc::Clock`-based timestamp of when the packet was received.
Timestamp receive_time_; Timestamp receive_time_;
}; };

View file

@ -26,8 +26,8 @@ namespace webrtc {
// an audio or video frame. Uses internal reference counting to make it very // an audio or video frame. Uses internal reference counting to make it very
// cheap to copy. // cheap to copy.
// //
// We should ideally just use |std::vector<RtpPacketInfo>| and have it // We should ideally just use `std::vector<RtpPacketInfo>` and have it
// |std::move()|-ed as the per-packet information is transferred from one object // `std::move()`-ed as the per-packet information is transferred from one object
// to another. But moving the info, instead of copying it, is not easily done // to another. But moving the info, instead of copying it, is not easily done
// for the current video code. // for the current video code.
class RTC_EXPORT RtpPacketInfos { class RTC_EXPORT RtpPacketInfos {

View file

@ -21,7 +21,7 @@ namespace webrtc {
// the observer to examine the effects of the operation without delay. // the observer to examine the effects of the operation without delay.
class SetLocalDescriptionObserverInterface : public rtc::RefCountInterface { class SetLocalDescriptionObserverInterface : public rtc::RefCountInterface {
public: public:
// On success, |error.ok()| is true. // On success, `error.ok()` is true.
virtual void OnSetLocalDescriptionComplete(RTCError error) = 0; virtual void OnSetLocalDescriptionComplete(RTCError error) = 0;
}; };

View file

@ -22,7 +22,7 @@ namespace webrtc {
// operation. // operation.
class SetRemoteDescriptionObserverInterface : public rtc::RefCountInterface { class SetRemoteDescriptionObserverInterface : public rtc::RefCountInterface {
public: public:
// On success, |error.ok()| is true. // On success, `error.ok()` is true.
virtual void OnSetRemoteDescriptionComplete(RTCError error) = 0; virtual void OnSetRemoteDescriptionComplete(RTCError error) = 0;
}; };

View file

@ -217,7 +217,7 @@ enum class NonStandardGroupId {
// Interface for `RTCStats` members, which have a name and a value of a type // Interface for `RTCStats` members, which have a name and a value of a type
// defined in a subclass. Only the types listed in `Type` are supported, these // defined in a subclass. Only the types listed in `Type` are supported, these
// are implemented by |RTCStatsMember<T>|. The value of a member may be // are implemented by `RTCStatsMember<T>`. The value of a member may be
// undefined, the value can only be read if `is_defined`. // undefined, the value can only be read if `is_defined`.
class RTCStatsMemberInterface { class RTCStatsMemberInterface {
public: public:
@ -286,7 +286,7 @@ class RTCStatsMemberInterface {
// Template implementation of `RTCStatsMemberInterface`. // Template implementation of `RTCStatsMemberInterface`.
// The supported types are the ones described by // The supported types are the ones described by
// |RTCStatsMemberInterface::Type|. // `RTCStatsMemberInterface::Type`.
template <typename T> template <typename T>
class RTCStatsMember : public RTCStatsMemberInterface { class RTCStatsMember : public RTCStatsMemberInterface {
public: public:

View file

@ -90,7 +90,7 @@ class RTC_EXPORT RTCStatsReport final
// Takes ownership of all the stats in `other`, leaving it empty. // Takes ownership of all the stats in `other`, leaving it empty.
void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other); void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other);
// Stats iterators. Stats are ordered lexicographically on |RTCStats::id|. // Stats iterators. Stats are ordered lexicographically on `RTCStats::id`.
ConstIterator begin() const; ConstIterator begin() const;
ConstIterator end() const; ConstIterator end() const;

View file

@ -57,7 +57,7 @@ struct RTCDtlsTransportState {
static const char* const kFailed; static const char* const kFailed;
}; };
// |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only // `RTCMediaStreamTrackStats::kind` is not an enum in the spec but the only
// valid values are "audio" and "video". // valid values are "audio" and "video".
// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind
struct RTCMediaStreamTrackKind { struct RTCMediaStreamTrackKind {

View file

@ -232,7 +232,7 @@ class RTC_EXPORT StatsReport {
kStatsValueNameSrtpCipher, kStatsValueNameSrtpCipher,
kStatsValueNameTargetDelayMs, kStatsValueNameTargetDelayMs,
kStatsValueNameTargetEncBitrate, kStatsValueNameTargetEncBitrate,
kStatsValueNameTimingFrameInfo, // Result of |TimingFrameInfo::ToString| kStatsValueNameTimingFrameInfo, // Result of `TimingFrameInfo::ToString`
kStatsValueNameTrackId, kStatsValueNameTrackId,
kStatsValueNameTransmitBitrate, kStatsValueNameTransmitBitrate,
kStatsValueNameTransportType, kStatsValueNameTransportType,

View file

@ -38,7 +38,7 @@ class RTC_LOCKABLE RTC_EXPORT TaskQueueBase {
virtual void Delete() = 0; virtual void Delete() = 0;
// Schedules a task to execute. Tasks are executed in FIFO order. // Schedules a task to execute. Tasks are executed in FIFO order.
// If |task->Run()| returns true, task is deleted on the task queue // If `task->Run()` returns true, task is deleted on the task queue
// before next QueuedTask starts executing. // before next QueuedTask starts executing.
// When a TaskQueue is deleted, pending tasks will not be executed but they // When a TaskQueue is deleted, pending tasks will not be executed but they
// will be deleted. The deletion of tasks may happen synchronously on the // will be deleted. The deletion of tasks may happen synchronously on the

View file

@ -287,7 +287,7 @@ class RTC_EXPORT VideoEncoder {
// the last InitEncode() call. // the last InitEncode() call.
double framerate_fps; double framerate_fps;
// The network bandwidth available for video. This is at least // The network bandwidth available for video. This is at least
// |bitrate.get_sum_bps()|, but may be higher if the application is not // `bitrate.get_sum_bps()`, but may be higher if the application is not
// network constrained. // network constrained.
DataRate bandwidth_allocation; DataRate bandwidth_allocation;

View file

@ -129,7 +129,7 @@ class VideoEncoderConfig {
// An implementation should return a std::vector<VideoStream> with the // An implementation should return a std::vector<VideoStream> with the
// wanted VideoStream settings for the given video resolution. // wanted VideoStream settings for the given video resolution.
// The size of the vector may not be larger than // The size of the vector may not be larger than
// |encoder_config.number_of_streams|. // `encoder_config.number_of_streams`.
virtual std::vector<VideoStream> CreateEncoderStreams( virtual std::vector<VideoStream> CreateEncoderStreams(
int width, int width,
int height, int height,

View file

@ -129,7 +129,7 @@ class Vp8FrameBufferController {
// Called by the encoder before encoding a frame. Returns a set of overrides // Called by the encoder before encoding a frame. Returns a set of overrides
// the controller wishes to enact in the encoder's configuration. // the controller wishes to enact in the encoder's configuration.
// If a value is not overridden, previous overrides are still in effect. // If a value is not overridden, previous overrides are still in effect.
// However, if |Vp8EncoderConfig::reset_previous_configuration_overrides| // However, if `Vp8EncoderConfig::reset_previous_configuration_overrides`
// is set to `true`, all previous overrides are reset. // is set to `true`, all previous overrides are reset.
virtual Vp8EncoderConfig UpdateConfiguration(size_t stream_index) = 0; virtual Vp8EncoderConfig UpdateConfiguration(size_t stream_index) = 0;

View file

@ -464,7 +464,7 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo(
} }
} }
// Fill in local capture clock offset in |audio_frame->packet_infos_|. // Fill in local capture clock offset in `audio_frame->packet_infos_`.
RtpPacketInfos::vector_type packet_infos; RtpPacketInfos::vector_type packet_infos;
for (auto& packet_info : audio_frame->packet_infos_) { for (auto& packet_info : audio_frame->packet_infos_) {
absl::optional<int64_t> local_capture_clock_offset; absl::optional<int64_t> local_capture_clock_offset;

View file

@ -33,13 +33,13 @@ class AudioFrameOperations {
// `result_frame` is empty. // `result_frame` is empty.
static void Add(const AudioFrame& frame_to_add, AudioFrame* result_frame); static void Add(const AudioFrame& frame_to_add, AudioFrame* result_frame);
// |frame.num_channels_| will be updated. This version checks for sufficient // `frame.num_channels_` will be updated. This version checks for sufficient
// buffer size and that `num_channels_` is mono. Use UpmixChannels // buffer size and that `num_channels_` is mono. Use UpmixChannels
// instead. TODO(bugs.webrtc.org/8649): remove. // instead. TODO(bugs.webrtc.org/8649): remove.
ABSL_DEPRECATED("bugs.webrtc.org/8649") ABSL_DEPRECATED("bugs.webrtc.org/8649")
static int MonoToStereo(AudioFrame* frame); static int MonoToStereo(AudioFrame* frame);
// |frame.num_channels_| will be updated. This version checks that // `frame.num_channels_` will be updated. This version checks that
// `num_channels_` is stereo. Use DownmixChannels // `num_channels_` is stereo. Use DownmixChannels
// instead. TODO(bugs.webrtc.org/8649): remove. // instead. TODO(bugs.webrtc.org/8649): remove.
ABSL_DEPRECATED("bugs.webrtc.org/8649") ABSL_DEPRECATED("bugs.webrtc.org/8649")
@ -52,7 +52,7 @@ class AudioFrameOperations {
size_t samples_per_channel, size_t samples_per_channel,
int16_t* dst_audio); int16_t* dst_audio);
// |frame.num_channels_| will be updated. This version checks that // `frame.num_channels_` will be updated. This version checks that
// `num_channels_` is 4 channels. // `num_channels_` is 4 channels.
static int QuadToStereo(AudioFrame* frame); static int QuadToStereo(AudioFrame* frame);
@ -66,12 +66,12 @@ class AudioFrameOperations {
size_t dst_channels, size_t dst_channels,
int16_t* dst_audio); int16_t* dst_audio);
// |frame.num_channels_| will be updated. This version checks that // `frame.num_channels_` will be updated. This version checks that
// `num_channels_` and `dst_channels` are valid and performs relevant downmix. // `num_channels_` and `dst_channels` are valid and performs relevant downmix.
// Supported channel combinations are N channels to Mono, and Quad to Stereo. // Supported channel combinations are N channels to Mono, and Quad to Stereo.
static void DownmixChannels(size_t dst_channels, AudioFrame* frame); static void DownmixChannels(size_t dst_channels, AudioFrame* frame);
// |frame.num_channels_| will be updated. This version checks that // `frame.num_channels_` will be updated. This version checks that
// `num_channels_` and `dst_channels` are valid and performs relevant // `num_channels_` and `dst_channels` are valid and performs relevant
// downmix. Supported channel combinations are Mono to N // downmix. Supported channel combinations are Mono to N
// channels. The single channel is replicated. // channels. The single channel is replicated.

View file

@ -81,7 +81,7 @@ struct RtpConfig {
// If rids are specified, they should correspond to the `ssrcs` vector. // If rids are specified, they should correspond to the `ssrcs` vector.
// This means that: // This means that:
// 1. rids.size() == 0 || rids.size() == ssrcs.size(). // 1. rids.size() == 0 || rids.size() == ssrcs.size().
// 2. If rids is not empty, then |rids[i]| should use |ssrcs[i]|. // 2. If rids is not empty, then `rids[i]` should use `ssrcs[i]`.
std::vector<std::string> rids; std::vector<std::string> rids;
// The value to send in the MID RTP header extension if the extension is // The value to send in the MID RTP header extension if the extension is

View file

@ -216,8 +216,8 @@ void SimulatedNetwork::UpdateCapacityQueue(ConfigState state,
pending_drain_bits_ -= packet.packet.size * 8; pending_drain_bits_ -= packet.packet.size * 8;
RTC_DCHECK(pending_drain_bits_ >= 0); RTC_DCHECK(pending_drain_bits_ >= 0);
// Drop packets at an average rate of |state.config.loss_percent| with // Drop packets at an average rate of `state.config.loss_percent` with
// and average loss burst length of |state.config.avg_burst_loss_length|. // and average loss burst length of `state.config.avg_burst_loss_length`.
if ((bursting_ && random_.Rand<double>() < state.prob_loss_bursting) || if ((bursting_ && random_.Rand<double>() < state.prob_loss_bursting) ||
(!bursting_ && random_.Rand<double>() < state.prob_start_bursting)) { (!bursting_ && random_.Rand<double>() < state.prob_start_bursting)) {
bursting_ = true; bursting_ = true;

View file

@ -298,8 +298,8 @@ static int16_t GmmProbability(VadInstT* self, int16_t* features,
nmk2 = nmk; nmk2 = nmk;
if (!vadflag) { if (!vadflag) {
// deltaN = (x-mu)/sigma^2 // deltaN = (x-mu)/sigma^2
// ngprvec[k] = |noise_probability[k]| / // ngprvec[k] = `noise_probability[k]` /
// (|noise_probability[0]| + |noise_probability[1]|) // (`noise_probability[0]` + `noise_probability[1]`)
// (Q14 * Q11 >> 11) = Q14. // (Q14 * Q11 >> 11) = Q14.
delt = (int16_t)((ngprvec[gaussian] * deltaN[gaussian]) >> 11); delt = (int16_t)((ngprvec[gaussian] * deltaN[gaussian]) >> 11);
@ -327,8 +327,8 @@ static int16_t GmmProbability(VadInstT* self, int16_t* features,
if (vadflag) { if (vadflag) {
// Update speech mean vector: // Update speech mean vector:
// `deltaS` = (x-mu)/sigma^2 // `deltaS` = (x-mu)/sigma^2
// sgprvec[k] = |speech_probability[k]| / // sgprvec[k] = `speech_probability[k]` /
// (|speech_probability[0]| + |speech_probability[1]|) // (`speech_probability[0]` + `speech_probability[1]`)
// (Q14 * Q11) >> 11 = Q14. // (Q14 * Q11) >> 11 = Q14.
delt = (int16_t)((sgprvec[gaussian] * deltaS[gaussian]) >> 11); delt = (int16_t)((sgprvec[gaussian] * deltaS[gaussian]) >> 11);
@ -430,14 +430,14 @@ static int16_t GmmProbability(VadInstT* self, int16_t* features,
tmp2_s16 = (int16_t)((3 * tmp_s16) >> 2); tmp2_s16 = (int16_t)((3 * tmp_s16) >> 2);
// Move Gaussian means for speech model by `tmp1_s16` and update // Move Gaussian means for speech model by `tmp1_s16` and update
// `speech_global_mean`. Note that |self->speech_means[channel]| is // `speech_global_mean`. Note that `self->speech_means[channel]` is
// changed after the call. // changed after the call.
speech_global_mean = WeightedAverage(&self->speech_means[channel], speech_global_mean = WeightedAverage(&self->speech_means[channel],
tmp1_s16, tmp1_s16,
&kSpeechDataWeights[channel]); &kSpeechDataWeights[channel]);
// Move Gaussian means for noise model by -`tmp2_s16` and update // Move Gaussian means for noise model by -`tmp2_s16` and update
// `noise_global_mean`. Note that |self->noise_means[channel]| is // `noise_global_mean`. Note that `self->noise_means[channel]` is
// changed after the call. // changed after the call.
noise_global_mean = WeightedAverage(&self->noise_means[channel], noise_global_mean = WeightedAverage(&self->noise_means[channel],
-tmp2_s16, -tmp2_s16,

View file

@ -35,7 +35,7 @@ void WebRtcVad_Downsampling(const int16_t* signal_in,
// Updates and returns the smoothed feature minimum. As minimum we use the // Updates and returns the smoothed feature minimum. As minimum we use the
// median of the five smallest feature values in a 100 frames long window. // median of the five smallest feature values in a 100 frames long window.
// As long as |handle->frame_counter| is zero, that is, we haven't received any // As long as `handle->frame_counter` is zero, that is, we haven't received any
// "valid" data, FindMinimum() outputs the default value of 1600. // "valid" data, FindMinimum() outputs the default value of 1600.
// //
// Inputs: // Inputs:

View file

@ -20,7 +20,7 @@ namespace {
bool HasOneRef(const rtc::scoped_refptr<VideoFrameBuffer>& buffer) { bool HasOneRef(const rtc::scoped_refptr<VideoFrameBuffer>& buffer) {
// Cast to rtc::RefCountedObject is safe because this function is only called // Cast to rtc::RefCountedObject is safe because this function is only called
// on locally created VideoFrameBuffers, which are either // on locally created VideoFrameBuffers, which are either
// |rtc::RefCountedObject<I420Buffer>| or |rtc::RefCountedObject<NV12Buffer>|. // `rtc::RefCountedObject<I420Buffer>` or `rtc::RefCountedObject<NV12Buffer>`.
switch (buffer->type()) { switch (buffer->type()) {
case VideoFrameBuffer::Type::kI420: { case VideoFrameBuffer::Type::kI420: {
return static_cast<rtc::RefCountedObject<I420Buffer>*>(buffer.get()) return static_cast<rtc::RefCountedObject<I420Buffer>*>(buffer.get())
@ -94,7 +94,7 @@ rtc::scoped_refptr<I420Buffer> VideoFrameBufferPool::CreateI420Buffer(
GetExistingBuffer(width, height, VideoFrameBuffer::Type::kI420); GetExistingBuffer(width, height, VideoFrameBuffer::Type::kI420);
if (existing_buffer) { if (existing_buffer) {
// Cast is safe because the only way kI420 buffer is created is // Cast is safe because the only way kI420 buffer is created is
// in the same function below, where |RefCountedObject<I420Buffer>| is // in the same function below, where `RefCountedObject<I420Buffer>` is
// created. // created.
rtc::RefCountedObject<I420Buffer>* raw_buffer = rtc::RefCountedObject<I420Buffer>* raw_buffer =
static_cast<rtc::RefCountedObject<I420Buffer>*>(existing_buffer.get()); static_cast<rtc::RefCountedObject<I420Buffer>*>(existing_buffer.get());
@ -125,7 +125,7 @@ rtc::scoped_refptr<NV12Buffer> VideoFrameBufferPool::CreateNV12Buffer(
GetExistingBuffer(width, height, VideoFrameBuffer::Type::kNV12); GetExistingBuffer(width, height, VideoFrameBuffer::Type::kNV12);
if (existing_buffer) { if (existing_buffer) {
// Cast is safe because the only way kI420 buffer is created is // Cast is safe because the only way kI420 buffer is created is
// in the same function below, where |RefCountedObject<I420Buffer>| is // in the same function below, where `RefCountedObject<I420Buffer>` is
// created. // created.
rtc::RefCountedObject<NV12Buffer>* raw_buffer = rtc::RefCountedObject<NV12Buffer>* raw_buffer =
static_cast<rtc::RefCountedObject<NV12Buffer>*>(existing_buffer.get()); static_cast<rtc::RefCountedObject<NV12Buffer>*>(existing_buffer.get());

View file

@ -29,19 +29,19 @@ Contact <kron@google.com> or <sprang@google.com> for more info.
Data layout of transport-wide sequence number Data layout of transport-wide sequence number
1-byte header + 2 bytes of data: 1-byte header + 2 bytes of data:
0              1 2 0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ID   | L=1 |transport-wide sequence number | | ID | L=1 |transport-wide sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Data layout of transport-wide sequence number and optional feedback request Data layout of transport-wide sequence number and optional feedback request
1-byte header + 4 bytes of data: 1-byte header + 4 bytes of data:
0              1 2                   3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ID   | L=3 |transport-wide sequence number |T|  seq count | | ID | L=3 |transport-wide sequence number |T| seq count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|seq count cont.| |seq count cont.|
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+

View file

@ -288,7 +288,7 @@ rtclog2::IceCandidatePairEvent::IceCandidatePairEventType ConvertToProtoFormat(
} }
// Copies all RTCP blocks except APP, SDES and unknown from `packet` to // Copies all RTCP blocks except APP, SDES and unknown from `packet` to
// `buffer`. `buffer` must have space for at least |packet.size()| bytes. // `buffer`. `buffer` must have space for at least `packet.size()` bytes.
size_t RemoveNonAllowlistedRtcpBlocks(const rtc::Buffer& packet, size_t RemoveNonAllowlistedRtcpBlocks(const rtc::Buffer& packet,
uint8_t* buffer) { uint8_t* buffer) {
RTC_DCHECK(buffer != nullptr); RTC_DCHECK(buffer != nullptr);

View file

@ -18,7 +18,7 @@
namespace cricket { namespace cricket {
// Delayable is used by user code through ApplyConstraints algorithm. Its // Delayable is used by user code through ApplyConstraints algorithm. Its
// methods must take precendence over similar functional in |syncable.h|. // methods must take precendence over similar functional in `syncable.h`.
class Delayable { class Delayable {
public: public:
virtual ~Delayable() {} virtual ~Delayable() {}

View file

@ -86,24 +86,24 @@ class RTC_EXPORT VideoAdapter {
const absl::optional<int>& max_fps) RTC_LOCKS_EXCLUDED(mutex_); const absl::optional<int>& max_fps) RTC_LOCKS_EXCLUDED(mutex_);
// Requests the output frame size from `AdaptFrameResolution` to have as close // Requests the output frame size from `AdaptFrameResolution` to have as close
// as possible to |sink_wants.target_pixel_count| pixels (if set) // as possible to `sink_wants.target_pixel_count` pixels (if set)
// but no more than |sink_wants.max_pixel_count|. // but no more than `sink_wants.max_pixel_count`.
// |sink_wants.max_framerate_fps| is essentially analogous to // `sink_wants.max_framerate_fps` is essentially analogous to
// |sink_wants.max_pixel_count|, but for framerate rather than resolution. // `sink_wants.max_pixel_count`, but for framerate rather than resolution.
// Set |sink_wants.max_pixel_count| and/or |sink_wants.max_framerate_fps| to // Set `sink_wants.max_pixel_count` and/or `sink_wants.max_framerate_fps` to
// std::numeric_limit<int>::max() if no upper limit is desired. // std::numeric_limit<int>::max() if no upper limit is desired.
// The sink resolution alignment requirement is given by // The sink resolution alignment requirement is given by
// |sink_wants.resolution_alignment|. // `sink_wants.resolution_alignment`.
// Note: Should be called from the sink only. // Note: Should be called from the sink only.
void OnSinkWants(const rtc::VideoSinkWants& sink_wants) void OnSinkWants(const rtc::VideoSinkWants& sink_wants)
RTC_LOCKS_EXCLUDED(mutex_); RTC_LOCKS_EXCLUDED(mutex_);
// Returns maximum image area, which shouldn't impose any adaptations. // Returns maximum image area, which shouldn't impose any adaptations.
// Can return |numeric_limits<int>::max()| if no limit is set. // Can return `numeric_limits<int>::max()` if no limit is set.
int GetTargetPixels() const; int GetTargetPixels() const;
// Returns current frame-rate limit. // Returns current frame-rate limit.
// Can return |numeric_limits<float>::infinity()| if no limit is set. // Can return `numeric_limits<float>::infinity()` if no limit is set.
float GetMaxFramerate() const; float GetMaxFramerate() const;
private: private:
@ -124,7 +124,7 @@ class RTC_EXPORT VideoAdapter {
const int source_resolution_alignment_; const int source_resolution_alignment_;
// The currently applied resolution alignment, as given by the requirements: // The currently applied resolution alignment, as given by the requirements:
// - the fixed `source_resolution_alignment_`; and // - the fixed `source_resolution_alignment_`; and
// - the latest |sink_wants.resolution_alignment|. // - the latest `sink_wants.resolution_alignment`.
int resolution_alignment_ RTC_GUARDED_BY(mutex_); int resolution_alignment_ RTC_GUARDED_BY(mutex_);
// The target timestamp for the next frame based on requested format. // The target timestamp for the next frame based on requested format.

View file

@ -761,7 +761,7 @@ TEST_F(TestSimulcastEncoderAdapterFake, DoesNotLeakEncoders) {
EXPECT_EQ(3u, helper_->factory()->encoders().size()); EXPECT_EQ(3u, helper_->factory()->encoders().size());
// The adapter should destroy all encoders it has allocated. Since // The adapter should destroy all encoders it has allocated. Since
// |helper_->factory()| is owned by `adapter_`, however, we need to rely on // `helper_->factory()` is owned by `adapter_`, however, we need to rely on
// lsan to find leaks here. // lsan to find leaks here.
EXPECT_EQ(0, adapter_->Release()); EXPECT_EQ(0, adapter_->Release());
adapter_.reset(); adapter_.reset();

View file

@ -27,7 +27,7 @@ namespace cricket {
std::unique_ptr<MediaEngineInterface> CreateMediaEngine( std::unique_ptr<MediaEngineInterface> CreateMediaEngine(
MediaEngineDependencies dependencies) { MediaEngineDependencies dependencies) {
// TODO(sprang): Make populating |dependencies.trials| mandatory and remove // TODO(sprang): Make populating `dependencies.trials` mandatory and remove
// these fallbacks. // these fallbacks.
std::unique_ptr<webrtc::WebRtcKeyValueConfig> fallback_trials( std::unique_ptr<webrtc::WebRtcKeyValueConfig> fallback_trials(
dependencies.trials ? nullptr : new webrtc::FieldTrialBasedConfig()); dependencies.trials ? nullptr : new webrtc::FieldTrialBasedConfig());

View file

@ -152,8 +152,8 @@ absl::optional<std::string> GetAudioNetworkAdaptorConfig(
const AudioOptions& options) { const AudioOptions& options) {
if (options.audio_network_adaptor && *options.audio_network_adaptor && if (options.audio_network_adaptor && *options.audio_network_adaptor &&
options.audio_network_adaptor_config) { options.audio_network_adaptor_config) {
// Turn on audio network adaptor only when |options_.audio_network_adaptor| // Turn on audio network adaptor only when `options_.audio_network_adaptor`
// equals true and |options_.audio_network_adaptor_config| has a value. // equals true and `options_.audio_network_adaptor_config` has a value.
return options.audio_network_adaptor_config; return options.audio_network_adaptor_config;
} }
return absl::nullopt; return absl::nullopt;
@ -1495,10 +1495,10 @@ webrtc::RTCError WebRtcVoiceMediaChannel::SetRtpSendParameters(
} }
// TODO(minyue): The following legacy actions go into // TODO(minyue): The following legacy actions go into
// |WebRtcAudioSendStream::SetRtpParameters()| which is called at the end, // `WebRtcAudioSendStream::SetRtpParameters()` which is called at the end,
// though there are two difference: // though there are two difference:
// 1. |WebRtcVoiceMediaChannel::SetChannelSendParameters()| only calls // 1. `WebRtcVoiceMediaChannel::SetChannelSendParameters()` only calls
// `SetSendCodec` while |WebRtcAudioSendStream::SetRtpParameters()| calls // `SetSendCodec` while `WebRtcAudioSendStream::SetRtpParameters()` calls
// `SetSendCodecs`. The outcome should be the same. // `SetSendCodecs`. The outcome should be the same.
// 2. AudioSendStream can be recreated. // 2. AudioSendStream can be recreated.

View file

@ -2505,7 +2505,7 @@ TEST_P(WebRtcVoiceEngineTestFake, AudioNetworkAdaptorNotGetOverridden) {
const int initial_num = call_.GetNumCreatedSendStreams(); const int initial_num = call_.GetNumCreatedSendStreams();
cricket::AudioOptions options; cricket::AudioOptions options;
options.audio_network_adaptor = absl::nullopt; options.audio_network_adaptor = absl::nullopt;
// Unvalued |options.audio_network_adaptor|.should not reset audio network // Unvalued `options.audio_network_adaptor` should not reset audio network
// adaptor. // adaptor.
SetAudioSend(kSsrcX, true, nullptr, &options); SetAudioSend(kSsrcX, true, nullptr, &options);
// AudioSendStream not expected to be recreated. // AudioSendStream not expected to be recreated.

View file

@ -119,7 +119,7 @@ class SctpTransportInternal {
// Send data down this channel (will be wrapped as SCTP packets then given to // Send data down this channel (will be wrapped as SCTP packets then given to
// usrsctp that will then post the network interface). // usrsctp that will then post the network interface).
// Returns true iff successful data somewhere on the send-queue/network. // Returns true iff successful data somewhere on the send-queue/network.
// Uses |params.ssrc| as the SCTP sid. // Uses `params.ssrc` as the SCTP sid.
virtual bool SendData(int sid, virtual bool SendData(int sid,
const webrtc::SendDataParams& params, const webrtc::SendDataParams& params,
const rtc::CopyOnWriteBuffer& payload, const rtc::CopyOnWriteBuffer& payload,

View file

@ -180,7 +180,7 @@ class AcmReceiver {
// of NACK list are in the range of [N - `max_nack_list_size`, N). // of NACK list are in the range of [N - `max_nack_list_size`, N).
// //
// `max_nack_list_size` should be positive (none zero) and less than or // `max_nack_list_size` should be positive (none zero) and less than or
// equal to |Nack::kNackListSizeLimit|. Otherwise, No change is applied and -1 // equal to `Nack::kNackListSizeLimit`. Otherwise, No change is applied and -1
// is returned. 0 is returned at success. // is returned. 0 is returned at success.
// //
int EnableNack(size_t max_nack_list_size); int EnableNack(size_t max_nack_list_size);

View file

@ -229,7 +229,7 @@ int32_t AudioCodingModuleImpl::Encode(
const InputData& input_data, const InputData& input_data,
absl::optional<int64_t> absolute_capture_timestamp_ms) { absl::optional<int64_t> absolute_capture_timestamp_ms) {
// TODO(bugs.webrtc.org/10739): add dcheck that // TODO(bugs.webrtc.org/10739): add dcheck that
// |audio_frame.absolute_capture_timestamp_ms()| always has a value. // `audio_frame.absolute_capture_timestamp_ms()` always has a value.
AudioEncoder::EncodedInfo encoded_info; AudioEncoder::EncodedInfo encoded_info;
uint8_t previous_pltype; uint8_t previous_pltype;
@ -333,7 +333,7 @@ int AudioCodingModuleImpl::Add10MsData(const AudioFrame& audio_frame) {
MutexLock lock(&acm_mutex_); MutexLock lock(&acm_mutex_);
int r = Add10MsDataInternal(audio_frame, &input_data_); int r = Add10MsDataInternal(audio_frame, &input_data_);
// TODO(bugs.webrtc.org/10739): add dcheck that // TODO(bugs.webrtc.org/10739): add dcheck that
// |audio_frame.absolute_capture_timestamp_ms()| always has a value. // `audio_frame.absolute_capture_timestamp_ms()` always has a value.
return r < 0 return r < 0
? r ? r
: Encode(input_data_, audio_frame.absolute_capture_timestamp_ms()); : Encode(input_data_, audio_frame.absolute_capture_timestamp_ms());

View file

@ -85,7 +85,7 @@ TEST(AnaBitrateControllerTest, ChangeBitrateOnTargetBitrateChanged) {
1000 / 1000 /
kInitialFrameLengthMs; kInitialFrameLengthMs;
// Frame length unchanged, bitrate changes in accordance with // Frame length unchanged, bitrate changes in accordance with
// |metrics.target_audio_bitrate_bps| and |metrics.overhead_bytes_per_packet|. // `metrics.target_audio_bitrate_bps` and `metrics.overhead_bytes_per_packet`.
UpdateNetworkMetrics(&controller, kTargetBitrateBps, kOverheadBytesPerPacket); UpdateNetworkMetrics(&controller, kTargetBitrateBps, kOverheadBytesPerPacket);
CheckDecision(&controller, kInitialFrameLengthMs, kBitrateBps); CheckDecision(&controller, kInitialFrameLengthMs, kBitrateBps);
} }

View file

@ -169,7 +169,7 @@ message Controller {
// Shorter distance means higher significance. The significances of // Shorter distance means higher significance. The significances of
// controllers determine their order in the processing pipeline. Controllers // controllers determine their order in the processing pipeline. Controllers
// without `scoring_point` follow their default order in // without `scoring_point` follow their default order in
// |ControllerManager::controllers|. // `ControllerManager::controllers`.
optional ScoringPoint scoring_point = 1; optional ScoringPoint scoring_point = 1;
oneof controller { oneof controller {

View file

@ -101,7 +101,7 @@ void UpdateNetworkMetrics(FecControllerPlrBasedTestStates* states,
} }
// Checks that the FEC decision and `uplink_packet_loss_fraction` given by // Checks that the FEC decision and `uplink_packet_loss_fraction` given by
// |states->controller->MakeDecision| matches `expected_enable_fec` and // `states->controller->MakeDecision` matches `expected_enable_fec` and
// `expected_uplink_packet_loss_fraction`, respectively. // `expected_uplink_packet_loss_fraction`, respectively.
void CheckDecision(FecControllerPlrBasedTestStates* states, void CheckDecision(FecControllerPlrBasedTestStates* states,
bool expected_enable_fec, bool expected_enable_fec,

View file

@ -195,7 +195,7 @@ bool ComfortNoiseDecoder::Generate(rtc::ArrayView<int16_t> out_data,
/* `lpPoly` - Coefficients in Q12. /* `lpPoly` - Coefficients in Q12.
* `excitation` - Speech samples. * `excitation` - Speech samples.
* |nst->dec_filtstate| - State preservation. * `nst->dec_filtstate` - State preservation.
* `out_data` - Filtered speech samples. */ * `out_data` - Filtered speech samples. */
WebRtcSpl_FilterAR(lpPoly, WEBRTC_CNG_MAX_LPC_ORDER + 1, excitation, WebRtcSpl_FilterAR(lpPoly, WEBRTC_CNG_MAX_LPC_ORDER + 1, excitation,
num_samples, dec_filtstate_, WEBRTC_CNG_MAX_LPC_ORDER, num_samples, dec_filtstate_, WEBRTC_CNG_MAX_LPC_ORDER,

View file

@ -140,9 +140,9 @@ static void FilterSegment(const double* in_data, PitchFilterParam* parameters,
int j; int j;
double sum; double sum;
double sum2; double sum2;
/* Index of |parameters->buffer| where the output is written to. */ /* Index of `parameters->buffer` where the output is written to. */
int pos = parameters->index + PITCH_BUFFSIZE; int pos = parameters->index + PITCH_BUFFSIZE;
/* Index of |parameters->buffer| where samples are read for fractional-lag /* Index of `parameters->buffer` where samples are read for fractional-lag
* computation. */ * computation. */
int pos_lag = pos - parameters->lag_offset; int pos_lag = pos - parameters->lag_offset;
@ -174,9 +174,9 @@ static void FilterSegment(const double* in_data, PitchFilterParam* parameters,
/* Filter for fractional pitch. */ /* Filter for fractional pitch. */
sum2 = 0.0; sum2 = 0.0;
for (m = PITCH_FRACORDER-1; m >= m_tmp; --m) { for (m = PITCH_FRACORDER-1; m >= m_tmp; --m) {
/* |lag_index + m| is always larger than or equal to zero, see how /* `lag_index + m` is always larger than or equal to zero, see how
* m_tmp is computed. This is equivalent to assume samples outside * m_tmp is computed. This is equivalent to assume samples outside
* |out_dg[j]| are zero. */ * `out_dg[j]` are zero. */
sum2 += out_dg[j][lag_index + m] * parameters->interpol_coeff[m]; sum2 += out_dg[j][lag_index + m] * parameters->interpol_coeff[m];
} }
/* Add the contribution of differential gain change. */ /* Add the contribution of differential gain change. */

View file

@ -139,7 +139,7 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
absl::optional<int64_t> link_capacity_allocation); absl::optional<int64_t> link_capacity_allocation);
// TODO(minyue): remove "override" when we can deprecate // TODO(minyue): remove "override" when we can deprecate
// |AudioEncoder::SetTargetBitrate|. // `AudioEncoder::SetTargetBitrate`.
void SetTargetBitrate(int target_bps) override; void SetTargetBitrate(int target_bps) override;
void ApplyAudioNetworkAdaptor(); void ApplyAudioNetworkAdaptor();

View file

@ -116,7 +116,7 @@ class OpusTest
void TestCbrEffect(bool dtx, int block_length_ms); void TestCbrEffect(bool dtx, int block_length_ms);
// Prepare `speech_data_` for encoding, read from a hard-coded file. // Prepare `speech_data_` for encoding, read from a hard-coded file.
// After preparation, |speech_data_.GetNextBlock()| returns a pointer to a // After preparation, `speech_data_.GetNextBlock()` returns a pointer to a
// block of `block_length_ms` milliseconds. The data is looped every // block of `block_length_ms` milliseconds. The data is looped every
// `loop_length_ms` milliseconds. // `loop_length_ms` milliseconds.
void PrepareSpeechData(int block_length_ms, int loop_length_ms); void PrepareSpeechData(int block_length_ms, int loop_length_ms);

View file

@ -510,7 +510,7 @@ TEST_F(NetEqImplTest, VerifyTimestampPropagation) {
EXPECT_EQ(1u, output.num_channels_); EXPECT_EQ(1u, output.num_channels_);
EXPECT_EQ(AudioFrame::kNormalSpeech, output.speech_type_); EXPECT_EQ(AudioFrame::kNormalSpeech, output.speech_type_);
// Verify |output.packet_infos_|. // Verify `output.packet_infos_`.
ASSERT_THAT(output.packet_infos_, SizeIs(1)); ASSERT_THAT(output.packet_infos_, SizeIs(1));
{ {
const auto& packet_info = output.packet_infos_[0]; const auto& packet_info = output.packet_infos_[0];
@ -602,7 +602,7 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
EXPECT_EQ(1u, output.num_channels_); EXPECT_EQ(1u, output.num_channels_);
EXPECT_EQ(AudioFrame::kNormalSpeech, output.speech_type_); EXPECT_EQ(AudioFrame::kNormalSpeech, output.speech_type_);
// Verify |output.packet_infos_|. // Verify `output.packet_infos_`.
ASSERT_THAT(output.packet_infos_, SizeIs(1)); ASSERT_THAT(output.packet_infos_, SizeIs(1));
{ {
const auto& packet_info = output.packet_infos_[0]; const auto& packet_info = output.packet_infos_[0];
@ -648,7 +648,7 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
// out-of-order packet should have been discarded. // out-of-order packet should have been discarded.
EXPECT_TRUE(packet_buffer_->Empty()); EXPECT_TRUE(packet_buffer_->Empty());
// Verify |output.packet_infos_|. Expect to only see the second packet. // Verify `output.packet_infos_`. Expect to only see the second packet.
ASSERT_THAT(output.packet_infos_, SizeIs(1)); ASSERT_THAT(output.packet_infos_, SizeIs(1));
{ {
const auto& packet_info = output.packet_infos_[0]; const auto& packet_info = output.packet_infos_[0];

View file

@ -42,8 +42,8 @@ class FineAudioBuffer {
bool IsReadyForPlayout() const; bool IsReadyForPlayout() const;
bool IsReadyForRecord() const; bool IsReadyForRecord() const;
// Copies audio samples into `audio_buffer` where number of requested // Copies audio samples into `audio_buffer` where number of requested
// elements is specified by |audio_buffer.size()|. The producer will always // elements is specified by `audio_buffer.size()`. The producer will always
// fill up the audio buffer and if no audio exists, the buffer will contain // fill up the audio buffer and if no audio exists, the buffer will contain
// silence instead. The provided delay estimate in `playout_delay_ms` should // silence instead. The provided delay estimate in `playout_delay_ms` should
// contain an estimate of the latency between when an audio frame is read from // contain an estimate of the latency between when an audio frame is read from

View file

@ -448,7 +448,7 @@ bool CoreAudioBase::Init() {
// - HDAudio driver // - HDAudio driver
// - kEnableLowLatencyIfSupported changed from false (default) to true. // - kEnableLowLatencyIfSupported changed from false (default) to true.
// TODO(henrika): IsLowLatencySupported() returns AUDCLNT_E_UNSUPPORTED_FORMAT // TODO(henrika): IsLowLatencySupported() returns AUDCLNT_E_UNSUPPORTED_FORMAT
// when |sample_rate_.has_value()| returns true if rate conversion is // when `sample_rate_.has_value()` returns true if rate conversion is
// actually required (i.e., client asks for other than the default rate). // actually required (i.e., client asks for other than the default rate).
bool low_latency_support = false; bool low_latency_support = false;
uint32_t min_period_in_frames = 0; uint32_t min_period_in_frames = 0;

View file

@ -250,24 +250,24 @@ bool IsAlternativePitchStrongerThanInitial(PitchInfo last,
RTC_DCHECK_GE(initial.period, 0); RTC_DCHECK_GE(initial.period, 0);
RTC_DCHECK_GE(alternative.period, 0); RTC_DCHECK_GE(alternative.period, 0);
RTC_DCHECK_GE(period_divisor, 2); RTC_DCHECK_GE(period_divisor, 2);
// Compute a term that lowers the threshold when |alternative.period| is close // Compute a term that lowers the threshold when `alternative.period` is close
// to the last estimated period |last.period| - i.e., pitch tracking. // to the last estimated period `last.period` - i.e., pitch tracking.
float lower_threshold_term = 0.f; float lower_threshold_term = 0.f;
if (std::abs(alternative.period - last.period) <= 1) { if (std::abs(alternative.period - last.period) <= 1) {
// The candidate pitch period is within 1 sample from the last one. // The candidate pitch period is within 1 sample from the last one.
// Make the candidate at |alternative.period| very easy to be accepted. // Make the candidate at `alternative.period` very easy to be accepted.
lower_threshold_term = last.strength; lower_threshold_term = last.strength;
} else if (std::abs(alternative.period - last.period) == 2 && } else if (std::abs(alternative.period - last.period) == 2 &&
initial.period > initial.period >
kInitialPitchPeriodThresholds[period_divisor - 2]) { kInitialPitchPeriodThresholds[period_divisor - 2]) {
// The candidate pitch period is 2 samples far from the last one and the // The candidate pitch period is 2 samples far from the last one and the
// period |initial.period| (from which |alternative.period| has been // period `initial.period` (from which `alternative.period` has been
// derived) is greater than a threshold. Make |alternative.period| easy to // derived) is greater than a threshold. Make `alternative.period` easy to
// be accepted. // be accepted.
lower_threshold_term = 0.5f * last.strength; lower_threshold_term = 0.5f * last.strength;
} }
// Set the threshold based on the strength of the initial estimate // Set the threshold based on the strength of the initial estimate
// |initial.period|. Also reduce the chance of false positives caused by a // `initial.period`. Also reduce the chance of false positives caused by a
// bias towards high frequencies (originating from short-term correlations). // bias towards high frequencies (originating from short-term correlations).
float threshold = float threshold =
std::max(0.3f, 0.7f * initial.strength - lower_threshold_term); std::max(0.3f, 0.7f * initial.strength - lower_threshold_term);
@ -457,7 +457,7 @@ PitchInfo ComputeExtendedPitchPeriod48kHz(
alternative_pitch.period = GetAlternativePitchPeriod( alternative_pitch.period = GetAlternativePitchPeriod(
initial_pitch.period, /*multiplier=*/1, period_divisor); initial_pitch.period, /*multiplier=*/1, period_divisor);
RTC_DCHECK_GE(alternative_pitch.period, kMinPitch24kHz); RTC_DCHECK_GE(alternative_pitch.period, kMinPitch24kHz);
// When looking at |alternative_pitch.period|, we also look at one of its // When looking at `alternative_pitch.period`, we also look at one of its
// sub-harmonics. `kSubHarmonicMultipliers` is used to know where to look. // sub-harmonics. `kSubHarmonicMultipliers` is used to know where to look.
// `period_divisor` == 2 is a special case since `dual_alternative_period` // `period_divisor` == 2 is a special case since `dual_alternative_period`
// might be greater than the maximum pitch period. // might be greater than the maximum pitch period.
@ -472,7 +472,7 @@ PitchInfo ComputeExtendedPitchPeriod48kHz(
<< "The lower pitch period and the additional sub-harmonic must not " << "The lower pitch period and the additional sub-harmonic must not "
"coincide."; "coincide.";
// Compute an auto-correlation score for the primary pitch candidate // Compute an auto-correlation score for the primary pitch candidate
// |alternative_pitch.period| by also looking at its possible sub-harmonic // `alternative_pitch.period` by also looking at its possible sub-harmonic
// `dual_alternative_period`. // `dual_alternative_period`.
const float xy_primary_period = ComputeAutoCorrelation( const float xy_primary_period = ComputeAutoCorrelation(
kMaxPitch24kHz - alternative_pitch.period, pitch_buffer, vector_math); kMaxPitch24kHz - alternative_pitch.period, pitch_buffer, vector_math);

View file

@ -310,7 +310,7 @@ INSTANTIATE_TEST_SUITE_P(
GainController2, GainController2,
FixedDigitalTest, FixedDigitalTest,
::testing::Values( ::testing::Values(
// When gain < |test::kLimiterMaxInputLevelDbFs|, the limiter will not // When gain < `test::kLimiterMaxInputLevelDbFs`, the limiter will not
// saturate the signal (at any sample rate). // saturate the signal (at any sample rate).
FixedDigitalTestParams(0.1f, FixedDigitalTestParams(0.1f,
test::kLimiterMaxInputLevelDbFs - 0.01f, test::kLimiterMaxInputLevelDbFs - 0.01f,
@ -320,7 +320,7 @@ INSTANTIATE_TEST_SUITE_P(
test::kLimiterMaxInputLevelDbFs - 0.01f, test::kLimiterMaxInputLevelDbFs - 0.01f,
48000, 48000,
false), false),
// When gain > |test::kLimiterMaxInputLevelDbFs|, the limiter will // When gain > `test::kLimiterMaxInputLevelDbFs`, the limiter will
// saturate the signal (at any sample rate). // saturate the signal (at any sample rate).
FixedDigitalTestParams(test::kLimiterMaxInputLevelDbFs + 0.01f, FixedDigitalTestParams(test::kLimiterMaxInputLevelDbFs + 0.01f,
10.f, 10.f,

View file

@ -570,8 +570,8 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
// The int16 interfaces require: // The int16 interfaces require:
// - only `NativeRate`s be used // - only `NativeRate`s be used
// - that the input, output and reverse rates must match // - that the input, output and reverse rates must match
// - that |processing_config.output_stream()| matches // - that `processing_config.output_stream()` matches
// |processing_config.input_stream()|. // `processing_config.input_stream()`.
// //
// The float interfaces accept arbitrary rates and support differing input and // The float interfaces accept arbitrary rates and support differing input and
// output layouts, but the output must have either one channel or the same // output layouts, but the output must have either one channel or the same

View file

@ -349,7 +349,7 @@ class HtmlExport(object):
def _SliceDataForScoreTableCell(self, score_name, apm_config, def _SliceDataForScoreTableCell(self, score_name, apm_config,
test_data_gen, test_data_gen_params): test_data_gen, test_data_gen_params):
"""Slices |self._scores_data_frame| to extract the data for a tab.""" """Slices `self._scores_data_frame` to extract the data for a tab."""
masks = [] masks = []
masks.append(self._scores_data_frame.eval_score_name == score_name) masks.append(self._scores_data_frame.eval_score_name == score_name)
masks.append(self._scores_data_frame.apm_config == apm_config) masks.append(self._scores_data_frame.apm_config == apm_config)

View file

@ -91,7 +91,7 @@ void DesktopRegion::AddRect(const DesktopRect& rect) {
return; return;
// Top of the part of the `rect` that hasn't been inserted yet. Increased as // Top of the part of the `rect` that hasn't been inserted yet. Increased as
// we iterate over the rows until it reaches |rect.bottom()|. // we iterate over the rows until it reaches `rect.bottom()`.
int top = rect.top(); int top = rect.top();
// Iterate over all rows that may intersect with `rect` and add new rows when // Iterate over all rows that may intersect with `rect` and add new rows when
@ -456,7 +456,7 @@ void DesktopRegion::AddSpanToRow(Row* row, int left, int right) {
// static // static
bool DesktopRegion::IsSpanInRow(const Row& row, const RowSpan& span) { bool DesktopRegion::IsSpanInRow(const Row& row, const RowSpan& span) {
// Find the first span that starts at or after |span.left| and then check if // Find the first span that starts at or after `span.left` and then check if
// it's the same span. // it's the same span.
RowSpanSet::const_iterator it = std::lower_bound( RowSpanSet::const_iterator it = std::lower_bound(
row.spans.begin(), row.spans.end(), span.left, CompareSpanLeft); row.spans.begin(), row.spans.end(), span.left, CompareSpanLeft);

View file

@ -286,7 +286,7 @@ HRESULT WgcCaptureSession::GetFrame(
int image_width = std::min(previous_size_.Width, new_size.Width); int image_width = std::min(previous_size_.Width, new_size.Width);
int row_data_length = image_width * DesktopFrame::kBytesPerPixel; int row_data_length = image_width * DesktopFrame::kBytesPerPixel;
// Make a copy of the data pointed to by |map_info.pData| so we are free to // Make a copy of the data pointed to by `map_info.pData` so we are free to
// unmap our texture. // unmap our texture.
uint8_t* src_data = static_cast<uint8_t*>(map_info.pData); uint8_t* src_data = static_cast<uint8_t*>(map_info.pData);
std::vector<uint8_t> image_data; std::vector<uint8_t> image_data;

View file

@ -175,7 +175,7 @@ std::unique_ptr<RtpPacketToSend> RoundRobinPacketQueue::Pop() {
// Calculate the total amount of time spent by this packet in the queue // 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 // 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 // by subtracting it now we effectively remove the time spent in in the
// queue while in a paused state. // queue while in a paused state.
TimeDelta time_in_non_paused_state = TimeDelta time_in_non_paused_state =

View file

@ -45,7 +45,7 @@ class AbsoluteCaptureTimeInterpolator {
rtc::ArrayView<const uint32_t> csrcs); rtc::ArrayView<const uint32_t> csrcs);
// Returns a received header extension, an interpolated header extension, or // Returns a received header extension, an interpolated header extension, or
// |absl::nullopt| if it's not possible to interpolate a header extension. // `absl::nullopt` if it's not possible to interpolate a header extension.
absl::optional<AbsoluteCaptureTime> OnReceivePacket( absl::optional<AbsoluteCaptureTime> OnReceivePacket(
uint32_t source, uint32_t source,
uint32_t rtp_timestamp, uint32_t rtp_timestamp,

View file

@ -50,7 +50,7 @@ class AbsoluteCaptureTimeSender {
static uint32_t GetSource(uint32_t ssrc, static uint32_t GetSource(uint32_t ssrc,
rtc::ArrayView<const uint32_t> csrcs); rtc::ArrayView<const uint32_t> csrcs);
// Returns a header extension to be sent, or |absl::nullopt| if the header // Returns a header extension to be sent, or `absl::nullopt` if the header
// extension shouldn't be sent. // extension shouldn't be sent.
absl::optional<AbsoluteCaptureTime> OnSendPacket( absl::optional<AbsoluteCaptureTime> OnSendPacket(
uint32_t source, uint32_t source,

View file

@ -113,7 +113,7 @@ class UlpfecPacketGenerator : public AugmentedPacketGenerator {
// Creates a new RtpPacket with FEC payload and RED header. Does this by // Creates a new RtpPacket with FEC payload and RED header. Does this by
// creating a new fake media AugmentedPacket, clears the marker bit and adds a // creating a new fake media AugmentedPacket, clears the marker bit and adds a
// RED header. Finally replaces the payload with the content of // RED header. Finally replaces the payload with the content of
// |packet->data|. // `packet->data`.
RtpPacketReceived BuildUlpfecRedPacket( RtpPacketReceived BuildUlpfecRedPacket(
const ForwardErrorCorrection::Packet& packet); const ForwardErrorCorrection::Packet& packet);
}; };

View file

@ -138,7 +138,7 @@ class FeedbackTester {
}; };
// The following tests use FeedbackTester that simulates received packets as // The following tests use FeedbackTester that simulates received packets as
// specified by the parameters |received_seq[]| and |received_ts[]| (optional). // specified by the parameters `received_seq[]` and `received_ts[]` (optional).
// The following is verified in these tests: // The following is verified in these tests:
// - Expected size of serialized packet. // - Expected size of serialized packet.
// - Expected sequence numbers and receive deltas. // - Expected sequence numbers and receive deltas.

View file

@ -599,7 +599,7 @@ void RTCPReceiver::HandleReportBlock(const ReportBlock& report_block,
// //
// We can calc RTT if we send a send report and get a report block back. // We can calc RTT if we send a send report and get a report block back.
// |report_block.source_ssrc()| is the SSRC identifier of the source to // `report_block.source_ssrc()` is the SSRC identifier of the source to
// which the information in this reception report block pertains. // which the information in this reception report block pertains.
// Filter out all report blocks that are not for us. // Filter out all report blocks that are not for us.
@ -957,7 +957,7 @@ void RTCPReceiver::HandleTmmbr(const CommonHeader& rtcp_block,
entry->tmmbr_item = rtcp::TmmbItem(sender_ssrc, request.bitrate_bps(), entry->tmmbr_item = rtcp::TmmbItem(sender_ssrc, request.bitrate_bps(),
request.packet_overhead()); request.packet_overhead());
// FindOrCreateTmmbrInfo always sets `last_time_received_ms` to // FindOrCreateTmmbrInfo always sets `last_time_received_ms` to
// |clock_->TimeInMilliseconds()|. // `clock_->TimeInMilliseconds()`.
entry->last_updated_ms = tmmbr_info->last_time_received_ms; entry->last_updated_ms = tmmbr_info->last_time_received_ms;
packet_information->packet_type_flags |= kRtcpTmmbr; packet_information->packet_type_flags |= kRtcpTmmbr;

View file

@ -1335,7 +1335,7 @@ TEST(RtcpReceiverTest,
const int64_t kUtcNowUs = 42; const int64_t kUtcNowUs = 42;
// The "report_block_timestamp_utc_us" is obtained from the global UTC clock // The "report_block_timestamp_utc_us" is obtained from the global UTC clock
// (not the simulcated |mocks.clock|) and requires a scoped fake clock. // (not the simulcated `mocks.clock`) and requires a scoped fake clock.
rtc::ScopedFakeClock fake_clock; rtc::ScopedFakeClock fake_clock;
fake_clock.SetTime(Timestamp::Micros(kUtcNowUs)); fake_clock.SetTime(Timestamp::Micros(kUtcNowUs));

View file

@ -47,7 +47,7 @@ class RtcpTransceiver : public RtcpFeedbackSenderInterface {
void Stop(std::function<void()> on_destroyed); void Stop(std::function<void()> on_destroyed);
// Registers observer to be notified about incoming rtcp packets. // Registers observer to be notified about incoming rtcp packets.
// Calls to observer will be done on the |config.task_queue|. // Calls to observer will be done on the `config.task_queue`.
void AddMediaReceiverRtcpObserver(uint32_t remote_ssrc, void AddMediaReceiverRtcpObserver(uint32_t remote_ssrc,
MediaReceiverRtcpObserver* observer); MediaReceiverRtcpObserver* observer);
// Deregisters the observer. Might return before observer is deregistered. // Deregisters the observer. Might return before observer is deregistered.

View file

@ -431,7 +431,7 @@ std::vector<rtcp::ReportBlock> RtcpTransceiverImpl::CreateReportBlocks(
if (!config_.receive_statistics) if (!config_.receive_statistics)
return {}; return {};
// TODO(danilchap): Support sending more than // TODO(danilchap): Support sending more than
// |ReceiverReport::kMaxNumberOfReportBlocks| per compound rtcp packet. // `ReceiverReport::kMaxNumberOfReportBlocks` per compound rtcp packet.
std::vector<rtcp::ReportBlock> report_blocks = std::vector<rtcp::ReportBlock> report_blocks =
config_.receive_statistics->RtcpReportBlocks( config_.receive_statistics->RtcpReportBlocks(
rtcp::ReceiverReport::kMaxNumberOfReportBlocks); rtcp::ReceiverReport::kMaxNumberOfReportBlocks);

View file

@ -693,7 +693,7 @@ static void CopyHeaderAndExtensionsToRtxPacket(const RtpPacketToSend& packet,
continue; continue;
} }
// Empty extensions should be supported, so not checking |source.empty()|. // Empty extensions should be supported, so not checking `source.empty()`.
if (!packet.HasExtension(extension)) { if (!packet.HasExtension(extension)) {
continue; continue;
} }

View file

@ -30,12 +30,12 @@ namespace {
constexpr size_t kRedForFecHeaderLength = 1; constexpr size_t kRedForFecHeaderLength = 1;
// This controls the maximum amount of excess overhead (actual - target) // This controls the maximum amount of excess overhead (actual - target)
// allowed in order to trigger EncodeFec(), before |params_.max_fec_frames| // allowed in order to trigger EncodeFec(), before `params_.max_fec_frames`
// is reached. Overhead here is defined as relative to number of media packets. // is reached. Overhead here is defined as relative to number of media packets.
constexpr int kMaxExcessOverhead = 50; // Q8. constexpr int kMaxExcessOverhead = 50; // Q8.
// This is the minimum number of media packets required (above some protection // This is the minimum number of media packets required (above some protection
// level) in order to trigger EncodeFec(), before |params_.max_fec_frames| is // level) in order to trigger EncodeFec(), before `params_.max_fec_frames` is
// reached. // reached.
constexpr size_t kMinMediaPackets = 4; constexpr size_t kMinMediaPackets = 4;
@ -146,7 +146,7 @@ void UlpfecGenerator::AddPacketAndGenerateFec(const RtpPacketToSend& packet) {
auto params = CurrentParams(); auto params = CurrentParams();
// Produce FEC over at most |params_.max_fec_frames| frames, or as soon as: // Produce FEC over at most `params_.max_fec_frames` frames, or as soon as:
// (1) the excess overhead (actual overhead - requested/target overhead) is // (1) the excess overhead (actual overhead - requested/target overhead) is
// less than `kMaxExcessOverhead`, and // less than `kMaxExcessOverhead`, and
// (2) at least `min_num_media_packets_` media packets is reached. // (2) at least `min_num_media_packets_` media packets is reached.

View file

@ -83,7 +83,7 @@ class UlpfecGenerator : public VideoFecGenerator {
// Returns true if the excess overhead (actual - target) for the FEC is below // Returns true if the excess overhead (actual - target) for the FEC is below
// the amount `kMaxExcessOverhead`. This effects the lower protection level // the amount `kMaxExcessOverhead`. This effects the lower protection level
// cases and low number of media packets/frame. The target overhead is given // cases and low number of media packets/frame. The target overhead is given
// by |params_.fec_rate|, and is only achievable in the limit of large number // by `params_.fec_rate`, and is only achievable in the limit of large number
// of media packets. // of media packets.
bool ExcessOverheadBelowMax() const; bool ExcessOverheadBelowMax() const;

View file

@ -80,9 +80,9 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
RTC_CHECK(context->pix_fmt == kPixelFormatDefault || RTC_CHECK(context->pix_fmt == kPixelFormatDefault ||
context->pix_fmt == kPixelFormatFullRange); context->pix_fmt == kPixelFormatFullRange);
// |av_frame->width| and |av_frame->height| are set by FFmpeg. These are the // `av_frame->width` and `av_frame->height` are set by FFmpeg. These are the
// actual image's dimensions and may be different from |context->width| and // actual image's dimensions and may be different from `context->width` and
// |context->coded_width| due to reordering. // `context->coded_width` due to reordering.
int width = av_frame->width; int width = av_frame->width;
int height = av_frame->height; int height = av_frame->height;
// See `lowres`, if used the decoder scales the image by 1/2^(lowres). This // See `lowres`, if used the decoder scales the image by 1/2^(lowres). This
@ -201,7 +201,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
av_context_->extradata = nullptr; av_context_->extradata = nullptr;
av_context_->extradata_size = 0; av_context_->extradata_size = 0;
// If this is ever increased, look at |av_context_->thread_safe_callbacks| and // If this is ever increased, look at `av_context_->thread_safe_callbacks` and
// make it possible to disable the thread checker in the frame buffer pool. // make it possible to disable the thread checker in the frame buffer pool.
av_context_->thread_count = 1; av_context_->thread_count = 1;
av_context_->thread_type = FF_THREAD_SLICE; av_context_->thread_type = FF_THREAD_SLICE;

View file

@ -61,7 +61,7 @@ class H264DecoderImpl : public H264Decoder {
~H264DecoderImpl() override; ~H264DecoderImpl() override;
// If `codec_settings` is NULL it is ignored. If it is not NULL, // If `codec_settings` is NULL it is ignored. If it is not NULL,
// |codec_settings->codecType| must be `kVideoCodecH264`. // `codec_settings->codecType` must be `kVideoCodecH264`.
int32_t InitDecode(const VideoCodec* codec_settings, int32_t InitDecode(const VideoCodec* codec_settings,
int32_t number_of_cores) override; int32_t number_of_cores) override;
int32_t Release() override; int32_t Release() override;

View file

@ -89,13 +89,13 @@ VideoFrameType ConvertToVideoFrameType(EVideoFrameType type) {
// Helper method used by H264EncoderImpl::Encode. // Helper method used by H264EncoderImpl::Encode.
// Copies the encoded bytes from `info` to `encoded_image`. The // Copies the encoded bytes from `info` to `encoded_image`. The
// |encoded_image->_buffer| may be deleted and reallocated if a bigger buffer is // `encoded_image->_buffer` may be deleted and reallocated if a bigger buffer is
// required. // required.
// //
// After OpenH264 encoding, the encoded bytes are stored in `info` spread out // After OpenH264 encoding, the encoded bytes are stored in `info` spread out
// over a number of layers and "NAL units". Each NAL unit is a fragment starting // over a number of layers and "NAL units". Each NAL unit is a fragment starting
// with the four-byte start code {0,0,0,1}. All of this data (including the // with the four-byte start code {0,0,0,1}. All of this data (including the
// start codes) is copied to the |encoded_image->_buffer|. // start codes) is copied to the `encoded_image->_buffer`.
static void RtpFragmentize(EncodedImage* encoded_image, SFrameBSInfo* info) { static void RtpFragmentize(EncodedImage* encoded_image, SFrameBSInfo* info) {
// Calculate minimum buffer size required to hold encoded data. // Calculate minimum buffer size required to hold encoded data.
size_t required_capacity = 0; size_t required_capacity = 0;
@ -115,7 +115,7 @@ static void RtpFragmentize(EncodedImage* encoded_image, SFrameBSInfo* info) {
encoded_image->SetEncodedData(buffer); encoded_image->SetEncodedData(buffer);
// Iterate layers and NAL units, note each NAL unit as a fragment and copy // Iterate layers and NAL units, note each NAL unit as a fragment and copy
// the data to |encoded_image->_buffer|. // the data to `encoded_image->_buffer`.
const uint8_t start_code[4] = {0, 0, 0, 1}; const uint8_t start_code[4] = {0, 0, 0, 1};
size_t frag = 0; size_t frag = 0;
encoded_image->set_size(0); encoded_image->set_size(0);
@ -489,7 +489,7 @@ int32_t H264EncoderImpl::Encode(
RtpFragmentize(&encoded_images_[i], &info); RtpFragmentize(&encoded_images_[i], &info);
// Encoder can skip frames to save bandwidth in which case // Encoder can skip frames to save bandwidth in which case
// |encoded_images_[i]._length| == 0. // `encoded_images_[i]._length` == 0.
if (encoded_images_[i].size() > 0) { if (encoded_images_[i].size() > 0) {
// Parse QP. // Parse QP.
h264_bitstream_parser_.ParseBitstream(encoded_images_[i]); h264_bitstream_parser_.ParseBitstream(encoded_images_[i]);

View file

@ -57,7 +57,7 @@ class H264EncoderImpl : public H264Encoder {
explicit H264EncoderImpl(const cricket::VideoCodec& codec); explicit H264EncoderImpl(const cricket::VideoCodec& codec);
~H264EncoderImpl() override; ~H264EncoderImpl() override;
// |settings.max_payload_size| is ignored. // `settings.max_payload_size` is ignored.
// The following members of `codec_settings` are used. The rest are ignored. // The following members of `codec_settings` are used. The rest are ignored.
// - codecType (must be kVideoCodecH264) // - codecType (must be kVideoCodecH264)
// - targetBitrate // - targetBitrate

View file

@ -1049,7 +1049,7 @@ int LibvpxVp8Encoder::Encode(const VideoFrame& frame,
error == WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT)) { error == WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT)) {
++num_tries; ++num_tries;
// Note we must pass 0 for `flags` field in encode call below since they are // Note we must pass 0 for `flags` field in encode call below since they are
// set above in |libvpx_interface_->vpx_codec_control_| function for each // set above in `libvpx_interface_->vpx_codec_control_` function for each
// encoder/spatial layer. // encoder/spatial layer.
error = libvpx_->codec_encode(&encoders_[0], &raw_images_[0], timestamp_, error = libvpx_->codec_encode(&encoders_[0], &raw_images_[0], timestamp_,
duration, 0, VPX_DL_REALTIME); duration, 0, VPX_DL_REALTIME);

View file

@ -247,7 +247,7 @@ int LibvpxVp9Decoder::Decode(const EncodedImage& input_image,
VPX_DL_REALTIME)) { VPX_DL_REALTIME)) {
return WEBRTC_VIDEO_CODEC_ERROR; return WEBRTC_VIDEO_CODEC_ERROR;
} }
// |img->fb_priv| contains the image data, a reference counted Vp9FrameBuffer. // `img->fb_priv` contains the image data, a reference counted Vp9FrameBuffer.
// It may be released by libvpx during future vpx_codec_decode or // It may be released by libvpx during future vpx_codec_decode or
// vpx_codec_destroy calls. // vpx_codec_destroy calls.
img = vpx_codec_get_frame(decoder_, &iter); img = vpx_codec_get_frame(decoder_, &iter);

View file

@ -226,7 +226,7 @@ class LibvpxVp9Encoder : public VP9Encoder {
// Performance flags, ordered by `min_pixel_count`. // Performance flags, ordered by `min_pixel_count`.
const PerformanceFlags performance_flags_; const PerformanceFlags performance_flags_;
// Caching of of `speed_configs_`, where index i maps to the resolution as // Caching of of `speed_configs_`, where index i maps to the resolution as
// specified in |codec_.spatialLayer[i]|. // specified in `codec_.spatialLayer[i]`.
std::vector<PerformanceFlags::ParameterSet> std::vector<PerformanceFlags::ParameterSet>
performance_flags_by_spatial_index_; performance_flags_by_spatial_index_;
void UpdatePerformanceFlags(); void UpdatePerformanceFlags();

View file

@ -79,7 +79,7 @@ class VCMSessionInfo {
void InformOfEmptyPacket(uint16_t seq_num); void InformOfEmptyPacket(uint16_t seq_num);
// Finds the packet of the beginning of the next VP8 partition. If // Finds the packet of the beginning of the next VP8 partition. If
// none is found the returned iterator points to |packets_.end()|. // none is found the returned iterator points to `packets_.end()`.
// `it` is expected to point to the last packet of the previous partition, // `it` is expected to point to the last packet of the previous partition,
// or to the first packet of the frame. `packets_skipped` is incremented // or to the first packet of the frame. `packets_skipped` is incremented
// for each packet found which doesn't have the beginning bit set. // for each packet found which doesn't have the beginning bit set.

View file

@ -378,7 +378,7 @@ class RTC_EXPORT P2PTransportChannel : public IceTransportInternal {
void SetReceiving(bool receiving); void SetReceiving(bool receiving);
// Clears the address and the related address fields of a local candidate to // Clears the address and the related address fields of a local candidate to
// avoid IP leakage. This is applicable in several scenarios as commented in // avoid IP leakage. This is applicable in several scenarios as commented in
// |PortAllocator::SanitizeCandidate|. // `PortAllocator::SanitizeCandidate`.
Candidate SanitizeLocalCandidate(const Candidate& c) const; Candidate SanitizeLocalCandidate(const Candidate& c) const;
// Clears the address field of a remote candidate to avoid IP leakage. This is // Clears the address field of a remote candidate to avoid IP leakage. This is
// applicable in the following scenarios: // applicable in the following scenarios:

View file

@ -291,25 +291,25 @@ TEST_F(TransportDescriptionFactoryTest, TestAnswerDtlsToDtls) {
} }
// Test that ice ufrag and password is changed in an updated offer and answer // Test that ice ufrag and password is changed in an updated offer and answer
// if |TransportDescriptionOptions::ice_restart| is true. // if `TransportDescriptionOptions::ice_restart` is true.
TEST_F(TransportDescriptionFactoryTest, TestIceRestart) { TEST_F(TransportDescriptionFactoryTest, TestIceRestart) {
TestIceRestart(false); TestIceRestart(false);
} }
// Test that ice ufrag and password is changed in an updated offer and answer // Test that ice ufrag and password is changed in an updated offer and answer
// if |TransportDescriptionOptions::ice_restart| is true and DTLS is enabled. // if `TransportDescriptionOptions::ice_restart` is true and DTLS is enabled.
TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) { TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) {
TestIceRestart(true); TestIceRestart(true);
} }
// Test that ice renomination is set in an updated offer and answer // Test that ice renomination is set in an updated offer and answer
// if |TransportDescriptionOptions::enable_ice_renomination| is true. // if `TransportDescriptionOptions::enable_ice_renomination` is true.
TEST_F(TransportDescriptionFactoryTest, TestIceRenomination) { TEST_F(TransportDescriptionFactoryTest, TestIceRenomination) {
TestIceRenomination(false); TestIceRenomination(false);
} }
// Test that ice renomination is set in an updated offer and answer // Test that ice renomination is set in an updated offer and answer
// if |TransportDescriptionOptions::enable_ice_renomination| is true and DTLS // if `TransportDescriptionOptions::enable_ice_renomination` is true and DTLS
// is enabled. // is enabled.
TEST_F(TransportDescriptionFactoryTest, TestIceRenominationWithDtls) { TEST_F(TransportDescriptionFactoryTest, TestIceRenominationWithDtls) {
TestIceRenomination(true); TestIceRenomination(true);

View file

@ -42,7 +42,7 @@ class DtmfProviderInterface {
// The `duration` indicates the length of the DTMF tone in ms. // The `duration` indicates the length of the DTMF tone in ms.
// Returns true on success and false on failure. // Returns true on success and false on failure.
virtual bool InsertDtmf(int code, int duration) = 0; virtual bool InsertDtmf(int code, int duration) = 0;
// Returns a |sigslot::signal0<>| signal. The signal should fire before // Returns a `sigslot::signal0<>` signal. The signal should fire before
// the provider is destroyed. // the provider is destroyed.
virtual sigslot::signal0<>* GetOnDestroyedSignal() = 0; virtual sigslot::signal0<>* GetOnDestroyedSignal() = 0;

View file

@ -104,7 +104,7 @@ static bool ParsePort(const std::string& in_str, int* port) {
// This method parses IPv6 and IPv4 literal strings, along with hostnames in // This method parses IPv6 and IPv4 literal strings, along with hostnames in
// standard hostname:port format. // standard hostname:port format.
// Consider following formats as correct. // Consider following formats as correct.
// |hostname:port|, |[IPV6 address]:port|, |IPv4 address|:port, // `hostname:port`, |[IPV6 address]:port|, |IPv4 address|:port,
// `hostname`, |[IPv6 address]|, |IPv4 address|. // `hostname`, |[IPv6 address]|, |IPv4 address|.
static bool ParseHostnameAndPortFromString(const std::string& in_str, static bool ParseHostnameAndPortFromString(const std::string& in_str,
std::string* host, std::string* host,

View file

@ -104,7 +104,7 @@ void UpdateConnectionAddress(
// Combining the above considerations, we use 0.0.0.0 with port 9 to // Combining the above considerations, we use 0.0.0.0 with port 9 to
// populate the c= and the m= lines. See `BuildMediaDescription` in // populate the c= and the m= lines. See `BuildMediaDescription` in
// webrtc_sdp.cc for the SDP generation with // webrtc_sdp.cc for the SDP generation with
// |media_desc->connection_address()|. // `media_desc->connection_address()`.
connection_addr = rtc::SocketAddress(kDummyAddress, kDummyPort); connection_addr = rtc::SocketAddress(kDummyAddress, kDummyPort);
} }
media_desc->set_connection_address(connection_addr); media_desc->set_connection_address(connection_addr);

View file

@ -323,7 +323,7 @@ class JsepTransport {
RTC_GUARDED_BY(network_thread_); RTC_GUARDED_BY(network_thread_);
// This is invoked when RTCP-mux becomes active and // This is invoked when RTCP-mux becomes active and
// |rtcp_dtls_transport_| is destroyed. The JsepTransportController will // `rtcp_dtls_transport_` is destroyed. The JsepTransportController will
// receive the callback and update the aggregate transport states. // receive the callback and update the aggregate transport states.
std::function<void()> rtcp_mux_active_callback_; std::function<void()> rtcp_mux_active_callback_;

View file

@ -1755,7 +1755,7 @@ MediaSessionDescriptionFactory::CreateAnswer(
ContentInfo& added = answer->contents().back(); ContentInfo& added = answer->contents().back();
if (!added.rejected && session_options.bundle_enabled && if (!added.rejected && session_options.bundle_enabled &&
bundle_index.has_value()) { bundle_index.has_value()) {
// The `bundle_index` is for |media_description_options.mid|. // The `bundle_index` is for `media_description_options.mid`.
RTC_DCHECK_EQ(media_description_options.mid, added.name); RTC_DCHECK_EQ(media_description_options.mid, added.name);
answer_bundles[bundle_index.value()].AddContentName(added.name); answer_bundles[bundle_index.value()].AddContentName(added.name);
bundle_transports[bundle_index.value()].reset( bundle_transports[bundle_index.value()].reset(

View file

@ -2719,7 +2719,7 @@ TEST_F(MediaSessionDescriptionFactoryTest,
// offer/answer exchange plus the audio codecs only `f2_` offer, sorted in // offer/answer exchange plus the audio codecs only `f2_` offer, sorted in
// preference order. // preference order.
// TODO(wu): `updated_offer` should not include the codec // TODO(wu): `updated_offer` should not include the codec
// (i.e. |kAudioCodecs2[0]|) the other side doesn't support. // (i.e. `kAudioCodecs2[0]`) the other side doesn't support.
const AudioCodec kUpdatedAudioCodecOffer[] = { const AudioCodec kUpdatedAudioCodecOffer[] = {
kAudioCodecsAnswer[0], kAudioCodecsAnswer[0],
kAudioCodecsAnswer[1], kAudioCodecsAnswer[1],

View file

@ -548,7 +548,7 @@ TEST_P(PeerConnectionIceTest,
ASSERT_TRUE( ASSERT_TRUE(
caller->SetRemoteDescription(callee->CreateAnswerAndSetAsLocal())); caller->SetRemoteDescription(callee->CreateAnswerAndSetAsLocal()));
// |candidate.transport_name()| is empty. // `candidate.transport_name()` is empty.
cricket::Candidate candidate = CreateLocalUdpCandidate(kCalleeAddress); cricket::Candidate candidate = CreateLocalUdpCandidate(kCalleeAddress);
auto* audio_content = cricket::GetFirstAudioContent( auto* audio_content = cricket::GetFirstAudioContent(
caller->pc()->local_description()->description()); caller->pc()->local_description()->description());
@ -1492,7 +1492,7 @@ TEST_P(PeerConnectionIceTest, PrefersMidOverMLineIndex) {
ASSERT_TRUE( ASSERT_TRUE(
caller->SetRemoteDescription(callee->CreateAnswerAndSetAsLocal())); caller->SetRemoteDescription(callee->CreateAnswerAndSetAsLocal()));
// |candidate.transport_name()| is empty. // `candidate.transport_name()` is empty.
cricket::Candidate candidate = CreateLocalUdpCandidate(kCalleeAddress); cricket::Candidate candidate = CreateLocalUdpCandidate(kCalleeAddress);
auto* audio_content = cricket::GetFirstAudioContent( auto* audio_content = cricket::GetFirstAudioContent(
caller->pc()->local_description()->description()); caller->pc()->local_description()->description());

View file

@ -3194,7 +3194,7 @@ TEST_P(PeerConnectionIntegrationTest, RegatherAfterChangingIceTransportType) {
EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected, EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected,
callee()->ice_connection_state(), kDefaultTimeout); callee()->ice_connection_state(), kDefaultTimeout);
// Note that we cannot use the metric // Note that we cannot use the metric
// |WebRTC.PeerConnection.CandidatePairType_UDP| in this test since this // `WebRTC.PeerConnection.CandidatePairType_UDP` in this test since this
// metric is only populated when we reach kIceConnectionComplete in the // metric is only populated when we reach kIceConnectionComplete in the
// current implementation. // current implementation.
EXPECT_EQ(cricket::RELAY_PORT_TYPE, EXPECT_EQ(cricket::RELAY_PORT_TYPE,

View file

@ -58,7 +58,7 @@
#include "test/gtest.h" #include "test/gtest.h"
// This file contains tests for RTP Media API-related behavior of // This file contains tests for RTP Media API-related behavior of
// |webrtc::PeerConnection|, see https://w3c.github.io/webrtc-pc/#rtp-media-api. // `webrtc::PeerConnection`, see https://w3c.github.io/webrtc-pc/#rtp-media-api.
namespace webrtc { namespace webrtc {
@ -188,7 +188,7 @@ class PeerConnectionRtpTestUnifiedPlan : public PeerConnectionRtpBaseTest {
} }
}; };
// These tests cover |webrtc::PeerConnectionObserver| callbacks firing upon // These tests cover `webrtc::PeerConnectionObserver` callbacks firing upon
// setting the remote description. // setting the remote description.
TEST_P(PeerConnectionRtpTest, AddTrackWithoutStreamFiresOnAddTrack) { TEST_P(PeerConnectionRtpTest, AddTrackWithoutStreamFiresOnAddTrack) {
@ -1994,7 +1994,7 @@ TEST_P(PeerConnectionRtpTest, CreateTwoSendersWithSameTrack) {
if (sdp_semantics_ == SdpSemantics::kPlanB) { if (sdp_semantics_ == SdpSemantics::kPlanB) {
// TODO(hbos): When https://crbug.com/webrtc/8734 is resolved, this should // TODO(hbos): When https://crbug.com/webrtc/8734 is resolved, this should
// return true, and doing |callee->SetRemoteDescription()| should work. // return true, and doing `callee->SetRemoteDescription()` should work.
EXPECT_FALSE(caller->CreateOfferAndSetAsLocal()); EXPECT_FALSE(caller->CreateOfferAndSetAsLocal());
} else { } else {
EXPECT_TRUE(caller->CreateOfferAndSetAsLocal()); EXPECT_TRUE(caller->CreateOfferAndSetAsLocal());

View file

@ -1466,9 +1466,9 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) {
expected_pair.responses_received = 4321; expected_pair.responses_received = 4321;
expected_pair.responses_sent = 1000; expected_pair.responses_sent = 1000;
expected_pair.consent_requests_sent = (2020 - 2000); expected_pair.consent_requests_sent = (2020 - 2000);
// |expected_pair.current_round_trip_time| should be undefined because the // `expected_pair.current_round_trip_time` should be undefined because the
// current RTT is not set. // current RTT is not set.
// |expected_pair.available_[outgoing/incoming]_bitrate| should be undefined // `expected_pair.available_[outgoing/incoming]_bitrate` should be undefined
// because is is not the current pair. // because is is not the current pair.
ASSERT_TRUE(report->Get(expected_pair.id())); ASSERT_TRUE(report->Get(expected_pair.id()));
@ -1768,7 +1768,7 @@ TEST_F(RTCStatsCollectorTest,
IdForType<RTCMediaStreamTrackStats>(report), report->timestamp_us(), IdForType<RTCMediaStreamTrackStats>(report), report->timestamp_us(),
RTCMediaStreamTrackKind::kAudio); RTCMediaStreamTrackKind::kAudio);
expected_remote_audio_track.track_identifier = remote_audio_track->id(); expected_remote_audio_track.track_identifier = remote_audio_track->id();
// |expected_remote_audio_track.media_source_id| should be undefined // `expected_remote_audio_track.media_source_id` should be undefined
// because the track is remote. // because the track is remote.
expected_remote_audio_track.remote_source = true; expected_remote_audio_track.remote_source = true;
expected_remote_audio_track.ended = false; expected_remote_audio_track.ended = false;
@ -1920,7 +1920,7 @@ TEST_F(RTCStatsCollectorTest,
RTCMediaStreamTrackKind::kVideo); RTCMediaStreamTrackKind::kVideo);
expected_remote_video_track_ssrc3.track_identifier = expected_remote_video_track_ssrc3.track_identifier =
remote_video_track_ssrc3->id(); remote_video_track_ssrc3->id();
// |expected_remote_video_track_ssrc3.media_source_id| should be undefined // `expected_remote_video_track_ssrc3.media_source_id` should be undefined
// because the track is remote. // because the track is remote.
expected_remote_video_track_ssrc3.remote_source = true; expected_remote_video_track_ssrc3.remote_source = true;
expected_remote_video_track_ssrc3.ended = true; expected_remote_video_track_ssrc3.ended = true;
@ -2011,7 +2011,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) {
expected_audio.header_bytes_received = 4; expected_audio.header_bytes_received = 4;
expected_audio.packets_lost = -1; expected_audio.packets_lost = -1;
expected_audio.packets_discarded = 7788; expected_audio.packets_discarded = 7788;
// |expected_audio.last_packet_received_timestamp| should be undefined. // `expected_audio.last_packet_received_timestamp` should be undefined.
expected_audio.jitter = 4.5; expected_audio.jitter = 4.5;
expected_audio.jitter_buffer_delay = 1.0; expected_audio.jitter_buffer_delay = 1.0;
expected_audio.jitter_buffer_emitted_count = 2; expected_audio.jitter_buffer_emitted_count = 2;
@ -2116,16 +2116,16 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Video) {
expected_video.frames_decoded = 9; expected_video.frames_decoded = 9;
expected_video.key_frames_decoded = 3; expected_video.key_frames_decoded = 3;
expected_video.frames_dropped = 13; expected_video.frames_dropped = 13;
// |expected_video.qp_sum| should be undefined. // `expected_video.qp_sum` should be undefined.
expected_video.total_decode_time = 9.0; expected_video.total_decode_time = 9.0;
expected_video.total_inter_frame_delay = 0.123; expected_video.total_inter_frame_delay = 0.123;
expected_video.total_squared_inter_frame_delay = 0.00456; expected_video.total_squared_inter_frame_delay = 0.00456;
expected_video.jitter = 1.199; expected_video.jitter = 1.199;
expected_video.jitter_buffer_delay = 3.456; expected_video.jitter_buffer_delay = 3.456;
expected_video.jitter_buffer_emitted_count = 13; expected_video.jitter_buffer_emitted_count = 13;
// |expected_video.last_packet_received_timestamp| should be undefined. // `expected_video.last_packet_received_timestamp` should be undefined.
// |expected_video.content_type| should be undefined. // `expected_video.content_type` should be undefined.
// |expected_video.decoder_implementation| should be undefined. // `expected_video.decoder_implementation` should be undefined.
ASSERT_TRUE(report->Get(expected_video.id())); ASSERT_TRUE(report->Get(expected_video.id()));
EXPECT_EQ( EXPECT_EQ(
@ -2189,7 +2189,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRTPStreamStats_Audio) {
RTCOutboundRTPStreamStats expected_audio("RTCOutboundRTPAudioStream_1", RTCOutboundRTPStreamStats expected_audio("RTCOutboundRTPAudioStream_1",
report->timestamp_us()); report->timestamp_us());
expected_audio.media_source_id = "RTCAudioSource_50"; expected_audio.media_source_id = "RTCAudioSource_50";
// |expected_audio.remote_id| should be undefined. // `expected_audio.remote_id` should be undefined.
expected_audio.ssrc = 1; expected_audio.ssrc = 1;
expected_audio.media_type = "audio"; expected_audio.media_type = "audio";
expected_audio.kind = "audio"; expected_audio.kind = "audio";
@ -2275,7 +2275,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRTPStreamStats_Video) {
RTCOutboundRTPStreamStats expected_video(stats_of_my_type[0]->id(), RTCOutboundRTPStreamStats expected_video(stats_of_my_type[0]->id(),
report->timestamp_us()); report->timestamp_us());
expected_video.media_source_id = "RTCVideoSource_50"; expected_video.media_source_id = "RTCVideoSource_50";
// |expected_video.remote_id| should be undefined. // `expected_video.remote_id` should be undefined.
expected_video.ssrc = 1; expected_video.ssrc = 1;
expected_video.media_type = "video"; expected_video.media_type = "video";
expected_video.kind = "video"; expected_video.kind = "video";
@ -2305,9 +2305,9 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRTPStreamStats_Video) {
expected_video.frames_per_second = 10.0; expected_video.frames_per_second = 10.0;
expected_video.frames_sent = 5; expected_video.frames_sent = 5;
expected_video.huge_frames_sent = 2; expected_video.huge_frames_sent = 2;
// |expected_video.content_type| should be undefined. // `expected_video.content_type` should be undefined.
// |expected_video.qp_sum| should be undefined. // `expected_video.qp_sum` should be undefined.
// |expected_video.encoder_implementation| should be undefined. // `expected_video.encoder_implementation` should be undefined.
ASSERT_TRUE(report->Get(expected_video.id())); ASSERT_TRUE(report->Get(expected_video.id()));
EXPECT_EQ( EXPECT_EQ(
@ -2889,7 +2889,7 @@ TEST_P(RTCStatsCollectorTestWithParamKind,
report_block_data.SetReportBlock(report_block, kReportBlockTimestampUtcUs); report_block_data.SetReportBlock(report_block, kReportBlockTimestampUtcUs);
report_block_data.AddRoundTripTimeSample(kRoundTripTimeSample1Ms); report_block_data.AddRoundTripTimeSample(kRoundTripTimeSample1Ms);
// Only the last sample should be exposed as the // Only the last sample should be exposed as the
// |RTCRemoteInboundRtpStreamStats::round_trip_time|. // `RTCRemoteInboundRtpStreamStats::round_trip_time`.
report_block_data.AddRoundTripTimeSample(kRoundTripTimeSample2Ms); report_block_data.AddRoundTripTimeSample(kRoundTripTimeSample2Ms);
report_block_datas.push_back(report_block_data); report_block_datas.push_back(report_block_data);
} }

View file

@ -538,7 +538,7 @@ void AudioRtpSender::SetSend() {
} }
#endif #endif
// |track_->enabled()| hops to the signaling thread, so call it before we hop // `track_->enabled()` hops to the signaling thread, so call it before we hop
// to the worker thread or else it will deadlock. // to the worker thread or else it will deadlock.
bool track_enabled = track_->enabled(); bool track_enabled = track_->enabled();
bool success = worker_thread_->Invoke<bool>(RTC_FROM_HERE, [&] { bool success = worker_thread_->Invoke<bool>(RTC_FROM_HERE, [&] {

View file

@ -4091,7 +4091,7 @@ void SdpOfferAnswerHandler::UpdateLocalSenders(
// Find new and active senders. // Find new and active senders.
for (const cricket::StreamParams& params : streams) { for (const cricket::StreamParams& params : streams) {
// The sync_label is the MediaStream label and the |stream.id| is the // The sync_label is the MediaStream label and the `stream.id` is the
// sender id. // sender id.
const std::string& stream_id = params.first_stream_id(); const std::string& stream_id = params.first_stream_id();
const std::string& sender_id = params.id; const std::string& sender_id = params.id;
@ -4154,8 +4154,8 @@ void SdpOfferAnswerHandler::UpdateRemoteSendersList(
break; break;
} }
// |params.id| is the sender id and the stream id uses the first of // `params.id` is the sender id and the stream id uses the first of
// |params.stream_ids|. The remote description could come from a Unified // `params.stream_ids`. The remote description could come from a Unified
// Plan endpoint, with multiple or no stream_ids() signaled. Since this is // Plan endpoint, with multiple or no stream_ids() signaled. Since this is
// not supported in Plan B, we just take the first here and create the // not supported in Plan B, we just take the first here and create the
// default stream ID if none is specified. // default stream ID if none is specified.

View file

@ -83,9 +83,9 @@ static const rtc::RTCCertificatePEM kRsaPems[] = {
// ECDSA with EC_NIST_P256. // ECDSA with EC_NIST_P256.
// These PEM strings were created by generating an identity with // These PEM strings were created by generating an identity with
// |SSLIdentity::Create| and invoking |identity->PrivateKeyToPEMString()|, // `SSLIdentity::Create` and invoking `identity->PrivateKeyToPEMString()`,
// |identity->PublicKeyToPEMString()| and // `identity->PublicKeyToPEMString()` and
// |identity->certificate().ToPEMString()|. // `identity->certificate().ToPEMString()`.
static const rtc::RTCCertificatePEM kEcdsaPems[] = { static const rtc::RTCCertificatePEM kEcdsaPems[] = {
rtc::RTCCertificatePEM( rtc::RTCCertificatePEM(
"-----BEGIN PRIVATE KEY-----\n" "-----BEGIN PRIVATE KEY-----\n"

View file

@ -41,7 +41,7 @@ namespace webrtc {
class WebRtcCertificateGeneratorCallback class WebRtcCertificateGeneratorCallback
: public rtc::RTCCertificateGeneratorCallback { : public rtc::RTCCertificateGeneratorCallback {
public: public:
// |rtc::RTCCertificateGeneratorCallback| overrides. // `rtc::RTCCertificateGeneratorCallback` overrides.
void OnSuccess( void OnSuccess(
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override; const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override;
void OnFailure() override; void OnFailure() override;

View file

@ -25,7 +25,7 @@ struct make_void {
// webrtc::void_t is an implementation of std::void_t from C++17. // webrtc::void_t is an implementation of std::void_t from C++17.
// //
// We use |webrtc::void_t_internal::make_void| as a helper struct to avoid a // We use `webrtc::void_t_internal::make_void` as a helper struct to avoid a
// C++14 defect: // C++14 defect:
// http://en.cppreference.com/w/cpp/types/void_t // http://en.cppreference.com/w/cpp/types/void_t
// http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558 // http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558

View file

@ -31,7 +31,7 @@ class SSLIdentity;
// certificate and acts as a text representation of RTCCertificate. Certificates // certificate and acts as a text representation of RTCCertificate. Certificates
// can be serialized and deserialized to and from this format, which allows for // can be serialized and deserialized to and from this format, which allows for
// cloning and storing of certificates to disk. The PEM format is that of // cloning and storing of certificates to disk. The PEM format is that of
// |SSLIdentity::PrivateKeyToPEMString| and |SSLCertificate::ToPEMString|, e.g. // `SSLIdentity::PrivateKeyToPEMString` and `SSLCertificate::ToPEMString`, e.g.
// the string representations used by OpenSSL. // the string representations used by OpenSSL.
class RTCCertificatePEM { class RTCCertificatePEM {
public: public:

View file

@ -51,7 +51,7 @@ scoped_refptr<RTCCertificate> RTCCertificateGenerator::GenerateCertificate(
expires_s = std::min(expires_s, kYearInSeconds); expires_s = std::min(expires_s, kYearInSeconds);
// TODO(torbjorng): Stop using `time_t`, its type is unspecified. It it safe // TODO(torbjorng): Stop using `time_t`, its type is unspecified. It it safe
// to assume it can hold up to a year's worth of seconds (and more), but // to assume it can hold up to a year's worth of seconds (and more), but
// |SSLIdentity::Create| should stop relying on `time_t`. // `SSLIdentity::Create` should stop relying on `time_t`.
// See bugs.webrtc.org/5720. // See bugs.webrtc.org/5720.
time_t cert_lifetime_s = static_cast<time_t>(expires_s); time_t cert_lifetime_s = static_cast<time_t>(expires_s);
identity = SSLIdentity::Create(kIdentityName, key_params, cert_lifetime_s); identity = SSLIdentity::Create(kIdentityName, key_params, cert_lifetime_s);

View file

@ -23,7 +23,7 @@
namespace rtc { namespace rtc {
// See |RTCCertificateGeneratorInterface::GenerateCertificateAsync|. // See `RTCCertificateGeneratorInterface::GenerateCertificateAsync`.
class RTCCertificateGeneratorCallback : public RefCountInterface { class RTCCertificateGeneratorCallback : public RefCountInterface {
public: public:
virtual void OnSuccess(const scoped_refptr<RTCCertificate>& certificate) = 0; virtual void OnSuccess(const scoped_refptr<RTCCertificate>& certificate) = 0;

View file

@ -49,15 +49,15 @@ SSLCertificateStats::~SSLCertificateStats() {}
std::unique_ptr<SSLCertificateStats> SSLCertificate::GetStats() const { std::unique_ptr<SSLCertificateStats> SSLCertificate::GetStats() const {
// TODO(bemasc): Move this computation to a helper class that caches these // TODO(bemasc): Move this computation to a helper class that caches these
// values to reduce CPU use in |StatsCollector::GetStats|. This will require // values to reduce CPU use in `StatsCollector::GetStats`. This will require
// adding a fast |SSLCertificate::Equals| to detect certificate changes. // adding a fast `SSLCertificate::Equals` to detect certificate changes.
std::string digest_algorithm; std::string digest_algorithm;
if (!GetSignatureDigestAlgorithm(&digest_algorithm)) if (!GetSignatureDigestAlgorithm(&digest_algorithm))
return nullptr; return nullptr;
// |SSLFingerprint::Create| can fail if the algorithm returned by // `SSLFingerprint::Create` can fail if the algorithm returned by
// |SSLCertificate::GetSignatureDigestAlgorithm| is not supported by the // `SSLCertificate::GetSignatureDigestAlgorithm` is not supported by the
// implementation of |SSLCertificate::ComputeDigest|. This currently happens // implementation of `SSLCertificate::ComputeDigest`. This currently happens
// with MD5- and SHA-224-signed certificates when linked to libNSS. // with MD5- and SHA-224-signed certificates when linked to libNSS.
std::unique_ptr<SSLFingerprint> ssl_fingerprint = std::unique_ptr<SSLFingerprint> ssl_fingerprint =
SSLFingerprint::Create(digest_algorithm, *this); SSLFingerprint::Create(digest_algorithm, *this);

View file

@ -65,12 +65,12 @@ const unsigned char kTestCertSha512[] = {
0x35, 0xce, 0x26, 0x58, 0x4a, 0x33, 0x6d, 0xbc, 0xb6}; 0x35, 0xce, 0x26, 0x58, 0x4a, 0x33, 0x6d, 0xbc, 0xb6};
// These PEM strings were created by generating an identity with // These PEM strings were created by generating an identity with
// |SSLIdentity::Create| and invoking |identity->PrivateKeyToPEMString()|, // `SSLIdentity::Create` and invoking `identity->PrivateKeyToPEMString()`,
// |identity->PublicKeyToPEMString()| and // `identity->PublicKeyToPEMString()` and
// |identity->certificate().ToPEMString()|. If the crypto library is updated, // `identity->certificate().ToPEMString()`. If the crypto library is updated,
// and the update changes the string form of the keys, these will have to be // and the update changes the string form of the keys, these will have to be
// updated too. The fingerprint, fingerprint algorithm and base64 certificate // updated too. The fingerprint, fingerprint algorithm and base64 certificate
// were created by calling |identity->certificate().GetStats()|. // were created by calling `identity->certificate().GetStats()`.
static const char kRSA_PRIVATE_KEY_PEM[] = static const char kRSA_PRIVATE_KEY_PEM[] =
"-----BEGIN PRIVATE KEY-----\n" "-----BEGIN PRIVATE KEY-----\n"
"MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMQPqDStRlYeDpkX\n" "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMQPqDStRlYeDpkX\n"

View file

@ -158,7 +158,7 @@ TEST(TimestampAlignerTest, ClipToMonotonous) {
// Non-monotonic translated timestamps can happen when only for // Non-monotonic translated timestamps can happen when only for
// translated timestamps in the future. Which is tolerated if // translated timestamps in the future. Which is tolerated if
// |timestamp_aligner.clip_bias_us| is large enough. Instead of // `timestamp_aligner.clip_bias_us` is large enough. Instead of
// changing that private member for this test, just add the bias to // changing that private member for this test, just add the bias to
// `kSystemTimeUs` when calling ClipTimestamp. // `kSystemTimeUs` when calling ClipTimestamp.
const int64_t kClipBiasUs = 100000; const int64_t kClipBiasUs = 100000;

View file

@ -82,7 +82,7 @@ public class DataChannel {
/** The data channel state has changed. */ /** The data channel state has changed. */
@CalledByNative("Observer") public void onStateChange(); @CalledByNative("Observer") public void onStateChange();
/** /**
* A data buffer was successfully received. NOTE: |buffer.data| will be * A data buffer was successfully received. NOTE: `buffer.data` will be
* freed once this function returns so callers who want to use the data * freed once this function returns so callers who want to use the data
* asynchronously must make sure to copy it first. * asynchronously must make sure to copy it first.
*/ */

View file

@ -112,7 +112,7 @@ RTC_OBJC_EXPORT
/** /**
* The number of bytes of application data that have been queued using * The number of bytes of application data that have been queued using
* |sendData:| but that have not yet been transmitted to the network. * `sendData:` but that have not yet been transmitted to the network.
*/ */
@property(nonatomic, readonly) uint64_t bufferedAmount; @property(nonatomic, readonly) uint64_t bufferedAmount;

View file

@ -122,7 +122,7 @@ RTC_OBJC_EXPORT
* WebRTC and the application layer are avoided. * WebRTC and the application layer are avoided.
* *
* RTCAudioSession also coordinates activation so that the audio session is * RTCAudioSession also coordinates activation so that the audio session is
* activated only once. See |setActive:error:|. * activated only once. See `setActive:error:`.
*/ */
RTC_OBJC_EXPORT RTC_OBJC_EXPORT
@interface RTC_OBJC_TYPE (RTCAudioSession) : NSObject <RTC_OBJC_TYPE(RTCAudioSessionActivationDelegate)> @interface RTC_OBJC_TYPE (RTCAudioSession) : NSObject <RTC_OBJC_TYPE(RTCAudioSessionActivationDelegate)>

View file

@ -20,7 +20,7 @@ namespace webrtc {
namespace { namespace {
// Produces "[a,b,c]". Works for non-vector |RTCStatsMemberInterface::Type| // Produces "[a,b,c]". Works for non-vector `RTCStatsMemberInterface::Type`
// types. // types.
template <typename T> template <typename T>
std::string VectorToString(const std::vector<T>& vector) { std::string VectorToString(const std::vector<T>& vector) {

View file

@ -65,7 +65,7 @@ inline bool operator!=(const NtpTime& n1, const NtpTime& n2) {
// Converts `int64_t` milliseconds to Q32.32-formatted fixed-point seconds. // Converts `int64_t` milliseconds to Q32.32-formatted fixed-point seconds.
// Performs clamping if the result overflows or underflows. // Performs clamping if the result overflows or underflows.
inline int64_t Int64MsToQ32x32(int64_t milliseconds) { inline int64_t Int64MsToQ32x32(int64_t milliseconds) {
// TODO(bugs.webrtc.org/10893): Change to use |rtc::saturated_cast| once the // TODO(bugs.webrtc.org/10893): Change to use `rtc::saturated_cast` once the
// bug has been fixed. // bug has been fixed.
double result = double result =
std::round(milliseconds * (NtpTime::kFractionsPerSecond / 1000.0)); std::round(milliseconds * (NtpTime::kFractionsPerSecond / 1000.0));
@ -88,7 +88,7 @@ inline int64_t Int64MsToQ32x32(int64_t milliseconds) {
// Converts `int64_t` milliseconds to UQ32.32-formatted fixed-point seconds. // Converts `int64_t` milliseconds to UQ32.32-formatted fixed-point seconds.
// Performs clamping if the result overflows or underflows. // Performs clamping if the result overflows or underflows.
inline uint64_t Int64MsToUQ32x32(int64_t milliseconds) { inline uint64_t Int64MsToUQ32x32(int64_t milliseconds) {
// TODO(bugs.webrtc.org/10893): Change to use |rtc::saturated_cast| once the // TODO(bugs.webrtc.org/10893): Change to use `rtc::saturated_cast` once the
// bug has been fixed. // bug has been fixed.
double result = double result =
std::round(milliseconds * (NtpTime::kFractionsPerSecond / 1000.0)); std::round(milliseconds * (NtpTime::kFractionsPerSecond / 1000.0));

View file

@ -17,7 +17,7 @@
@protocol GoogleTestRunnerDelegate @protocol GoogleTestRunnerDelegate
// Returns YES if this delegate supports running GoogleTests via a call to // Returns YES if this delegate supports running GoogleTests via a call to
// |runGoogleTests|. // `runGoogleTests`.
@property(nonatomic, readonly, assign) BOOL supportsRunningGoogleTests; @property(nonatomic, readonly, assign) BOOL supportsRunningGoogleTests;
// Runs GoogleTests and returns the final exit code. // Runs GoogleTests and returns the final exit code.

View file

@ -72,8 +72,8 @@ static absl::optional<std::vector<std::string>> g_metrics_to_plot;
[_window setRootViewController:[[UIViewController alloc] init]]; [_window setRootViewController:[[UIViewController alloc] init]];
if (!rtc::test::ShouldRunIOSUnittestsWithXCTest()) { if (!rtc::test::ShouldRunIOSUnittestsWithXCTest()) {
// When running in XCTest mode, XCTest will invoke |runGoogleTest| directly. // When running in XCTest mode, XCTest will invoke `runGoogleTest` directly.
// Otherwise, schedule a call to |runTests|. // Otherwise, schedule a call to `runTests`.
[self performSelector:@selector(runTests) withObject:nil afterDelay:0.1]; [self performSelector:@selector(runTests) withObject:nil afterDelay:0.1];
} }

View file

@ -297,7 +297,7 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface {
absl::optional<VideoFrame> rendered; absl::optional<VideoFrame> rendered;
// If true frame was dropped somewhere from capturing to rendering and // If true frame was dropped somewhere from capturing to rendering and
// wasn't rendered on remote peer side. If `dropped` is true, `rendered` // wasn't rendered on remote peer side. If `dropped` is true, `rendered`
// will be |absl::nullopt|. // will be `absl::nullopt`.
bool dropped; bool dropped;
FrameStats frame_stats; FrameStats frame_stats;
OverloadReason overload_reason; OverloadReason overload_reason;

Some files were not shown because too many files have changed in this diff Show more