Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338
Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34554}
diff --git a/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc
index 30d5287..89298d0 100644
--- a/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc
+++ b/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc
@@ -75,7 +75,7 @@
int reset_count_ = 0;
};
test::ScopedFieldTrials override_field_trials_;
- // |fake_decoder_| is owned and released by |fallback_wrapper_|.
+ // `fake_decoder_` is owned and released by `fallback_wrapper_`.
CountingFakeDecoder* fake_decoder_;
std::unique_ptr<VideoDecoder> fallback_wrapper_;
};
diff --git a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
index 2d8b002..84229dd 100644
--- a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
+++ b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc
@@ -172,7 +172,7 @@
test::ScopedFieldTrials override_field_trials_;
FakeEncodedImageCallback callback_;
- // |fake_encoder_| is owned and released by |fallback_wrapper_|.
+ // `fake_encoder_` is owned and released by `fallback_wrapper_`.
CountingFakeEncoder* fake_encoder_;
CountingFakeEncoder* fake_sw_encoder_;
bool wrapper_initialized_;
diff --git a/api/video_codecs/video_decoder_factory.h b/api/video_codecs/video_decoder_factory.h
index 0b6ea4f..ef90809 100644
--- a/api/video_codecs/video_decoder_factory.h
+++ b/api/video_codecs/video_decoder_factory.h
@@ -40,7 +40,7 @@
// power efficient, which is currently interpreted as if there is support for
// hardware acceleration.
// See https://w3c.github.io/webrtc-svc/#scalabilitymodes* for a specification
- // of valid values for |scalability_mode|.
+ // of valid values for `scalability_mode`.
// NOTE: QueryCodecSupport is currently an experimental feature that is
// subject to change without notice.
virtual CodecSupport QueryCodecSupport(
diff --git a/api/video_codecs/video_encoder.h b/api/video_codecs/video_encoder.h
index caf0697..8191f47 100644
--- a/api/video_codecs/video_encoder.h
+++ b/api/video_codecs/video_encoder.h
@@ -167,7 +167,7 @@
ScalingSettings scaling_settings;
// The width and height of the incoming video frames should be divisible
- // by |requested_resolution_alignment|. If they are not, the encoder may
+ // by `requested_resolution_alignment`. If they are not, the encoder may
// drop the incoming frame.
// For example: With I420, this value would be a multiple of 2.
// Note that this field is unrelated to any horizontal or vertical stride
@@ -175,12 +175,12 @@
int requested_resolution_alignment;
// Same as above but if true, each simulcast layer should also be divisible
- // by |requested_resolution_alignment|.
- // Note that scale factors |scale_resolution_down_by| may be adjusted so a
+ // by `requested_resolution_alignment`.
+ // Note that scale factors `scale_resolution_down_by` may be adjusted so a
// common multiple is not too large to avoid largely cropped frames and
// possibly with an aspect ratio far from the original.
// Warning: large values of scale_resolution_down_by could be changed
- // considerably, especially if |requested_resolution_alignment| is large.
+ // considerably, especially if `requested_resolution_alignment` is large.
bool apply_alignment_to_all_simulcast_layers;
// If true, encoder supports working with a native handle (e.g. texture
@@ -215,7 +215,7 @@
bool has_internal_source;
// For each spatial layer (simulcast stream or SVC layer), represented as an
- // element in |fps_allocation| a vector indicates how many temporal layers
+ // element in `fps_allocation` a vector indicates how many temporal layers
// the encoder is using for that spatial layer.
// For each spatial/temporal layer pair, the frame rate fraction is given as
// an 8bit unsigned integer where 0 = 0% and 255 = 100%.
@@ -243,8 +243,8 @@
// Recommended bitrate limits for different resolutions.
std::vector<ResolutionBitrateLimits> resolution_bitrate_limits;
- // Obtains the limits from |resolution_bitrate_limits| that best matches the
- // |frame_size_pixels|.
+ // Obtains the limits from `resolution_bitrate_limits` that best matches the
+ // `frame_size_pixels`.
absl::optional<ResolutionBitrateLimits>
GetEncoderBitrateLimitsForResolution(int frame_size_pixels) const;
@@ -279,7 +279,7 @@
VideoBitrateAllocation bitrate;
// Target framerate, in fps. A value <= 0.0 is invalid and should be
// interpreted as framerate target not available. In this case the encoder
- // should fall back to the max framerate specified in |codec_settings| of
+ // should fall back to the max framerate specified in `codec_settings` of
// the last InitEncode() call.
double framerate_fps;
// The network bandwidth available for video. This is at least
@@ -299,15 +299,15 @@
uint32_t timestamp_of_last_received;
// Describes whether the dependencies of the last received frame were
// all decodable.
- // |false| if some dependencies were undecodable, |true| if all dependencies
- // were decodable, and |nullopt| if the dependencies are unknown.
+ // `false` if some dependencies were undecodable, `true` if all dependencies
+ // were decodable, and `nullopt` if the dependencies are unknown.
absl::optional<bool> dependencies_of_last_received_decodable;
// Describes whether the received frame was decodable.
- // |false| if some dependency was undecodable or if some packet belonging
+ // `false` if some dependency was undecodable or if some packet belonging
// to the last received frame was missed.
- // |true| if all dependencies were decodable and all packets belonging
+ // `true` if all dependencies were decodable and all packets belonging
// to the last received frame were received.
- // |nullopt| if no packet belonging to the last frame was missed, but the
+ // `nullopt` if no packet belonging to the last frame was missed, but the
// last packet in the frame was not yet received.
absl::optional<bool> last_received_decodable;
};
diff --git a/api/video_codecs/video_encoder_config.h b/api/video_codecs/video_encoder_config.h
index 5916374..5440f1f 100644
--- a/api/video_codecs/video_encoder_config.h
+++ b/api/video_codecs/video_encoder_config.h
@@ -24,7 +24,7 @@
namespace webrtc {
-// The |VideoStream| struct describes a simulcast layer, or "stream".
+// The `VideoStream` struct describes a simulcast layer, or "stream".
struct VideoStream {
VideoStream();
~VideoStream();
@@ -46,7 +46,7 @@
int max_bitrate_bps;
// Scaling factor applied to the stream size.
- // |width| and |height| values are already scaled down.
+ // `width` and `height` values are already scaled down.
double scale_resolution_down_by;
// Maximum Quantization Parameter to use when encoding the stream.
@@ -171,7 +171,7 @@
// The simulcast layer's configurations set by the application for this video
// sender. These are modified by the video_stream_factory before being passed
// down to lower layers for the video encoding.
- // |simulcast_layers| is also used for configuring non-simulcast (when there
+ // `simulcast_layers` is also used for configuring non-simulcast (when there
// is a single VideoStream).
std::vector<VideoStream> simulcast_layers;
diff --git a/api/video_codecs/video_encoder_factory.h b/api/video_codecs/video_encoder_factory.h
index c2d66cf..2768079 100644
--- a/api/video_codecs/video_encoder_factory.h
+++ b/api/video_codecs/video_encoder_factory.h
@@ -29,7 +29,7 @@
public:
// TODO(magjed): Try to get rid of this struct.
struct CodecInfo {
- // |has_internal_source| is true if encoders created by this factory of the
+ // `has_internal_source` is true if encoders created by this factory of the
// given codec will use internal camera sources, meaning that they don't
// require/expect frames to be delivered via webrtc::VideoEncoder::Encode.
// This flag is used as the internal_source parameter to
@@ -88,7 +88,7 @@
// power efficient, which is currently interpreted as if there is support for
// hardware acceleration.
// See https://w3c.github.io/webrtc-svc/#scalabilitymodes* for a specification
- // of valid values for |scalability_mode|.
+ // of valid values for `scalability_mode`.
// NOTE: QueryCodecSupport is currently an experimental feature that is
// subject to change without notice.
virtual CodecSupport QueryCodecSupport(
diff --git a/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/api/video_codecs/video_encoder_software_fallback_wrapper.cc
index bcce9dc..e95c088 100644
--- a/api/video_codecs/video_encoder_software_fallback_wrapper.cc
+++ b/api/video_codecs/video_encoder_software_fallback_wrapper.cc
@@ -39,8 +39,8 @@
// If forced fallback is allowed, either:
//
// 1) The forced fallback is requested if the resolution is less than or equal
-// to |max_pixels_|. The resolution is allowed to be scaled down to
-// |min_pixels_|.
+// to `max_pixels_`. The resolution is allowed to be scaled down to
+// `min_pixels_`.
//
// 2) The forced fallback is requested if temporal support is preferred and the
// SW fallback supports temporal layers while the HW encoder does not.
@@ -274,8 +274,8 @@
void VideoEncoderSoftwareFallbackWrapper::SetFecControllerOverride(
FecControllerOverride* fec_controller_override) {
// It is important that only one of those would ever interact with the
- // |fec_controller_override| at a given time. This is the responsibility
- // of |this| to maintain.
+ // `fec_controller_override` at a given time. This is the responsibility
+ // of `this` to maintain.
fec_controller_override_ = fec_controller_override;
current_encoder()->SetFecControllerOverride(fec_controller_override);
diff --git a/api/video_codecs/video_encoder_software_fallback_wrapper.h b/api/video_codecs/video_encoder_software_fallback_wrapper.h
index 5282dcb..6e6902e 100644
--- a/api/video_codecs/video_encoder_software_fallback_wrapper.h
+++ b/api/video_codecs/video_encoder_software_fallback_wrapper.h
@@ -32,7 +32,7 @@
bool prefer_temporal_support);
// Default fallback for call-sites not yet updated with
-// |prefer_temporal_support|.
+// `prefer_temporal_support`.
// TODO(sprang): Remove when usage is gone.
RTC_EXPORT inline std::unique_ptr<VideoEncoder>
CreateVideoEncoderSoftwareFallbackWrapper(
diff --git a/api/video_codecs/vp8_frame_buffer_controller.h b/api/video_codecs/vp8_frame_buffer_controller.h
index d3f6bc4..852008f 100644
--- a/api/video_codecs/vp8_frame_buffer_controller.h
+++ b/api/video_codecs/vp8_frame_buffer_controller.h
@@ -66,7 +66,7 @@
// Number of active temporal layers. Set to 0 if not used.
uint32_t ts_number_layers;
- // Arrays of length |ts_number_layers|, indicating (cumulative) target
+ // Arrays of length `ts_number_layers`, indicating (cumulative) target
// bitrate and rate decimator (e.g. 4 if every 4th frame is in the given
// layer) for each active temporal layer, starting with temporal id 0.
std::array<uint32_t, kMaxLayers> ts_target_bitrate;
@@ -75,7 +75,7 @@
// The periodicity of the temporal pattern. Set to 0 if not used.
uint32_t ts_periodicity;
- // Array of length |ts_periodicity| indicating the sequence of temporal id's
+ // Array of length `ts_periodicity` indicating the sequence of temporal id's
// to assign to incoming frames.
std::array<uint32_t, kMaxPeriodicity> ts_layer_id;
};
@@ -106,7 +106,7 @@
// The limits are suggestion-only; the controller is allowed to exceed them.
virtual void SetQpLimits(size_t stream_index, int min_qp, int max_qp) = 0;
- // Number of streamed controlled by |this|.
+ // Number of streamed controlled by `this`.
virtual size_t StreamCount() const = 0;
// If this method returns true, the encoder is free to drop frames for
@@ -121,7 +121,7 @@
virtual bool SupportsEncoderFrameDropping(size_t stream_index) const = 0;
// New target bitrate for a stream (each entry in
- // |bitrates_bps| is for another temporal layer).
+ // `bitrates_bps` is for another temporal layer).
virtual void OnRatesUpdated(size_t stream_index,
const std::vector<uint32_t>& bitrates_bps,
int framerate_fps) = 0;
@@ -130,7 +130,7 @@
// the controller wishes to enact in the encoder's configuration.
// If a value is not overridden, previous overrides are still in effect.
// 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;
// Returns the recommended VP8 encode flags needed.
@@ -142,13 +142,13 @@
virtual Vp8FrameConfig NextFrameConfig(size_t stream_index,
uint32_t rtp_timestamp) = 0;
- // Called after the encode step is done. |rtp_timestamp| must match the
+ // Called after the encode step is done. `rtp_timestamp` must match the
// parameter use in the NextFrameConfig() call.
- // |is_keyframe| must be true iff the encoder decided to encode this frame as
+ // `is_keyframe` must be true iff the encoder decided to encode this frame as
// a keyframe.
- // If |info| is not null, the encoder may update |info| with codec specific
- // data such as temporal id. |qp| should indicate the frame-level QP this
- // frame was encoded at. If the encoder does not support extracting this, |qp|
+ // If `info` is not null, the encoder may update `info` with codec specific
+ // data such as temporal id. `qp` should indicate the frame-level QP this
+ // frame was encoded at. If the encoder does not support extracting this, `qp`
// should be set to 0.
virtual void OnEncodeDone(size_t stream_index,
uint32_t rtp_timestamp,
@@ -161,7 +161,7 @@
virtual void OnFrameDropped(size_t stream_index, uint32_t rtp_timestamp) = 0;
// Called by the encoder when the packet loss rate changes.
- // |packet_loss_rate| runs between 0.0 (no loss) and 1.0 (everything lost).
+ // `packet_loss_rate` runs between 0.0 (no loss) and 1.0 (everything lost).
virtual void OnPacketLossRateUpdate(float packet_loss_rate) = 0;
// Called by the encoder when the round trip time changes.