diff --git a/test/encoder_settings.h b/test/encoder_settings.h index 86ef0bbc43..40aed07465 100644 --- a/test/encoder_settings.h +++ b/test/encoder_settings.h @@ -40,10 +40,10 @@ class DefaultVideoStreamFactory const VideoEncoderConfig& encoder_config) override; }; -// Creates |encoder_config.number_of_streams| VideoStreams where index -// |encoder_config.number_of_streams -1| have width = |width|, height = -// |height|. The total max bitrate of all VideoStreams is -// |encoder_config.max_bitrate_bps|. +// Creates `encoder_config.number_of_streams` VideoStreams where index +// `encoder_config.number_of_streams -1` have width = `width`, height = +// `height`. The total max bitrate of all VideoStreams is +// `encoder_config.max_bitrate_bps`. std::vector CreateVideoStreams( int width, int height, diff --git a/test/fake_encoder.h b/test/fake_encoder.h index 9feed1455f..5257fc2905 100644 --- a/test/fake_encoder.h +++ b/test/fake_encoder.h @@ -83,8 +83,8 @@ class FakeEncoder : public VideoEncoder { int framerate) RTC_LOCKS_EXCLUDED(mutex_); // Called before the frame is passed to callback_->OnEncodedImage, to let - // subclasses fill out CodecSpecificInfo, possibly modify |encoded_image| or - // |buffer|. + // subclasses fill out CodecSpecificInfo, possibly modify `encoded_image` or + // `buffer`. virtual CodecSpecificInfo EncodeHook( EncodedImage& encoded_image, rtc::scoped_refptr buffer); @@ -139,7 +139,7 @@ class DelayedEncoder : public test::FakeEncoder { }; // This class implements a multi-threaded fake encoder by posting -// FakeH264Encoder::Encode(.) tasks to |queue1_| and |queue2_|, in an +// FakeH264Encoder::Encode(.) tasks to `queue1_` and `queue2_`, in an // alternating fashion. The class itself does not need to be thread safe, // as it is called from the task queue in VideoStreamEncoder. class MultithreadedFakeH264Encoder : public test::FakeH264Encoder { diff --git a/test/fake_vp8_encoder.cc b/test/fake_vp8_encoder.cc index a24fab81bb..625d7a6473 100644 --- a/test/fake_vp8_encoder.cc +++ b/test/fake_vp8_encoder.cc @@ -24,7 +24,7 @@ namespace { // Write width and height to the payload the same way as the real encoder does. -// It requires that |payload| has a size of at least kMinPayLoadHeaderLength. +// It requires that `payload` has a size of at least kMinPayLoadHeaderLength. void WriteFakeVp8(unsigned char* payload, int width, int height, diff --git a/test/frame_forwarder.h b/test/frame_forwarder.h index bbf11cc939..6dfba9521d 100644 --- a/test/frame_forwarder.h +++ b/test/frame_forwarder.h @@ -25,7 +25,7 @@ class FrameForwarder : public rtc::VideoSourceInterface { public: FrameForwarder(); ~FrameForwarder() override; - // Forwards |video_frame| to the registered |sink_|. + // Forwards `video_frame` to the registered `sink_`. virtual void IncomingCapturedFrame(const VideoFrame& video_frame) RTC_LOCKS_EXCLUDED(mutex_); rtc::VideoSinkWants sink_wants() const RTC_LOCKS_EXCLUDED(mutex_); diff --git a/test/frame_generator_unittest.cc b/test/frame_generator_unittest.cc index bcb30b978f..467323a0d5 100644 --- a/test/frame_generator_unittest.cc +++ b/test/frame_generator_unittest.cc @@ -179,7 +179,7 @@ TEST_F(FrameGeneratorTest, SlideGenerator) { for (int i = 0; i < kGenCount; ++i) { hashes[i] = Hash(generator->NextFrame()); } - // Check that the buffer changes only every |kRepeatCount| frames. + // Check that the buffer changes only every `kRepeatCount` frames. for (int i = 1; i < kGenCount; ++i) { if (i % kRepeatCount == 0) { EXPECT_NE(hashes[i - 1], hashes[i]); diff --git a/test/fuzzers/audio_decoder_fuzzer.cc b/test/fuzzers/audio_decoder_fuzzer.cc index 9c9bbf69d5..1db332eeb5 100644 --- a/test/fuzzers/audio_decoder_fuzzer.cc +++ b/test/fuzzers/audio_decoder_fuzzer.cc @@ -35,12 +35,12 @@ bool ParseInt(const uint8_t** data, size_t* remaining_size, T* value) { } } // namespace -// This function reads two bytes from the beginning of |data|, interprets them +// This function reads two bytes from the beginning of `data`, interprets them // as the first packet length, and reads this many bytes if available. The // payload is inserted into the decoder, and the process continues until no more // data is available. Either AudioDecoder::Decode or // AudioDecoder::DecodeRedundant is used, depending on the value of -// |decode_type|. +// `decode_type`. void FuzzAudioDecoder(DecoderFunctionType decode_type, const uint8_t* data, size_t size, diff --git a/test/fuzzers/audio_encoder_fuzzer.cc b/test/fuzzers/audio_encoder_fuzzer.cc index 54def44480..837c26df56 100644 --- a/test/fuzzers/audio_encoder_fuzzer.cc +++ b/test/fuzzers/audio_encoder_fuzzer.cc @@ -18,7 +18,7 @@ namespace webrtc { -// This function reads bytes from |data_view|, interprets them as RTP timestamp +// This function reads bytes from `data_view`, interprets them as RTP timestamp // and input samples, and sends them for encoding. The process continues until // no more data is available. void FuzzAudioEncoder(rtc::ArrayView data_view, diff --git a/test/fuzzers/packet_buffer_fuzzer.cc b/test/fuzzers/packet_buffer_fuzzer.cc index ea9d4896f1..3c4e9688ab 100644 --- a/test/fuzzers/packet_buffer_fuzzer.cc +++ b/test/fuzzers/packet_buffer_fuzzer.cc @@ -37,7 +37,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) { // Fuzz non-POD member of the packet. packet->video_payload.SetSize(helper.ReadOrDefaultValue(0)); - // TODO(danilchap): Fuzz other non-POD members of the |packet|. + // TODO(danilchap): Fuzz other non-POD members of the `packet`. IgnoreResult(packet_buffer.InsertPacket(std::move(packet))); } diff --git a/test/fuzzers/rtp_dependency_descriptor_fuzzer.cc b/test/fuzzers/rtp_dependency_descriptor_fuzzer.cc index 0736bba27c..82404f7264 100644 --- a/test/fuzzers/rtp_dependency_descriptor_fuzzer.cc +++ b/test/fuzzers/rtp_dependency_descriptor_fuzzer.cc @@ -52,7 +52,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) { // Write parsed descriptor back into raw buffer. size_t value_size = RtpDependencyDescriptorExtension::ValueSize(structure1, descriptor1); - // Check |writer| use minimal number of bytes to pack the descriptor by + // Check `writer` use minimal number of bytes to pack the descriptor by // checking it doesn't use more than reader consumed. RTC_CHECK_LE(value_size, raw.size()); uint8_t some_memory[256]; diff --git a/test/fuzzers/rtp_header_fuzzer.cc b/test/fuzzers/rtp_header_fuzzer.cc index fb0f1de2e5..b5905f0de3 100644 --- a/test/fuzzers/rtp_header_fuzzer.cc +++ b/test/fuzzers/rtp_header_fuzzer.cc @@ -16,7 +16,7 @@ namespace webrtc { // We decide which header extensions to register by reading four bytes -// from the beginning of |data| and interpreting it as a bitmask over +// from the beginning of `data` and interpreting it as a bitmask over // the RTPExtensionType enum. This assert ensures four bytes are enough. static_assert(kRtpExtensionNumberOfExtensions <= 32, "Insufficient bits read to configure all header extensions. Add " diff --git a/test/fuzzers/rtp_packet_fuzzer.cc b/test/fuzzers/rtp_packet_fuzzer.cc index 3f2fc5e668..5d56eb1505 100644 --- a/test/fuzzers/rtp_packet_fuzzer.cc +++ b/test/fuzzers/rtp_packet_fuzzer.cc @@ -20,7 +20,7 @@ namespace webrtc { // We decide which header extensions to register by reading four bytes -// from the beginning of |data| and interpreting it as a bitmask over +// from the beginning of `data` and interpreting it as a bitmask over // the RTPExtensionType enum. This assert ensures four bytes are enough. static_assert(kRtpExtensionNumberOfExtensions <= 32, "Insufficient bits read to configure all header extensions. Add " diff --git a/test/fuzzers/utils/rtp_replayer.h b/test/fuzzers/utils/rtp_replayer.h index c79a17eec5..46d3d00f2c 100644 --- a/test/fuzzers/utils/rtp_replayer.h +++ b/test/fuzzers/utils/rtp_replayer.h @@ -35,7 +35,7 @@ namespace test { // The RtpReplayer is a utility for fuzzing the RTP/RTCP receiver stack in // WebRTC. It achieves this by accepting a set of Receiver configurations and -// an RtpDump (consisting of both RTP and RTCP packets). The |rtp_dump| is +// an RtpDump (consisting of both RTP and RTCP packets). The `rtp_dump` is // passed in as a buffer to allow simple mutation fuzzing directly on the dump. class RtpReplayer final { public: diff --git a/test/mappable_native_buffer.h b/test/mappable_native_buffer.h index add22029c7..08f155e07f 100644 --- a/test/mappable_native_buffer.h +++ b/test/mappable_native_buffer.h @@ -40,7 +40,7 @@ rtc::scoped_refptr GetMappableNativeBufferFromVideoFrame( // modules. class MappableNativeBuffer : public VideoFrameBuffer { public: - // If |allow_i420_conversion| is false, calling ToI420() on a non-I420 buffer + // If `allow_i420_conversion` is false, calling ToI420() on a non-I420 buffer // will DCHECK-crash. Used to ensure zero-copy in tests. MappableNativeBuffer(VideoFrameBuffer::Type mappable_type, int width, diff --git a/test/mock_audio_encoder.h b/test/mock_audio_encoder.h index 87b8cc8c8e..1f4510e885 100644 --- a/test/mock_audio_encoder.h +++ b/test/mock_audio_encoder.h @@ -68,7 +68,7 @@ class MockAudioEncoder : public AudioEncoder { class FakeEncoding { public: - // Creates a functor that will return |info| and adjust the rtc::Buffer + // Creates a functor that will return `info` and adjust the rtc::Buffer // given as input to it, so it is info.encoded_bytes larger. explicit FakeEncoding(const AudioEncoder::EncodedInfo& info); @@ -88,7 +88,7 @@ class MockAudioEncoder : public AudioEncoder { public: ~CopyEncoding(); - // Creates a functor that will return |info| and append the data in the + // Creates a functor that will return `info` and append the data in the // payload to the buffer given as input to it. Up to info.encoded_bytes are // appended - make sure the payload is big enough! Since it uses an // ArrayView, it _does not_ copy the payload. Make sure it doesn't fall out diff --git a/test/network/cross_traffic.h b/test/network/cross_traffic.h index 487622d4d4..d21e942475 100644 --- a/test/network/cross_traffic.h +++ b/test/network/cross_traffic.h @@ -85,7 +85,7 @@ class TcpMessageRouteImpl final : public TcpMessageRoute { EmulatedRoute* send_route, EmulatedRoute* ret_route); - // Sends a TCP message of the given |size| over the route, |on_received| is + // Sends a TCP message of the given `size` over the route, `on_received` is // called when the message has been delivered. Note that the connection // parameters are reset iff there's no currently pending message on the route. void SendMessage(size_t size, std::function on_received) override; diff --git a/test/network/emulated_turn_server.cc b/test/network/emulated_turn_server.cc index d67e4e337a..28b7667957 100644 --- a/test/network/emulated_turn_server.cc +++ b/test/network/emulated_turn_server.cc @@ -79,7 +79,7 @@ class PacketSocketFactoryWrapper : public rtc::PacketSocketFactory { ~PacketSocketFactoryWrapper() override {} // This method is called from TurnServer when making a TURN ALLOCATION. - // It will create a socket on the |peer_| endpoint. + // It will create a socket on the `peer_` endpoint. rtc::AsyncPacketSocket* CreateUdpSocket(const rtc::SocketAddress& address, uint16_t min_port, uint16_t max_port) override { diff --git a/test/network/emulated_turn_server.h b/test/network/emulated_turn_server.h index f91124d4d6..b8a18d3116 100644 --- a/test/network/emulated_turn_server.h +++ b/test/network/emulated_turn_server.h @@ -39,7 +39,7 @@ class EmulatedTURNServer : public EmulatedTURNServerInterface, public webrtc::EmulatedNetworkReceiverInterface { public: // Create an EmulatedTURNServer. - // |thread| is a thread that will be used to run cricket::TurnServer + // `thread` is a thread that will be used to run cricket::TurnServer // that expects all calls to be made from a single thread. EmulatedTURNServer(std::unique_ptr thread, EmulatedEndpoint* client, diff --git a/test/network/fake_network_socket_server.cc b/test/network/fake_network_socket_server.cc index bf6ef5f12d..41200ad341 100644 --- a/test/network/fake_network_socket_server.cc +++ b/test/network/fake_network_socket_server.cc @@ -185,7 +185,7 @@ int FakeNetworkSocket::Recv(void* pv, size_t cb, int64_t* timestamp) { return RecvFrom(pv, cb, &paddr, timestamp); } -// Reads 1 packet from internal queue. Reads up to |cb| bytes into |pv| +// Reads 1 packet from internal queue. Reads up to `cb` bytes into `pv` // and returns the length of received packet. int FakeNetworkSocket::RecvFrom(void* pv, size_t cb, diff --git a/test/network/network_emulation.h b/test/network/network_emulation.h index f700beffcd..e60deafcc7 100644 --- a/test/network/network_emulation.h +++ b/test/network/network_emulation.h @@ -456,10 +456,10 @@ class NetworkRouterNode : public EmulatedNetworkReceiverInterface { // NetworkBehaviorInterface that is provided on construction. class EmulatedNetworkNode : public EmulatedNetworkReceiverInterface { public: - // Creates node based on |network_behavior|. The specified |packet_overhead| + // Creates node based on `network_behavior`. The specified `packet_overhead` // is added to the size of each packet in the information provided to - // |network_behavior|. - // |task_queue| is used to process packets and to forward the packets when + // `network_behavior`. + // `task_queue` is used to process packets and to forward the packets when // they are ready. EmulatedNetworkNode( Clock* clock, diff --git a/test/network/traffic_route.h b/test/network/traffic_route.h index 2c2fadc427..dbc41a694f 100644 --- a/test/network/traffic_route.h +++ b/test/network/traffic_route.h @@ -31,9 +31,9 @@ class CrossTrafficRouteImpl final : public CrossTrafficRoute { EmulatedEndpointImpl* endpoint); ~CrossTrafficRouteImpl(); - // Triggers sending of dummy packets with size |packet_size| bytes. + // Triggers sending of dummy packets with size `packet_size` bytes. void TriggerPacketBurst(size_t num_packets, size_t packet_size) override; - // Sends a packet over the nodes and runs |action| when it has been delivered. + // Sends a packet over the nodes and runs `action` when it has been delivered. void NetworkDelayedAction(size_t packet_size, std::function action) override; diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc index 53fb14e606..41c53867f4 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc @@ -161,7 +161,7 @@ uint16_t DefaultVideoQualityAnalyzer::OnFrameCaptured( absl::string_view peer_name, const std::string& stream_label, const webrtc::VideoFrame& frame) { - // |next_frame_id| is atomic, so we needn't lock here. + // `next_frame_id` is atomic, so we needn't lock here. uint16_t frame_id = next_frame_id_++; Timestamp start_time = Timestamp::MinusInfinity(); size_t peer_index = -1; @@ -169,8 +169,8 @@ uint16_t DefaultVideoQualityAnalyzer::OnFrameCaptured( size_t stream_index; { MutexLock lock(&lock_); - // Create a local copy of |start_time_|, peer's index and total peers count - // to access it under |comparison_lock_| without holding a |lock_| + // Create a local copy of `start_time_`, peer's index and total peers count + // to access it under `comparison_lock_` without holding a `lock_` start_time = start_time_; peer_index = peers_->index(peer_name); peers_count = peers_->size(); @@ -191,10 +191,10 @@ uint16_t DefaultVideoQualityAnalyzer::OnFrameCaptured( // between freezes. stream_last_freeze_end_time_.insert({stats_key, start_time}); } else { - // When we see some |stream_label| for the first time we need to create + // When we see some `stream_label` for the first time we need to create // stream stats object for it and set up some states, but we need to do // it only once and for all receivers, so on the next frame on the same - // |stream_label| we can be sure, that it's already done and we needn't + // `stream_label` we can be sure, that it's already done and we needn't // to scan though all peers again. break; } @@ -427,9 +427,9 @@ void DefaultVideoQualityAnalyzer::OnFrameRendered( state->Front(peer_index) != frame.id()) { dropped_count++; uint16_t dropped_frame_id = state->PopFront(peer_index); - // Frame with id |dropped_frame_id| was dropped. We need: + // Frame with id `dropped_frame_id` was dropped. We need: // 1. Update global and stream frame counters - // 2. Extract corresponding frame from |captured_frames_in_flight_| + // 2. Extract corresponding frame from `captured_frames_in_flight_` // 3. Send extracted frame to comparison with dropped=true // 4. Cleanup dropped frame frame_counters_.dropped++; @@ -566,7 +566,7 @@ void DefaultVideoQualityAnalyzer::Stop() { // If there are no freezes in the call we have to report // time_between_freezes_ms as call duration and in such case - // |stream_last_freeze_end_time_| for this stream will be |start_time_|. + // `stream_last_freeze_end_time_` for this stream will be `start_time_`. // If there is freeze, then we need add time from last rendered frame // to last freeze end as time between freezes. if (stream_state.last_rendered_frame_time(i)) { @@ -1185,7 +1185,7 @@ size_t DefaultVideoQualityAnalyzer::NamesCollection::AddIfAbsent( if (old_capacity == new_capacity) { index_.emplace(names_[out], out); } else { - // Reallocation happened in the vector, so we need to rebuild |index_| + // Reallocation happened in the vector, so we need to rebuild `index_` index_.clear(); for (size_t i = 0; i < names_.size(); ++i) { index_.emplace(names_[i], i); diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h index 626fa246e5..e4437fb89f 100644 --- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h +++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h @@ -274,11 +274,11 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { // Represents comparison between two VideoFrames. Contains video frames itself // and stats. Can be one of two types: - // 1. Normal - in this case |captured| is presented and either |rendered| is - // presented and |dropped| is false, either |rendered| is omitted and - // |dropped| is true. - // 2. Overloaded - in this case both |captured| and |rendered| are omitted - // because there were too many comparisons in the queue. |dropped| can be + // 1. Normal - in this case `captured` is presented and either `rendered` is + // presented and `dropped` is false, either `rendered` is omitted and + // `dropped` is true. + // 2. Overloaded - in this case both `captured` and `rendered` are omitted + // because there were too many comparisons in the queue. `dropped` can be // true or false showing was frame dropped or not. struct FrameComparison { FrameComparison(InternalStatsKey stats_key, @@ -294,7 +294,7 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { absl::optional captured; absl::optional rendered; // 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|. bool dropped; FrameStats frame_stats; @@ -329,7 +329,7 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { absl::optional last_rendered_frame_time(size_t peer) const; private: - // Index of the owner. Owner's queue in |frame_ids_| will keep alive frames. + // Index of the owner. Owner's queue in `frame_ids_` will keep alive frames. const size_t owner_; // To correctly determine dropped frames we have to know sequence of frames // in each stream so we will keep a list of frame ids inside the stream. @@ -342,10 +342,10 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { // // If we received frame with id frame_id3, then we will pop frame_id1 and // frame_id2 and consider that frames as dropped and then compare received - // frame with the one from |captured_frames_in_flight_| with id frame_id3. + // frame with the one from `captured_frames_in_flight_` with id frame_id3. // // To track alive frames (frames that contains frame's payload in - // |captured_frames_in_flight_|) the head which corresponds to |owner_| will + // `captured_frames_in_flight_`) the head which corresponds to `owner_` will // be used. So that head will point to the first alive frame in frames list. MultiHeadQueue frame_ids_; std::map last_rendered_frame_time_; @@ -418,7 +418,7 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { bool HasRenderedTime(size_t peer) const; - // Crash if rendered time is not set for specified |peer|. + // Crash if rendered time is not set for specified `peer`. webrtc::Timestamp rendered_time(size_t peer) const { return receiver_stats_.at(peer).rendered_time; } @@ -466,8 +466,8 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { return index_.find(name) != index_.end(); } - // Add specified |name| to the collection if it isn't presented. - // Returns index which corresponds to specified |name|. + // Add specified `name` to the collection if it isn't presented. + // Returns index which corresponds to specified `name`. size_t AddIfAbsent(absl::string_view name); private: @@ -540,12 +540,12 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { // Frame counters per each stream per each receiver. std::map stream_frame_counters_ RTC_GUARDED_BY(lock_); - // Map from stream index in |streams_| to its StreamState. + // Map from stream index in `streams_` to its StreamState. std::map stream_states_ RTC_GUARDED_BY(lock_); - // Map from stream index in |streams_| to sender peer index in |peers_|. + // Map from stream index in `streams_` to sender peer index in `peers_`. std::map stream_to_sender_ RTC_GUARDED_BY(lock_); - // Stores history mapping between stream index in |streams_| and frame ids. + // Stores history mapping between stream index in `streams_` and frame ids. // Updated when frame id overlap. It required to properly return stream label // after 1st frame from simulcast streams was already rendered and last is // still encoding. diff --git a/test/pc/e2e/analyzer/video/encoded_image_data_injector.h b/test/pc/e2e/analyzer/video/encoded_image_data_injector.h index 154e38e43f..51a5c597b5 100644 --- a/test/pc/e2e/analyzer/video/encoded_image_data_injector.h +++ b/test/pc/e2e/analyzer/video/encoded_image_data_injector.h @@ -24,8 +24,8 @@ class EncodedImageDataInjector { public: virtual ~EncodedImageDataInjector() = default; - // Return encoded image with specified |id| and |discard| flag injected into - // its payload. |discard| flag mean does analyzing decoder should discard this + // Return encoded image with specified `id` and `discard` flag injected into + // its payload. `discard` flag mean does analyzing decoder should discard this // encoded image because it belongs to unnecessary simulcast stream or spatial // layer. virtual EncodedImage InjectData(uint16_t id, @@ -47,7 +47,7 @@ class EncodedImageDataExtractor { virtual ~EncodedImageDataExtractor() = default; // Invoked by framework before any image will come to the extractor. - // |expected_receivers_count| is the expected amount of receivers for each + // `expected_receivers_count` is the expected amount of receivers for each // encoded image. virtual void Start(int expected_receivers_count) = 0; diff --git a/test/pc/e2e/analyzer/video/multi_head_queue.h b/test/pc/e2e/analyzer/video/multi_head_queue.h index fc606d207b..0af6a19675 100644 --- a/test/pc/e2e/analyzer/video/multi_head_queue.h +++ b/test/pc/e2e/analyzer/video/multi_head_queue.h @@ -28,7 +28,7 @@ namespace webrtc_pc_e2e { template class MultiHeadQueue { public: - // Creates queue with exactly |readers_count| readers. + // Creates queue with exactly `readers_count` readers. explicit MultiHeadQueue(size_t readers_count) { for (size_t i = 0; i < readers_count; ++i) { queues_.push_back(std::deque()); diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc index 68b76cd37d..4c4c19f326 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc @@ -85,8 +85,8 @@ int32_t QualityAnalyzingVideoDecoder::Decode(const EncodedImage& input_image, origin_image = &( decoding_images_.insert({out.id, std::move(out.image)}).first->second); } - // We can safely dereference |origin_image|, because it can be removed from - // the map only after |delegate_| Decode method will be invoked. Image will be + // We can safely dereference `origin_image`, because it can be removed from + // the map only after `delegate_` Decode method will be invoked. Image will be // removed inside DecodedImageCallback, which can be done on separate thread. analyzer_->OnFramePreDecode(peer_name_, out.id, *origin_image); int32_t result = @@ -143,8 +143,8 @@ void QualityAnalyzingVideoDecoder::DecoderCallback::SetDelegateCallback( } // We have to implement all next 3 methods because we don't know which one -// exactly is implemented in |delegate_callback_|, so we need to call the same -// method on |delegate_callback_|, as was called on |this| callback. +// exactly is implemented in `delegate_callback_`, so we need to call the same +// method on `delegate_callback_`, as was called on `this` callback. int32_t QualityAnalyzingVideoDecoder::DecoderCallback::Decoded( VideoFrame& decodedImage) { decoder_->OnFrameDecoded(&decodedImage, /*decode_time_ms=*/absl::nullopt, diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc index 5b8a571cd0..bc921ac266 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc @@ -245,7 +245,7 @@ EncodedImageCallback::Result QualityAnalyzingVideoEncoder::OnEncodedImage( timestamp_to_frame_id_list_.pop_front(); } - // After the loop the first element should point to current |encoded_image| + // After the loop the first element should point to current `encoded_image` // frame id. We don't remove it from the list, because there may be // multiple spatial layers for this frame, so encoder can produce more // encoded images with this timestamp. The first element will be removed diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h index 2ba8bdcb38..ce00292bf2 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h @@ -139,8 +139,8 @@ class QualityAnalyzingVideoEncoder : public VideoEncoder, const double bitrate_multiplier_; // Contains mapping from stream label to optional spatial index. // If we have stream label "Foo" and mapping contains - // 1. |absl::nullopt| means "Foo" isn't simulcast/SVC stream - // 2. |kAnalyzeAnySpatialStream| means all simulcast/SVC streams are required + // 1. `absl::nullopt` means "Foo" isn't simulcast/SVC stream + // 2. `kAnalyzeAnySpatialStream` means all simulcast/SVC streams are required // 3. Concrete value means that particular simulcast/SVC stream have to be // analyzed. std::map> stream_required_spatial_index_; diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h index 03feb7997c..0db46e4676 100644 --- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h +++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h @@ -44,7 +44,7 @@ class SingleProcessEncodedImageDataInjector : public EncodedImageDataInjector, ~SingleProcessEncodedImageDataInjector() override; // Id and discard flag will be injected into EncodedImage buffer directly. - // This buffer won't be fully copied, so |source| image buffer will be also + // This buffer won't be fully copied, so `source` image buffer will be also // changed. EncodedImage InjectData(uint16_t id, bool discard, diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h index 85874cb5bc..997b8ad061 100644 --- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h +++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h @@ -68,13 +68,13 @@ class VideoQualityAnalyzerInjectionHelper : public StatsObserverInterface { // Creates VideoFrame preprocessor, that will allow video quality analyzer to // get access to the captured frames. If provided config also specifies - // |input_dump_file_name|, video will be written into that file. + // `input_dump_file_name`, video will be written into that file. std::unique_ptr CreateFramePreprocessor(absl::string_view peer_name, const VideoConfig& config); // Creates sink, that will allow video quality analyzer to get access to // the rendered frames. If corresponding video track has - // |output_dump_file_name| in its VideoConfig, which was used for + // `output_dump_file_name` in its VideoConfig, which was used for // CreateFramePreprocessor(...), then video also will be written // into that file. std::unique_ptr> CreateVideoSink( @@ -84,8 +84,8 @@ class VideoQualityAnalyzerInjectionHelper : public StatsObserverInterface { rtc::ArrayView peer_names, int max_threads_count = 1); - // Forwards |stats_reports| for Peer Connection |pc_label| to - // |analyzer_|. + // Forwards `stats_reports` for Peer Connection `pc_label` to + // `analyzer_`. void OnStatsReports( absl::string_view pc_label, const rtc::scoped_refptr& report) override; diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc index 6fbfd37eac..20bfd3ed21 100644 --- a/test/pc/e2e/peer_connection_quality_test.cc +++ b/test/pc/e2e/peer_connection_quality_test.cc @@ -66,9 +66,9 @@ constexpr char kFlexFecEnabledFieldTrials[] = class FixturePeerConnectionObserver : public MockPeerConnectionObserver { public: - // |on_track_callback| will be called when any new track will be added to peer + // `on_track_callback` will be called when any new track will be added to peer // connection. - // |on_connected_callback| will be called when peer connection will come to + // `on_connected_callback` will be called when peer connection will come to // either connected or completed state. Client should notice that in the case // of reconnect this callback can be called again, so it should be tolerant // to such behavior. @@ -197,7 +197,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) { video_quality_analyzer_injection_helper_.get(), task_queue_factory_.get(), time_controller_.GetClock()); - // Create a |task_queue_|. + // Create a `task_queue_`. task_queue_ = std::make_unique( time_controller_.GetTaskQueueFactory()->CreateTaskQueue( "pc_e2e_quality_test", webrtc::TaskQueueFactory::Priority::NORMAL)); @@ -350,7 +350,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) { stats_poller.PollStatsAndNotifyObservers(); }, RTC_FROM_HERE); - // We need to detach AEC dumping from peers, because dump uses |task_queue_| + // We need to detach AEC dumping from peers, because dump uses `task_queue_` // inside. alice_->DetachAecDump(); bob_->DetachAecDump(); @@ -372,7 +372,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) { reporter->StopAndReportResults(); } - // Reset |task_queue_| after test to cleanup. + // Reset `task_queue_` after test to cleanup. task_queue_.reset(); alice_ = nullptr; diff --git a/test/pc/e2e/peer_connection_quality_test_params.h b/test/pc/e2e/peer_connection_quality_test_params.h index 31938f77f5..9ac9c21e10 100644 --- a/test/pc/e2e/peer_connection_quality_test_params.h +++ b/test/pc/e2e/peer_connection_quality_test_params.h @@ -103,14 +103,14 @@ struct InjectableComponents { struct Params { // Peer name. If empty - default one will be set by the fixture. absl::optional name; - // If |video_configs| is empty - no video should be added to the test call. + // If `video_configs` is empty - no video should be added to the test call. std::vector video_configs; - // If |audio_config| is set audio stream will be configured + // If `audio_config` is set audio stream will be configured absl::optional audio_config; - // If |rtc_event_log_path| is set, an RTCEventLog will be saved in that + // If `rtc_event_log_path` is set, an RTCEventLog will be saved in that // location and it will be available for further analysis. absl::optional rtc_event_log_path; - // If |aec_dump_path| is set, an AEC dump will be saved in that location and + // If `aec_dump_path` is set, an AEC dump will be saved in that location and // it will be available for further analysis. absl::optional aec_dump_path; diff --git a/test/pc/e2e/sdp/sdp_changer.cc b/test/pc/e2e/sdp/sdp_changer.cc index aa067f0c40..b3e5fc25a9 100644 --- a/test/pc/e2e/sdp/sdp_changer.cc +++ b/test/pc/e2e/sdp/sdp_changer.cc @@ -110,7 +110,7 @@ std::vector FilterVideoCodecCapabilities( // If offer has no simulcast video sections - do nothing. // // If offer has simulcast video sections - for each section creates -// SimulcastSectionInfo and put it into |context_|. +// SimulcastSectionInfo and put it into `context_`. void SignalingInterceptor::FillSimulcastContext( SessionDescriptionInterface* offer) { for (auto& content : offer->description()->contents()) { @@ -227,7 +227,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Offer( // Remove simulcast video section from offer. RTC_CHECK(desc->RemoveContentByName(simulcast_content->mid())); - // Clear |simulcast_content|, because now it is pointing to removed object. + // Clear `simulcast_content`, because now it is pointing to removed object. simulcast_content = nullptr; // Swap mid and rid extensions, so remote peer will understand rid as mid. @@ -410,7 +410,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Answer( // Get media description, which will be converted to simulcast answer. std::unique_ptr media_desc = simulcast_content->media_description()->Clone(); - // Set |simulcast_content| to nullptr, because then it will be removed, so + // Set `simulcast_content` to nullptr, because then it will be removed, so // it will point to deleted object. simulcast_content = nullptr; @@ -419,7 +419,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Answer( RTC_CHECK(desc->RemoveContentByName(rid)); } - // Patch |media_desc| to make it simulcast answer description. + // Patch `media_desc` to make it simulcast answer description. // Restore mid/rid rtp header extensions std::vector extensions = media_desc->rtp_header_extensions(); diff --git a/test/pc/e2e/sdp/sdp_changer.h b/test/pc/e2e/sdp/sdp_changer.h index 943d332945..115ed5ba2c 100644 --- a/test/pc/e2e/sdp/sdp_changer.h +++ b/test/pc/e2e/sdp/sdp_changer.h @@ -30,15 +30,15 @@ namespace webrtc_pc_e2e { // Creates list of capabilities, which can be set on RtpTransceiverInterface via // RtpTransceiverInterface::SetCodecPreferences(...) to negotiate use of codecs -// from list of |supported_codecs| which will match |video_codecs|. If flags -// |ulpfec| or |flexfec| set to true corresponding FEC codec will be added. +// from list of `supported_codecs` which will match `video_codecs`. If flags +// `ulpfec` or `flexfec` set to true corresponding FEC codec will be added. // FEC and RTX codecs will be added after required codecs. // // All codecs will be added only if they exists in the list of -// |supported_codecs|. If multiple codecs from this list will match -// |video_codecs|, then all of them will be added to the output +// `supported_codecs`. If multiple codecs from this list will match +// `video_codecs`, then all of them will be added to the output // vector and they will be added in the same order, as they were in -// |supported_codecs|. +// `supported_codecs`. std::vector FilterVideoCodecCapabilities( rtc::ArrayView video_codecs, diff --git a/test/pc/e2e/stats_based_network_quality_metrics_reporter.h b/test/pc/e2e/stats_based_network_quality_metrics_reporter.h index d14bb43e1b..733a40af94 100644 --- a/test/pc/e2e/stats_based_network_quality_metrics_reporter.h +++ b/test/pc/e2e/stats_based_network_quality_metrics_reporter.h @@ -35,7 +35,7 @@ namespace webrtc_pc_e2e { class StatsBasedNetworkQualityMetricsReporter : public PeerConnectionE2EQualityTestFixture::QualityMetricsReporter { public: - // |networks| map peer name to network to report network layer stability stats + // `networks` map peer name to network to report network layer stability stats // and to log network layer metrics. StatsBasedNetworkQualityMetricsReporter( std::map> peer_endpoints, diff --git a/test/pc/e2e/test_activities_executor.h b/test/pc/e2e/test_activities_executor.h index 94e73d1e5f..8d5f6bcaa4 100644 --- a/test/pc/e2e/test_activities_executor.h +++ b/test/pc/e2e/test_activities_executor.h @@ -68,10 +68,10 @@ class TestActivitiesExecutor { // yet. Timestamp start_time_ RTC_GUARDED_BY(lock_) = Timestamp::MinusInfinity(); // Queue of activities that were added before test was started. - // Activities from this queue will be posted on the |task_queue_| after test + // Activities from this queue will be posted on the `task_queue_` after test // will be set up and then this queue will be unused. std::queue scheduled_activities_ RTC_GUARDED_BY(lock_); - // List of task handles for activities, that are posted on |task_queue_| as + // List of task handles for activities, that are posted on `task_queue_` as // repeated during the call. std::vector repeating_task_handles_ RTC_GUARDED_BY(lock_); diff --git a/test/pc/e2e/test_peer.h b/test/pc/e2e/test_peer.h index d8d5b2d1bb..44f55517fa 100644 --- a/test/pc/e2e/test_peer.h +++ b/test/pc/e2e/test_peer.h @@ -116,7 +116,7 @@ class TestPeer final { } } - // Adds provided |candidates| to the owned peer connection. + // Adds provided `candidates` to the owned peer connection. bool AddIceCandidates( std::vector> candidates); @@ -135,7 +135,7 @@ class TestPeer final { std::unique_ptr worker_thread); private: - // Keeps ownership of worker thread. It has to be destroyed after |wrapper_|. + // Keeps ownership of worker thread. It has to be destroyed after `wrapper_`. std::unique_ptr worker_thread_; std::unique_ptr wrapper_; std::unique_ptr params_; diff --git a/test/pc/e2e/test_peer_factory.cc b/test/pc/e2e/test_peer_factory.cc index 869b40f703..5ba9b44141 100644 --- a/test/pc/e2e/test_peer_factory.cc +++ b/test/pc/e2e/test_peer_factory.cc @@ -42,8 +42,8 @@ using EchoEmulationConfig = ::webrtc::webrtc_pc_e2e:: constexpr int16_t kGeneratedAudioMaxAmplitude = 32000; constexpr int kDefaultSamplingFrequencyInHz = 48000; -// Sets mandatory entities in injectable components like |pcf_dependencies| -// and |pc_dependencies| if they are omitted. Also setup required +// Sets mandatory entities in injectable components like `pcf_dependencies` +// and `pc_dependencies` if they are omitted. Also setup required // dependencies, that won't be specially provided by factory and will be just // transferred to peer connection creation code. void SetMandatoryEntities(InjectableComponents* components, @@ -74,7 +74,7 @@ void SetMandatoryEntities(InjectableComponents* components, // Returns mapping from stream label to optional spatial index. // If we have stream label "Foo" and mapping contains // 1. |absl::nullopt| means "Foo" isn't simulcast/SVC stream -// 2. |kAnalyzeAnySpatialStream| means all simulcast/SVC streams are required +// 2. `kAnalyzeAnySpatialStream` means all simulcast/SVC streams are required // 3. Concrete value means that particular simulcast/SVC stream have to be // analyzed. std::map> diff --git a/test/pc/e2e/test_peer_factory.h b/test/pc/e2e/test_peer_factory.h index df33406270..0e8463f188 100644 --- a/test/pc/e2e/test_peer_factory.h +++ b/test/pc/e2e/test_peer_factory.h @@ -46,13 +46,13 @@ struct RemotePeerAudioConfig { class TestPeerFactory { public: // Creates a test peer factory. - // |signaling_thread| will be used as a signaling thread for all peers created + // `signaling_thread` will be used as a signaling thread for all peers created // by this factory. - // |time_controller| will be used to create required threads, task queue + // `time_controller` will be used to create required threads, task queue // factories and call factory. - // |video_analyzer_helper| will be used to setup video quality analysis for + // `video_analyzer_helper` will be used to setup video quality analysis for // created peers. - // |task_queue| will be used for AEC dump if it is requested. + // `task_queue` will be used for AEC dump if it is requested. TestPeerFactory(rtc::Thread* signaling_thread, TimeController& time_controller, VideoQualityAnalyzerInjectionHelper* video_analyzer_helper, diff --git a/test/peer_scenario/peer_scenario.h b/test/peer_scenario/peer_scenario.h index eeade99cf4..a177eeaac6 100644 --- a/test/peer_scenario/peer_scenario.h +++ b/test/peer_scenario/peer_scenario.h @@ -78,14 +78,14 @@ class PeerScenario { std::vector send_link, std::vector ret_link); - // Starts feeding the results of comparing captured frames from |send_track| - // with decoded frames on |receiver| to |analyzer|. + // Starts feeding the results of comparing captured frames from `send_track` + // with decoded frames on `receiver` to `analyzer`. // TODO(srte): Provide a way to detach to allow removal of tracks. void AttachVideoQualityAnalyzer(VideoQualityAnalyzer* analyzer, VideoTrackInterface* send_track, PeerScenarioClient* receiver); - // Waits on |event| while processing messages on the signaling thread. + // Waits on `event` while processing messages on the signaling thread. bool WaitAndProcess(std::atomic* event, TimeDelta max_duration = TimeDelta::Seconds(5)); diff --git a/test/peer_scenario/peer_scenario_client.h b/test/peer_scenario/peer_scenario_client.h index 65ad0734db..91ce1e414a 100644 --- a/test/peer_scenario/peer_scenario_client.h +++ b/test/peer_scenario/peer_scenario_client.h @@ -83,7 +83,7 @@ class PeerScenarioClient { struct Video { bool use_fake_codecs = false; } video; - // The created endpoints can be accessed using the map key as |index| in + // The created endpoints can be accessed using the map key as `index` in // PeerScenarioClient::endpoint(index). std::map endpoints = { {0, EmulatedEndpointConfig()}}; @@ -137,7 +137,7 @@ class PeerScenarioClient { CallbackHandlers* handlers() { return &handlers_; } - // The |munge_offer| function can be used to munge the SDP, i.e. modify a + // The `munge_offer` function can be used to munge the SDP, i.e. modify a // local description afer creating it but before setting it. Note that this is // legacy behavior. It's added here only to be able to have test coverage for // scenarios even if they are not spec compliant. diff --git a/test/peer_scenario/signaling_route.h b/test/peer_scenario/signaling_route.h index 021fc4989b..a95ae5c9f7 100644 --- a/test/peer_scenario/signaling_route.h +++ b/test/peer_scenario/signaling_route.h @@ -30,12 +30,12 @@ class SignalingRoute { void StartIceSignaling(); - // The |modify_offer| callback is used to modify an offer after the local + // The `modify_offer` callback is used to modify an offer after the local // description has been set. This is legal (but odd) behavior. - // The |munge_offer| callback is used to modify an offer between its creation + // The `munge_offer` callback is used to modify an offer between its creation // and set local description. This behavior is forbidden according to the spec // but available here in order to allow test coverage on corner cases. - // The |exchange_finished| callback is called with the answer produced after + // The `exchange_finished` callback is called with the answer produced after // SDP negotations has completed. // TODO(srte): Handle lossy links. void NegotiateSdp( diff --git a/test/peer_scenario/tests/unsignaled_stream_test.cc b/test/peer_scenario/tests/unsignaled_stream_test.cc index 3fd3c7d288..5cb0405a62 100644 --- a/test/peer_scenario/tests/unsignaled_stream_test.cc +++ b/test/peer_scenario/tests/unsignaled_stream_test.cc @@ -210,7 +210,7 @@ TEST_P(UnsignaledStreamTest, ReplacesUnsignaledStreamOnCompletedSignaling) { case MidTestConfiguration::kMidNegotiatedAndPresentInPackets: EXPECT_TRUE(parsed_packet.HasExtension()); // The simulated second m= section would have a different MID. - // If we don't modify it here then |second_ssrc| would end up + // If we don't modify it here then `second_ssrc` would end up // being mapped to the first m= section which would cause SSRC // conflicts if we later add the same SSRC to a second m= // section. Hidden assumption: first m= section does not use diff --git a/test/rtp_file_reader.h b/test/rtp_file_reader.h index 1fa6f72f06..2c39340d28 100644 --- a/test/rtp_file_reader.h +++ b/test/rtp_file_reader.h @@ -22,7 +22,7 @@ struct RtpPacket { static const size_t kMaxPacketBufferSize = 3500; uint8_t data[kMaxPacketBufferSize]; size_t length; - // The length the packet had on wire. Will be different from |length| when + // The length the packet had on wire. Will be different from `length` when // reading a header-only RTP dump. size_t original_length; diff --git a/test/scenario/call_client.cc b/test/scenario/call_client.cc index d45909c053..3c306675a3 100644 --- a/test/scenario/call_client.cc +++ b/test/scenario/call_client.cc @@ -258,7 +258,7 @@ ColumnPrinter CallClient::StatsPrinter() { } Call::Stats CallClient::GetStats() { - // This call needs to be made on the thread that |call_| was constructed on. + // This call needs to be made on the thread that `call_` was constructed on. Call::Stats stats; SendTask([this, &stats] { stats = call_->GetStats(); }); return stats; diff --git a/test/scenario/scenario.h b/test/scenario/scenario.h index 1aad5b9cd1..134cf08118 100644 --- a/test/scenario/scenario.h +++ b/test/scenario/scenario.h @@ -98,7 +98,7 @@ class Scenario { AudioStreamConfig config); // Runs the provided function with a fixed interval. For real time tests, - // |function| starts being called after |interval| from the call to Every(). + // `function` starts being called after `interval` from the call to Every(). void Every(TimeDelta interval, std::function function); void Every(TimeDelta interval, std::function function); @@ -107,21 +107,21 @@ class Scenario { void Post(std::function function); // Runs the provided function after given duration has passed. For real time - // tests, |function| is called after |target_time_since_start| from the call + // tests, `function` is called after `target_time_since_start` from the call // to Every(). void At(TimeDelta offset, std::function function); - // Sends a packet over the nodes and runs |action| when it has been delivered. + // Sends a packet over the nodes and runs `action` when it has been delivered. void NetworkDelayedAction(std::vector over_nodes, size_t packet_size, std::function action); // Runs the scenario for the given time. void RunFor(TimeDelta duration); - // Runs the scenario until |target_time_since_start|. + // Runs the scenario until `target_time_since_start`. void RunUntil(TimeDelta target_time_since_start); - // Runs the scenario until |target_time_since_start| or |exit_function| - // returns true. |exit_function| is polled after each |check_interval| has + // Runs the scenario until `target_time_since_start` or `exit_function` + // returns true. `exit_function` is polled after each `check_interval` has // passed. void RunUntil(TimeDelta target_time_since_start, TimeDelta check_interval, diff --git a/test/testsupport/copy_to_file_audio_capturer_unittest.cc b/test/testsupport/copy_to_file_audio_capturer_unittest.cc index b82091aa6a..3831c28580 100644 --- a/test/testsupport/copy_to_file_audio_capturer_unittest.cc +++ b/test/testsupport/copy_to_file_audio_capturer_unittest.cc @@ -44,7 +44,7 @@ TEST_F(CopyToFileAudioCapturerTest, Capture) { // Destruct capturer to close wav file. capturer_.reset(nullptr); - // Read resulted file content with |wav_file_capture| and compare with + // Read resulted file content with `wav_file_capture` and compare with // what was captured. std::unique_ptr wav_file_capturer = TestAudioDeviceModule::CreateWavFileReader(temp_filename_, 48000); diff --git a/test/testsupport/file_utils.h b/test/testsupport/file_utils.h index cdf3a3157b..d48a85044c 100644 --- a/test/testsupport/file_utils.h +++ b/test/testsupport/file_utils.h @@ -75,7 +75,7 @@ std::string WorkingDir(); // Reads the content of a directory and, in case of success, returns a vector // of strings with one element for each found file or directory. Each element is -// a path created by prepending |dir| to the file/directory name. "." and ".." +// a path created by prepending `dir` to the file/directory name. "." and ".." // are never added in the returned vector. absl::optional> ReadDirectory(std::string path); diff --git a/test/testsupport/file_utils_unittest.cc b/test/testsupport/file_utils_unittest.cc index 7b23cbe2ee..38975e59b1 100644 --- a/test/testsupport/file_utils_unittest.cc +++ b/test/testsupport/file_utils_unittest.cc @@ -39,7 +39,7 @@ std::string Path(const std::string& path) { } // Remove files and directories in a directory non-recursively and writes the -// number of deleted items in |num_deleted_entries|. +// number of deleted items in `num_deleted_entries`. void CleanDir(const std::string& dir, size_t* num_deleted_entries) { RTC_DCHECK(num_deleted_entries); *num_deleted_entries = 0; diff --git a/test/testsupport/ivf_video_frame_generator.cc b/test/testsupport/ivf_video_frame_generator.cc index fe836763fa..e5c4c5fe55 100644 --- a/test/testsupport/ivf_video_frame_generator.cc +++ b/test/testsupport/ivf_video_frame_generator.cc @@ -59,7 +59,7 @@ IvfVideoFrameGenerator::~IvfVideoFrameGenerator() { } file_reader_->Close(); file_reader_.reset(); - // Reset decoder to prevent it from async access to |this|. + // Reset decoder to prevent it from async access to `this`. video_decoder_.reset(); { MutexLock frame_lock(&frame_decode_lock_); diff --git a/test/testsupport/ivf_video_frame_generator.h b/test/testsupport/ivf_video_frame_generator.h index 8ee9c03417..4b6d116383 100644 --- a/test/testsupport/ivf_video_frame_generator.h +++ b/test/testsupport/ivf_video_frame_generator.h @@ -73,7 +73,7 @@ class IvfVideoFrameGenerator : public FrameGeneratorInterface { // thread comparing to the one from which frames were read. Mutex lock_; // This lock is used to sync between sending and receiving frame from decoder. - // We can't reuse |lock_| because then generator can be destroyed between + // We can't reuse `lock_` because then generator can be destroyed between // frame was sent to decoder and decoder callback was invoked. Mutex frame_decode_lock_; diff --git a/test/testsupport/perf_result_reporter.h b/test/testsupport/perf_result_reporter.h index aeb1786824..83e660cd74 100644 --- a/test/testsupport/perf_result_reporter.h +++ b/test/testsupport/perf_result_reporter.h @@ -78,7 +78,7 @@ class PerfResultReporter { // Users should prefer AddResultList if possible, as otherwise the min/max // values reported on the perf dashboard aren't useful. - // |mean_and_error| should be a comma-separated string of mean then + // `mean_and_error` should be a comma-separated string of mean then // error/stddev, e.g. "2.4,0.5". void AddResultMeanAndError(absl::string_view metric_suffix, const double mean, diff --git a/test/testsupport/perf_test.h b/test/testsupport/perf_test.h index 41380241c3..c5fd34b93f 100644 --- a/test/testsupport/perf_test.h +++ b/test/testsupport/perf_test.h @@ -41,7 +41,7 @@ enum class ImproveDirection { // // (test binary name) > (bot) > ramp_up_time_turn_over_tcp > bwe_15s. // -// The |measurement| + |modifier| is what we're measuring. |user_story| is the +// The `measurement` + `modifier` is what we're measuring. `user_story` is the // scenario we're testing under. // // The binary this runs in must be hooked up as a perf test in the WebRTC @@ -68,7 +68,7 @@ void PrintResultMeanAndError( bool important, ImproveDirection improve_direction = ImproveDirection::kNone); -// Like PrintResult(), but prints an entire list of results. The |values| +// Like PrintResult(), but prints an entire list of results. The `values` // will generally be a list of comma-separated numbers. A typical // post-processing step might produce plots of their mean and standard // deviation. @@ -99,8 +99,8 @@ void PrintResult(absl::string_view measurement, std::string GetPerfResults(); // Print into stdout plottable metrics for further post processing. -// |desired_graphs| - list of metrics, that should be plotted. If empty - all -// available metrics will be plotted. If some of |desired_graphs| are missing +// `desired_graphs` - list of metrics, that should be plotted. If empty - all +// available metrics will be plotted. If some of `desired_graphs` are missing // they will be skipped. void PrintPlottableResults(const std::vector& desired_graphs); diff --git a/test/testsupport/test_artifacts.h b/test/testsupport/test_artifacts.h index 5b9bf1d033..ba0d4d39cb 100644 --- a/test/testsupport/test_artifacts.h +++ b/test/testsupport/test_artifacts.h @@ -20,13 +20,13 @@ namespace webrtc { namespace test { // If the test_artifacts_dir flag is set, returns true and copies the location -// of the dir to |out_dir|. Otherwise, return false. +// of the dir to `out_dir`. Otherwise, return false. bool GetTestArtifactsDir(std::string* out_dir); -// Writes a |length| bytes array |buffer| to |filename| in isolated output +// Writes a `length` bytes array `buffer` to `filename` in isolated output // directory defined by swarming. If the file is existing, content will be // appended. Otherwise a new file will be created. This function returns false -// if isolated output directory has not been defined, or |filename| indicates an +// if isolated output directory has not been defined, or `filename` indicates an // invalid or non-writable file, or underlying file system errors. bool WriteToTestArtifactsDir(const char* filename, const uint8_t* buffer, diff --git a/test/time_controller/external_time_controller.h b/test/time_controller/external_time_controller.h index dfd77128df..80528e1403 100644 --- a/test/time_controller/external_time_controller.h +++ b/test/time_controller/external_time_controller.h @@ -53,7 +53,7 @@ class ExternalTimeController : public TimeController, public TaskQueueFactory { class TaskQueueWrapper; // Executes any tasks scheduled at or before the current time. May call - // |ScheduleNext| to schedule the next call to |Run|. + // `ScheduleNext` to schedule the next call to `Run`. void Run(); void UpdateTime(); diff --git a/test/time_controller/simulated_time_controller.cc b/test/time_controller/simulated_time_controller.cc index a34abe8ced..b92444b704 100644 --- a/test/time_controller/simulated_time_controller.cc +++ b/test/time_controller/simulated_time_controller.cc @@ -98,7 +98,7 @@ void SimulatedTimeControllerImpl::RunReadyRunners() { MutexLock lock(&lock_); RTC_DCHECK_EQ(rtc::CurrentThreadId(), thread_id_); Timestamp current_time = CurrentTime(); - // Clearing |ready_runners_| in case this is a recursive call: + // Clearing `ready_runners_` in case this is a recursive call: // RunReadyRunners -> Run -> Event::Wait -> Yield ->RunReadyRunners ready_runners_.clear(); @@ -118,8 +118,8 @@ void SimulatedTimeControllerImpl::RunReadyRunners() { ready_runners_.pop_front(); lock_.Unlock(); // Note that the RunReady function might indirectly cause a call to - // Unregister() which will grab |lock_| again to remove items from - // |ready_runners_|. + // Unregister() which will grab `lock_` again to remove items from + // `ready_runners_`. runner->RunReady(current_time); lock_.Lock(); } @@ -221,8 +221,8 @@ void GlobalSimulatedTimeController::AdvanceTime(TimeDelta duration) { sim_clock_.AdvanceTimeMicroseconds(delta.us()); global_clock_.AdvanceTime(delta); } - // After time has been simulated up until |target_time| we also need to run - // tasks meant to be executed at |target_time|. + // After time has been simulated up until `target_time` we also need to run + // tasks meant to be executed at `target_time`. impl_.RunReadyRunners(); } diff --git a/test/time_controller/simulated_time_controller.h b/test/time_controller/simulated_time_controller.h index 9ded4689de..595c18d160 100644 --- a/test/time_controller/simulated_time_controller.h +++ b/test/time_controller/simulated_time_controller.h @@ -58,32 +58,32 @@ class SimulatedTimeControllerImpl : public TaskQueueFactory, // except that if this method is called from a task, the task queue running // that task is skipped. void YieldExecution() RTC_LOCKS_EXCLUDED(time_lock_, lock_) override; - // Create process thread with the name |thread_name|. + // Create process thread with the name `thread_name`. std::unique_ptr CreateProcessThread(const char* thread_name) RTC_LOCKS_EXCLUDED(time_lock_, lock_); - // Create thread using provided |socket_server|. + // Create thread using provided `socket_server`. std::unique_ptr CreateThread( const std::string& name, std::unique_ptr socket_server) RTC_LOCKS_EXCLUDED(time_lock_, lock_); - // Runs all runners in |runners_| that has tasks or modules ready for + // Runs all runners in `runners_` that has tasks or modules ready for // execution. void RunReadyRunners() RTC_LOCKS_EXCLUDED(time_lock_, lock_); - // Return |current_time_|. + // Return `current_time_`. Timestamp CurrentTime() const RTC_LOCKS_EXCLUDED(time_lock_); - // Return min of runner->GetNextRunTime() for runner in |runners_|. + // Return min of runner->GetNextRunTime() for runner in `runners_`. Timestamp NextRunTime() const RTC_LOCKS_EXCLUDED(lock_); - // Set |current_time_| to |target_time|. + // Set `current_time_` to `target_time`. void AdvanceTime(Timestamp target_time) RTC_LOCKS_EXCLUDED(time_lock_); - // Adds |runner| to |runners_|. + // Adds `runner` to `runners_`. void Register(SimulatedSequenceRunner* runner) RTC_LOCKS_EXCLUDED(lock_); - // Removes |runner| from |runners_|. + // Removes `runner` from `runners_`. void Unregister(SimulatedSequenceRunner* runner) RTC_LOCKS_EXCLUDED(lock_); - // Indicates that |yielding_from| is not ready to run. + // Indicates that `yielding_from` is not ready to run. void StartYield(TaskQueueBase* yielding_from); - // Indicates that processing can be continued on |yielding_from|. + // Indicates that processing can be continued on `yielding_from`. void StopYield(TaskQueueBase* yielding_from); private: diff --git a/test/video_codec_settings.h b/test/video_codec_settings.h index 82c82cd7e1..5ef4ed3e4a 100644 --- a/test/video_codec_settings.h +++ b/test/video_codec_settings.h @@ -55,7 +55,7 @@ static void CodecSettings(VideoCodecType codec_type, VideoCodec* settings) { *(settings->VP9()) = VideoEncoder::GetDefaultVp9Settings(); return; case kVideoCodecH264: - // TODO(brandtr): Set |qpMax| here, when the OpenH264 wrapper supports it. + // TODO(brandtr): Set `qpMax` here, when the OpenH264 wrapper supports it. *(settings->H264()) = VideoEncoder::GetDefaultH264Settings(); return; default: