Format almost everything.
This CL was generated by running
git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format
Most of these changes are clang-format grouping and reordering includes
differently.
Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
diff --git a/api/array_view_unittest.cc b/api/array_view_unittest.cc
index 18d0e6c..6fdd516 100644
--- a/api/array_view_unittest.cc
+++ b/api/array_view_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/array_view.h"
+
#include <algorithm>
#include <array>
#include <string>
#include <utility>
#include <vector>
-#include "api/array_view.h"
#include "rtc_base/buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/gunit.h"
diff --git a/api/audio/echo_canceller3_config_json.cc b/api/audio/echo_canceller3_config_json.cc
index 8c698fa..b7b385d 100644
--- a/api/audio/echo_canceller3_config_json.cc
+++ b/api/audio/echo_canceller3_config_json.cc
@@ -10,6 +10,7 @@
#include "api/audio/echo_canceller3_config_json.h"
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/api/audio/test/audio_frame_unittest.cc b/api/audio/test/audio_frame_unittest.cc
index 3e62a57..dbf45ce 100644
--- a/api/audio/test/audio_frame_unittest.cc
+++ b/api/audio/test/audio_frame_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/audio/audio_frame.h"
+
#include <stdint.h>
#include <string.h> // memcmp
-#include "api/audio/audio_frame.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/api/audio/test/echo_canceller3_config_json_unittest.cc b/api/audio/test/echo_canceller3_config_json_unittest.cc
index 7c3a445..5e98426 100644
--- a/api/audio/test/echo_canceller3_config_json_unittest.cc
+++ b/api/audio/test/echo_canceller3_config_json_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/audio/echo_canceller3_config_json.h"
+
#include "api/audio/echo_canceller3_config.h"
#include "test/gtest.h"
diff --git a/api/audio/test/echo_canceller3_config_unittest.cc b/api/audio/test/echo_canceller3_config_unittest.cc
index b717192..91312a0 100644
--- a/api/audio/test/echo_canceller3_config_unittest.cc
+++ b/api/audio/test/echo_canceller3_config_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/audio/echo_canceller3_config.h"
+
#include "api/audio/echo_canceller3_config_json.h"
#include "test/gtest.h"
diff --git a/api/audio_codecs/audio_decoder.cc b/api/audio_codecs/audio_decoder.cc
index 5a9ba56..7bf3036 100644
--- a/api/audio_codecs/audio_decoder.cc
+++ b/api/audio_codecs/audio_decoder.cc
@@ -11,6 +11,7 @@
#include "api/audio_codecs/audio_decoder.h"
#include <assert.h>
+
#include <memory>
#include <utility>
diff --git a/api/audio_codecs/audio_decoder.h b/api/audio_codecs/audio_decoder.h
index e4e5e1e..a3b6a31 100644
--- a/api/audio_codecs/audio_decoder.h
+++ b/api/audio_codecs/audio_decoder.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/api/audio_codecs/audio_format.h b/api/audio_codecs/audio_format.h
index 053c067..9f61729 100644
--- a/api/audio_codecs/audio_format.h
+++ b/api/audio_codecs/audio_format.h
@@ -12,6 +12,7 @@
#define API_AUDIO_CODECS_AUDIO_FORMAT_H_
#include <stddef.h>
+
#include <map>
#include <string>
diff --git a/api/audio_codecs/g711/audio_encoder_g711.cc b/api/audio_codecs/g711/audio_encoder_g711.cc
index 0cc8dc4..f40cd6e 100644
--- a/api/audio_codecs/g711/audio_encoder_g711.cc
+++ b/api/audio_codecs/g711/audio_encoder_g711.cc
@@ -79,7 +79,9 @@
impl_config.payload_type = payload_type;
return absl::make_unique<AudioEncoderPcmA>(impl_config);
}
- default: { return nullptr; }
+ default: {
+ return nullptr;
+ }
}
}
diff --git a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
index 99a9e29..fc7cc7f 100644
--- a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
+++ b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/audio_codecs/audio_decoder_factory_template.h"
+
#include "absl/memory/memory.h"
#include "api/audio_codecs/L16/audio_decoder_L16.h"
#include "api/audio_codecs/g711/audio_decoder_g711.h"
diff --git a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
index 4188c8c..b1a5a51 100644
--- a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
+++ b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/audio_codecs/audio_encoder_factory_template.h"
+
#include "absl/memory/memory.h"
#include "api/audio_codecs/L16/audio_encoder_L16.h"
#include "api/audio_codecs/g711/audio_encoder_g711.h"
diff --git a/api/audio_options.h b/api/audio_options.h
index 478bff6..acc19f0 100644
--- a/api/audio_options.h
+++ b/api/audio_options.h
@@ -12,6 +12,7 @@
#define API_AUDIO_OPTIONS_H_
#include <stdint.h>
+
#include <string>
#include "absl/types/optional.h"
diff --git a/api/call/transport.h b/api/call/transport.h
index 32e5ddf..2a2a87a 100644
--- a/api/call/transport.h
+++ b/api/call/transport.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
namespace webrtc {
diff --git a/api/crypto/crypto_options.cc b/api/crypto/crypto_options.cc
index 9a3de2c..7892b2e 100644
--- a/api/crypto/crypto_options.cc
+++ b/api/crypto/crypto_options.cc
@@ -9,6 +9,7 @@
*/
#include "api/crypto/crypto_options.h"
+
#include "rtc_base/ssl_stream_adapter.h"
namespace webrtc {
diff --git a/api/data_channel_interface.h b/api/data_channel_interface.h
index f7032ec..fc47dbb 100644
--- a/api/data_channel_interface.h
+++ b/api/data_channel_interface.h
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "absl/types/optional.h"
diff --git a/api/function_view_unittest.cc b/api/function_view_unittest.cc
index 3abf0e3..156ea5c 100644
--- a/api/function_view_unittest.cc
+++ b/api/function_view_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/function_view.h"
+
#include <memory>
#include <utility>
-#include "api/function_view.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/api/jsep_ice_candidate.h b/api/jsep_ice_candidate.h
index 890c486..651aa7c 100644
--- a/api/jsep_ice_candidate.h
+++ b/api/jsep_ice_candidate.h
@@ -15,6 +15,7 @@
#define API_JSEP_ICE_CANDIDATE_H_
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/api/media_transport_interface.cc b/api/media_transport_interface.cc
index f46c8ec..69f993e 100644
--- a/api/media_transport_interface.cc
+++ b/api/media_transport_interface.cc
@@ -15,11 +15,12 @@
// enable different media transport implementations, including QUIC-based
// media transport.
+#include "api/media_transport_interface.h"
+
#include <cstdint>
#include <utility>
#include "api/datagram_transport_interface.h"
-#include "api/media_transport_interface.h"
namespace webrtc {
@@ -30,7 +31,6 @@
const MediaTransportSettings&) = default;
MediaTransportSettings::~MediaTransportSettings() = default;
-
SendDataParams::SendDataParams() = default;
SendDataParams::SendDataParams(const SendDataParams&) = default;
diff --git a/api/peer_connection_interface.cc b/api/peer_connection_interface.cc
index 588a021..6512457 100644
--- a/api/peer_connection_interface.cc
+++ b/api/peer_connection_interface.cc
@@ -9,6 +9,7 @@
*/
#include "api/peer_connection_interface.h"
+
#include "api/dtls_transport_interface.h"
#include "api/sctp_transport_interface.h"
diff --git a/api/rtc_error_unittest.cc b/api/rtc_error_unittest.cc
index e9beb00..ba307d8 100644
--- a/api/rtc_error_unittest.cc
+++ b/api/rtc_error_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/rtc_error.h"
+
#include <utility>
-#include "api/rtc_error.h"
#include "test/gtest.h"
namespace {
diff --git a/api/rtc_event_log_output_file.cc b/api/rtc_event_log_output_file.cc
index 404eb31..2e31c2d 100644
--- a/api/rtc_event_log_output_file.cc
+++ b/api/rtc_event_log_output_file.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/rtc_event_log_output_file.h"
+
#include <limits>
#include <utility>
#include "api/rtc_event_log/rtc_event_log.h"
-#include "api/rtc_event_log_output_file.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/api/rtc_event_log_output_file.h b/api/rtc_event_log_output_file.h
index e1d18e08..d2901be 100644
--- a/api/rtc_event_log_output_file.h
+++ b/api/rtc_event_log_output_file.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdio.h>
+
#include <string>
#include "api/rtc_event_log_output.h"
diff --git a/api/rtp_headers.h b/api/rtp_headers.h
index 9a2d840..e5155f0 100644
--- a/api/rtp_headers.h
+++ b/api/rtp_headers.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "absl/types/optional.h"
diff --git a/api/rtp_packet_info_unittest.cc b/api/rtp_packet_info_unittest.cc
index ee8766a..66cc2ed 100644
--- a/api/rtp_packet_info_unittest.cc
+++ b/api/rtp_packet_info_unittest.cc
@@ -9,7 +9,6 @@
*/
#include "api/rtp_packet_infos.h"
-
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/api/rtp_parameters.h b/api/rtp_parameters.h
index 29b8d7a..fe2ec80 100644
--- a/api/rtp_parameters.h
+++ b/api/rtp_parameters.h
@@ -12,6 +12,7 @@
#define API_RTP_PARAMETERS_H_
#include <stdint.h>
+
#include <string>
#include <unordered_map>
#include <vector>
diff --git a/api/rtp_parameters_unittest.cc b/api/rtp_parameters_unittest.cc
index b6f2482..5928cbd 100644
--- a/api/rtp_parameters_unittest.cc
+++ b/api/rtp_parameters_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/rtp_parameters.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/api/sctp_transport_interface.cc b/api/sctp_transport_interface.cc
index c6c1fbe..8a0a866 100644
--- a/api/sctp_transport_interface.cc
+++ b/api/sctp_transport_interface.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <utility>
-
#include "api/sctp_transport_interface.h"
+#include <utility>
+
namespace webrtc {
SctpTransportInformation::SctpTransportInformation(SctpTransportState state)
diff --git a/api/stats/rtc_stats.h b/api/stats/rtc_stats.h
index 4361163..0cfbc06 100644
--- a/api/stats/rtc_stats.h
+++ b/api/stats/rtc_stats.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h
index 85da197..6b013bf 100644
--- a/api/stats/rtc_stats_report.h
+++ b/api/stats/rtc_stats_report.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <memory>
#include <string>
diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h
index ebd79f4..8955c4e 100644
--- a/api/stats/rtcstats_objects.h
+++ b/api/stats/rtcstats_objects.h
@@ -12,6 +12,7 @@
#define API_STATS_RTCSTATS_OBJECTS_H_
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
@@ -376,7 +377,7 @@
RTCStatsMember<std::string> associate_stats_id;
// TODO(hbos): Remote case not supported by |RTCStatsCollector|.
// crbug.com/657855, 657856
- RTCStatsMember<bool> is_remote; // = false
+ RTCStatsMember<bool> is_remote; // = false
RTCStatsMember<std::string> media_type; // renamed to kind.
RTCStatsMember<std::string> kind;
RTCStatsMember<std::string> track_id;
diff --git a/api/test/create_video_quality_test_fixture.cc b/api/test/create_video_quality_test_fixture.cc
index f317ed7..ee63435 100644
--- a/api/test/create_video_quality_test_fixture.cc
+++ b/api/test/create_video_quality_test_fixture.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/test/create_video_quality_test_fixture.h"
+
#include <memory>
#include <utility>
#include "absl/memory/memory.h"
-#include "api/test/create_video_quality_test_fixture.h"
#include "video/video_quality_test.h"
namespace webrtc {
@@ -23,8 +24,7 @@
return absl::make_unique<VideoQualityTest>(nullptr);
}
-std::unique_ptr<VideoQualityTestFixtureInterface>
-CreateVideoQualityTestFixture(
+std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) {
auto components = absl::make_unique<
VideoQualityTestFixtureInterface::InjectionComponents>();
@@ -39,5 +39,3 @@
}
} // namespace webrtc
-
-
diff --git a/api/test/create_video_quality_test_fixture.h b/api/test/create_video_quality_test_fixture.h
index 1358199..ed618fe 100644
--- a/api/test/create_video_quality_test_fixture.h
+++ b/api/test/create_video_quality_test_fixture.h
@@ -20,8 +20,7 @@
std::unique_ptr<VideoQualityTestFixtureInterface>
CreateVideoQualityTestFixture();
-std::unique_ptr<VideoQualityTestFixtureInterface>
-CreateVideoQualityTestFixture(
+std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory);
std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
diff --git a/api/test/fake_frame_decryptor.cc b/api/test/fake_frame_decryptor.cc
index 4af42a6..16cb1bd 100644
--- a/api/test/fake_frame_decryptor.cc
+++ b/api/test/fake_frame_decryptor.cc
@@ -9,7 +9,9 @@
*/
#include "api/test/fake_frame_decryptor.h"
+
#include <vector>
+
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/api/test/fake_frame_decryptor.h b/api/test/fake_frame_decryptor.h
index 05813db..bfd0e69 100644
--- a/api/test/fake_frame_decryptor.h
+++ b/api/test/fake_frame_decryptor.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/api/test/fake_frame_encryptor.cc b/api/test/fake_frame_encryptor.cc
index edf3cc2..89d14aa 100644
--- a/api/test/fake_frame_encryptor.cc
+++ b/api/test/fake_frame_encryptor.cc
@@ -9,6 +9,7 @@
*/
#include "api/test/fake_frame_encryptor.h"
+
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/api/test/loopback_media_transport_unittest.cc b/api/test/loopback_media_transport_unittest.cc
index afd544f..d1351c5 100644
--- a/api/test/loopback_media_transport_unittest.cc
+++ b/api/test/loopback_media_transport_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/test/loopback_media_transport.h"
+
#include <algorithm>
#include <memory>
#include <vector>
-#include "api/test/loopback_media_transport.h"
#include "test/gmock.h"
namespace webrtc {
diff --git a/api/test/mock_audio_mixer.h b/api/test/mock_audio_mixer.h
index 7a6c742..bb303e2 100644
--- a/api/test/mock_audio_mixer.h
+++ b/api/test/mock_audio_mixer.h
@@ -12,7 +12,6 @@
#define API_TEST_MOCK_AUDIO_MIXER_H_
#include "api/audio/audio_mixer.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/api/test/mock_frame_encryptor.cc b/api/test/mock_frame_encryptor.cc
index 0972259..6c05efd 100644
--- a/api/test/mock_frame_encryptor.cc
+++ b/api/test/mock_frame_encryptor.cc
@@ -9,6 +9,7 @@
*/
#include "api/test/mock_frame_encryptor.h"
+
#include "test/gmock.h"
namespace webrtc {
diff --git a/api/test/neteq_simulator.h b/api/test/neteq_simulator.h
index 8ef6731..a826ca5 100644
--- a/api/test/neteq_simulator.h
+++ b/api/test/neteq_simulator.h
@@ -12,6 +12,7 @@
#define API_TEST_NETEQ_SIMULATOR_H_
#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/api/test/simulated_network.h b/api/test/simulated_network.h
index c5273c3..9b20c9c 100644
--- a/api/test/simulated_network.h
+++ b/api/test/simulated_network.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <deque>
#include <queue>
#include <vector>
diff --git a/api/test/test_dependency_factory.cc b/api/test/test_dependency_factory.cc
index d343bee..4294b1b 100644
--- a/api/test/test_dependency_factory.cc
+++ b/api/test/test_dependency_factory.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/test/test_dependency_factory.h"
+
#include <memory>
#include <utility>
#include "absl/memory/memory.h"
-#include "api/test/test_dependency_factory.h"
#include "rtc_base/checks.h"
#include "rtc_base/thread_checker.h"
diff --git a/api/test/videocodec_test_stats.h b/api/test/videocodec_test_stats.h
index 620f764..5249c7a 100644
--- a/api/test/videocodec_test_stats.h
+++ b/api/test/videocodec_test_stats.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/api/transport/field_trial_based_config.cc b/api/transport/field_trial_based_config.cc
index 7e6764f..4a3a179 100644
--- a/api/transport/field_trial_based_config.cc
+++ b/api/transport/field_trial_based_config.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "api/transport/field_trial_based_config.h"
+
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
diff --git a/api/transport/field_trial_based_config.h b/api/transport/field_trial_based_config.h
index e0989db..0754570 100644
--- a/api/transport/field_trial_based_config.h
+++ b/api/transport/field_trial_based_config.h
@@ -11,6 +11,7 @@
#define API_TRANSPORT_FIELD_TRIAL_BASED_CONFIG_H_
#include <string>
+
#include "absl/strings/string_view.h"
#include "api/transport/webrtc_key_value_config.h"
diff --git a/api/transport/media/audio_transport.cc b/api/transport/media/audio_transport.cc
index 7285ad4..0f5fe8b 100644
--- a/api/transport/media/audio_transport.cc
+++ b/api/transport/media/audio_transport.cc
@@ -15,10 +15,10 @@
// enable different media transport implementations, including QUIC-based
// media transport.
-#include <utility>
-
#include "api/transport/media/audio_transport.h"
+#include <utility>
+
namespace webrtc {
MediaTransportEncodedAudioFrame::~MediaTransportEncodedAudioFrame() {}
diff --git a/api/transport/media/video_transport.cc b/api/transport/media/video_transport.cc
index 1831991..a6f5304 100644
--- a/api/transport/media/video_transport.cc
+++ b/api/transport/media/video_transport.cc
@@ -15,10 +15,10 @@
// enable different media transport implementations, including QUIC-based
// media transport.
-#include <utility>
-
#include "api/transport/media/video_transport.h"
+#include <utility>
+
namespace webrtc {
MediaTransportEncodedVideoFrame::MediaTransportEncodedVideoFrame() = default;
diff --git a/api/transport/network_control.h b/api/transport/network_control.h
index 11cda46..8efb1fc 100644
--- a/api/transport/network_control.h
+++ b/api/transport/network_control.h
@@ -11,6 +11,7 @@
#ifndef API_TRANSPORT_NETWORK_CONTROL_H_
#define API_TRANSPORT_NETWORK_CONTROL_H_
#include <stdint.h>
+
#include <memory>
#include "api/transport/network_types.h"
diff --git a/api/transport/network_types.h b/api/transport/network_types.h
index df046db..45b651e 100644
--- a/api/transport/network_types.h
+++ b/api/transport/network_types.h
@@ -11,6 +11,7 @@
#ifndef API_TRANSPORT_NETWORK_TYPES_H_
#define API_TRANSPORT_NETWORK_TYPES_H_
#include <stdint.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/api/transport/test/create_feedback_generator.cc b/api/transport/test/create_feedback_generator.cc
index 9eb54ea..01e0fae 100644
--- a/api/transport/test/create_feedback_generator.cc
+++ b/api/transport/test/create_feedback_generator.cc
@@ -10,7 +10,6 @@
#include "api/transport/test/create_feedback_generator.h"
#include "absl/memory/memory.h"
-
#include "test/network/feedback_generator.h"
namespace webrtc {
diff --git a/api/transport/webrtc_key_value_config.h b/api/transport/webrtc_key_value_config.h
index c6376a9..0522629 100644
--- a/api/transport/webrtc_key_value_config.h
+++ b/api/transport/webrtc_key_value_config.h
@@ -11,6 +11,7 @@
#define API_TRANSPORT_WEBRTC_KEY_VALUE_CONFIG_H_
#include <string>
+
#include "absl/strings/string_view.h"
namespace webrtc {
diff --git a/api/units/data_rate_unittest.cc b/api/units/data_rate_unittest.cc
index a56ccb2..d887107 100644
--- a/api/units/data_rate_unittest.cc
+++ b/api/units/data_rate_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "api/units/data_rate.h"
+
#include "rtc_base/logging.h"
#include "test/gtest.h"
diff --git a/api/units/frequency.cc b/api/units/frequency.cc
index f7e38ca..2d938a2 100644
--- a/api/units/frequency.cc
+++ b/api/units/frequency.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "api/units/frequency.h"
+
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
diff --git a/api/video/encoded_frame.h b/api/video/encoded_frame.h
index 1b2e531..f0a67a1 100644
--- a/api/video/encoded_frame.h
+++ b/api/video/encoded_frame.h
@@ -11,11 +11,11 @@
#ifndef API_VIDEO_ENCODED_FRAME_H_
#define API_VIDEO_ENCODED_FRAME_H_
-#include "modules/video_coding/encoded_frame.h"
-
#include <stddef.h>
#include <stdint.h>
+#include "modules/video_coding/encoded_frame.h"
+
namespace webrtc {
namespace video_coding {
diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h
index 754b58b..9aa5046 100644
--- a/api/video/encoded_image.h
+++ b/api/video/encoded_image.h
@@ -12,6 +12,7 @@
#define API_VIDEO_ENCODED_IMAGE_H_
#include <stdint.h>
+
#include <map>
#include <utility>
@@ -95,9 +96,7 @@
void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms);
- absl::optional<int> SpatialIndex() const {
- return spatial_index_;
- }
+ absl::optional<int> SpatialIndex() const { return spatial_index_; }
void SetSpatialIndex(absl::optional<int> spatial_index) {
RTC_DCHECK_GE(spatial_index.value_or(0), 0);
RTC_DCHECK_LT(spatial_index.value_or(0), kMaxSpatialLayers);
@@ -208,7 +207,7 @@
// TODO(bugs.webrtc.org/9378): We're transitioning to always owning the
// encoded data.
rtc::scoped_refptr<EncodedImageBufferInterface> encoded_data_;
- size_t size_; // Size of encoded frame data.
+ size_t size_; // Size of encoded frame data.
// Non-null when used with an un-owned buffer.
uint8_t* buffer_;
// Allocated size of _buffer; relevant only if it's non-null.
diff --git a/api/video/i010_buffer.h b/api/video/i010_buffer.h
index 4b35ca3..6299927 100644
--- a/api/video/i010_buffer.h
+++ b/api/video/i010_buffer.h
@@ -12,6 +12,7 @@
#define API_VIDEO_I010_BUFFER_H_
#include <stdint.h>
+
#include <memory>
#include "api/scoped_refptr.h"
diff --git a/api/video/i420_buffer.cc b/api/video/i420_buffer.cc
index 46de581..62fa183 100644
--- a/api/video/i420_buffer.cc
+++ b/api/video/i420_buffer.cc
@@ -10,6 +10,7 @@
#include "api/video/i420_buffer.h"
#include <string.h>
+
#include <algorithm>
#include <utility>
diff --git a/api/video/i420_buffer.h b/api/video/i420_buffer.h
index b76a507..251eb93 100644
--- a/api/video/i420_buffer.h
+++ b/api/video/i420_buffer.h
@@ -12,6 +12,7 @@
#define API_VIDEO_I420_BUFFER_H_
#include <stdint.h>
+
#include <memory>
#include "api/scoped_refptr.h"
diff --git a/api/video/test/color_space_unittest.cc b/api/video/test/color_space_unittest.cc
index e1318ce..1d8b3a8 100644
--- a/api/video/test/color_space_unittest.cc
+++ b/api/video/test/color_space_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/video/color_space.h"
+
#include <stdint.h>
-#include "api/video/color_space.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/api/video/test/video_bitrate_allocation_unittest.cc b/api/video/test/video_bitrate_allocation_unittest.cc
index d96ce1c..8e66d4b 100644
--- a/api/video/test/video_bitrate_allocation_unittest.cc
+++ b/api/video/test/video_bitrate_allocation_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/video/video_bitrate_allocation.h"
+
#include <vector>
#include "absl/types/optional.h"
-#include "api/video/video_bitrate_allocation.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/api/video/video_bitrate_allocation.h b/api/video/video_bitrate_allocation.h
index d335a55..da58a5b 100644
--- a/api/video/video_bitrate_allocation.h
+++ b/api/video/video_bitrate_allocation.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <limits>
#include <string>
#include <vector>
diff --git a/api/video/video_bitrate_allocator_factory.h b/api/video/video_bitrate_allocator_factory.h
index 897c34f..cb34ebb 100644
--- a/api/video/video_bitrate_allocator_factory.h
+++ b/api/video/video_bitrate_allocator_factory.h
@@ -12,6 +12,7 @@
#define API_VIDEO_VIDEO_BITRATE_ALLOCATOR_FACTORY_H_
#include <memory>
+
#include "api/video/video_bitrate_allocator.h"
#include "api/video_codecs/video_codec.h"
diff --git a/api/video/video_frame.h b/api/video/video_frame.h
index e86e5a2..127e62f 100644
--- a/api/video/video_frame.h
+++ b/api/video/video_frame.h
@@ -12,6 +12,7 @@
#define API_VIDEO_VIDEO_FRAME_H_
#include <stdint.h>
+
#include <utility>
#include "absl/types/optional.h"
diff --git a/api/video/video_stream_encoder_create.h b/api/video/video_stream_encoder_create.h
index 2d8f29a..3946b95 100644
--- a/api/video/video_stream_encoder_create.h
+++ b/api/video/video_stream_encoder_create.h
@@ -12,6 +12,7 @@
#define API_VIDEO_VIDEO_STREAM_ENCODER_CREATE_H_
#include <stdint.h>
+
#include <memory>
#include "api/task_queue/task_queue_factory.h"
diff --git a/api/video_codecs/sdp_video_format.cc b/api/video_codecs/sdp_video_format.cc
index 167d26a..f890149 100644
--- a/api/video_codecs/sdp_video_format.cc
+++ b/api/video_codecs/sdp_video_format.cc
@@ -9,6 +9,7 @@
*/
#include "api/video_codecs/sdp_video_format.h"
+
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
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 4c2599c..32205fa 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
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/video_codecs/video_encoder_software_fallback_wrapper.h"
+
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
@@ -27,7 +30,6 @@
#include "api/video/video_rotation.h"
#include "api/video_codecs/video_codec.h"
#include "api/video_codecs/video_encoder.h"
-#include "api/video_codecs/video_encoder_software_fallback_wrapper.h"
#include "modules/include/module_common_types.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
#include "modules/video_coding/include/video_codec_interface.h"
diff --git a/api/video_codecs/video_codec.cc b/api/video_codecs/video_codec.cc
index 3566aef..b841575 100644
--- a/api/video_codecs/video_codec.cc
+++ b/api/video_codecs/video_codec.cc
@@ -11,6 +11,7 @@
#include "api/video_codecs/video_codec.h"
#include <string.h>
+
#include <string>
#include "absl/strings/match.h"
diff --git a/api/video_codecs/video_codec.h b/api/video_codecs/video_codec.h
index d014e7c..a248d19 100644
--- a/api/video_codecs/video_codec.h
+++ b/api/video_codecs/video_codec.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "api/video/video_bitrate_allocation.h"
@@ -107,9 +108,9 @@
uint16_t width;
uint16_t height;
- unsigned int startBitrate; // kilobits/sec.
- unsigned int maxBitrate; // kilobits/sec.
- unsigned int minBitrate; // kilobits/sec.
+ unsigned int startBitrate; // kilobits/sec.
+ unsigned int maxBitrate; // kilobits/sec.
+ unsigned int minBitrate; // kilobits/sec.
uint32_t maxFramerate;
diff --git a/api/video_codecs/video_decoder_software_fallback_wrapper.cc b/api/video_codecs/video_decoder_software_fallback_wrapper.cc
index 9bf1dfd..329fdfb 100644
--- a/api/video_codecs/video_decoder_software_fallback_wrapper.cc
+++ b/api/video_codecs/video_decoder_software_fallback_wrapper.cc
@@ -11,6 +11,7 @@
#include "api/video_codecs/video_decoder_software_fallback_wrapper.h"
#include <stdint.h>
+
#include <string>
#include <utility>
diff --git a/api/video_codecs/video_encoder_config.h b/api/video_codecs/video_encoder_config.h
index 0c69b93..399b3cc 100644
--- a/api/video_codecs/video_encoder_config.h
+++ b/api/video_codecs/video_encoder_config.h
@@ -12,6 +12,7 @@
#define API_VIDEO_CODECS_VIDEO_ENCODER_CONFIG_H_
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/api/video_codecs/video_encoder_software_fallback_wrapper.cc
index 1a683eb..4d7e6f0 100644
--- a/api/video_codecs/video_encoder_software_fallback_wrapper.cc
+++ b/api/video_codecs/video_encoder_software_fallback_wrapper.cc
@@ -11,6 +11,7 @@
#include "api/video_codecs/video_encoder_software_fallback_wrapper.h"
#include <stdint.h>
+
#include <cstdio>
#include <string>
#include <utility>
diff --git a/audio/audio_level.cc b/audio/audio_level.cc
index d26e949..06702b4 100644
--- a/audio/audio_level.cc
+++ b/audio/audio_level.cc
@@ -17,8 +17,7 @@
namespace voe {
AudioLevel::AudioLevel()
- : abs_max_(0), count_(0), current_level_full_range_(0) {
-}
+ : abs_max_(0), count_(0), current_level_full_range_(0) {}
AudioLevel::~AudioLevel() {}
diff --git a/audio/audio_receive_stream_unittest.cc b/audio/audio_receive_stream_unittest.cc
index 7a6b31e..762dba7 100644
--- a/audio/audio_receive_stream_unittest.cc
+++ b/audio/audio_receive_stream_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/audio_receive_stream.h"
+
#include <map>
#include <string>
#include <utility>
@@ -15,7 +17,6 @@
#include "api/test/mock_audio_mixer.h"
#include "api/test/mock_frame_decryptor.h"
-#include "audio/audio_receive_stream.h"
#include "audio/conversion.h"
#include "audio/mock_voe_channel_proxy.h"
#include "call/rtp_stream_receiver_controller.h"
diff --git a/audio/audio_send_stream_unittest.cc b/audio/audio_send_stream_unittest.cc
index 022516a..dcd3667 100644
--- a/audio/audio_send_stream_unittest.cc
+++ b/audio/audio_send_stream_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/audio_send_stream.h"
+
#include <string>
#include <utility>
#include <vector>
@@ -15,7 +17,6 @@
#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/mock_frame_encryptor.h"
-#include "audio/audio_send_stream.h"
#include "audio/audio_state.h"
#include "audio/conversion.h"
#include "audio/mock_voe_channel_proxy.h"
diff --git a/audio/audio_state_unittest.cc b/audio/audio_state_unittest.cc
index 61db5d9..bf79529 100644
--- a/audio/audio_state_unittest.cc
+++ b/audio/audio_state_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/audio_state.h"
+
#include <memory>
#include <vector>
-#include "audio/audio_state.h"
#include "call/test/mock_audio_send_stream.h"
#include "modules/audio_device/include/mock_audio_device.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 971a40a..f248c99 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -549,8 +549,8 @@
_outputAudioLevel.ResetLevelFullRange();
}
-absl::optional<std::pair<int, SdpAudioFormat>>
- ChannelReceive::GetReceiveCodec() const {
+absl::optional<std::pair<int, SdpAudioFormat>> ChannelReceive::GetReceiveCodec()
+ const {
RTC_DCHECK(worker_thread_checker_.IsCurrent());
return audio_coding_->ReceiveCodec();
}
diff --git a/audio/channel_receive.h b/audio/channel_receive.h
index 1b0c81c..1e16304 100644
--- a/audio/channel_receive.h
+++ b/audio/channel_receive.h
@@ -85,8 +85,8 @@
virtual void StopPlayout() = 0;
// Payload type and format of last received RTP packet, if any.
- virtual absl::optional<std::pair<int, SdpAudioFormat>>
- GetReceiveCodec() const = 0;
+ virtual absl::optional<std::pair<int, SdpAudioFormat>> GetReceiveCodec()
+ const = 0;
virtual void ReceivedRTCPPacket(const uint8_t* data, size_t length) = 0;
diff --git a/audio/remix_resample_unittest.cc b/audio/remix_resample_unittest.cc
index 25af6e7..55f811b 100644
--- a/audio/remix_resample_unittest.cc
+++ b/audio/remix_resample_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/remix_resample.h"
+
#include <cmath>
-#include "audio/remix_resample.h"
#include "common_audio/resampler/include/push_resampler.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/checks.h"
diff --git a/audio/test/audio_end_to_end_test.cc b/audio/test/audio_end_to_end_test.cc
index 550a72c..1f68f58 100644
--- a/audio/test/audio_end_to_end_test.cc
+++ b/audio/test/audio_end_to_end_test.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/test/audio_end_to_end_test.h"
+
#include <algorithm>
#include "absl/memory/memory.h"
-#include "audio/test/audio_end_to_end_test.h"
#include "call/fake_network_pipe.h"
#include "call/simulated_network.h"
#include "system_wrappers/include/sleep.h"
diff --git a/audio/transport_feedback_packet_loss_tracker.cc b/audio/transport_feedback_packet_loss_tracker.cc
index f41439b..6f9ac9e 100644
--- a/audio/transport_feedback_packet_loss_tracker.cc
+++ b/audio/transport_feedback_packet_loss_tracker.cc
@@ -225,8 +225,7 @@
UpdateCounter(&rplr_state_.num_acked_pairs_, apply);
if (prev->second.status == PacketStatus::Lost &&
it->second.status == PacketStatus::Received) {
- UpdateCounter(
- &rplr_state_.num_recoverable_losses_, apply);
+ UpdateCounter(&rplr_state_.num_recoverable_losses_, apply);
}
}
}
diff --git a/audio/transport_feedback_packet_loss_tracker_unittest.cc b/audio/transport_feedback_packet_loss_tracker_unittest.cc
index 716a1bd..5c3494f 100644
--- a/audio/transport_feedback_packet_loss_tracker_unittest.cc
+++ b/audio/transport_feedback_packet_loss_tracker_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/transport_feedback_packet_loss_tracker.h"
+
#include <limits>
#include <memory>
#include <numeric>
#include <vector>
-#include "audio/transport_feedback_packet_loss_tracker.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "rtc_base/checks.h"
diff --git a/audio/utility/audio_frame_operations.cc b/audio/utility/audio_frame_operations.cc
index d3180a7..a9d2cf1 100644
--- a/audio/utility/audio_frame_operations.cc
+++ b/audio/utility/audio_frame_operations.cc
@@ -11,6 +11,7 @@
#include "audio/utility/audio_frame_operations.h"
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <utility>
diff --git a/audio/utility/audio_frame_operations_unittest.cc b/audio/utility/audio_frame_operations_unittest.cc
index dd41d1a..1d38875 100644
--- a/audio/utility/audio_frame_operations_unittest.cc
+++ b/audio/utility/audio_frame_operations_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "audio/utility/audio_frame_operations.h"
+
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/audio/utility/channel_mixer.h b/audio/utility/channel_mixer.h
index e0967b2..8b6b7f5 100644
--- a/audio/utility/channel_mixer.h
+++ b/audio/utility/channel_mixer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/audio/utility/channel_mixer_unittest.cc b/audio/utility/channel_mixer_unittest.cc
index 75c4c23..94cb1ac 100644
--- a/audio/utility/channel_mixer_unittest.cc
+++ b/audio/utility/channel_mixer_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "audio/utility/channel_mixer.h"
+
#include <memory>
#include "api/audio/audio_frame.h"
#include "api/audio/channel_layout.h"
-#include "audio/utility/channel_mixer.h"
#include "audio/utility/channel_mixing_matrix.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/strings/string_builder.h"
diff --git a/call/bitrate_allocator_unittest.cc b/call/bitrate_allocator_unittest.cc
index e73a449..f177caf 100644
--- a/call/bitrate_allocator_unittest.cc
+++ b/call/bitrate_allocator_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/bitrate_allocator.h"
+
#include <algorithm>
#include <memory>
#include <vector>
-#include "call/bitrate_allocator.h"
#include "system_wrappers/include/clock.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/call/call.cc b/call/call.cc
index ca96888..293afa9 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/call.h"
+
#include <string.h>
+
#include <algorithm>
#include <map>
#include <memory>
@@ -23,7 +26,6 @@
#include "audio/audio_send_stream.h"
#include "audio/audio_state.h"
#include "call/bitrate_allocator.h"
-#include "call/call.h"
#include "call/flexfec_receive_stream_impl.h"
#include "call/receive_time_calculator.h"
#include "call/rtp_stream_receiver_controller.h"
diff --git a/call/call_factory.cc b/call/call_factory.cc
index e617596..6d48935 100644
--- a/call/call_factory.cc
+++ b/call/call_factory.cc
@@ -11,6 +11,7 @@
#include "call/call_factory.h"
#include <stdio.h>
+
#include <memory>
#include <string>
diff --git a/call/call_unittest.cc b/call/call_unittest.cc
index a3d4938..2ffa794 100644
--- a/call/call_unittest.cc
+++ b/call/call_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/call.h"
+
#include <list>
#include <map>
#include <memory>
@@ -21,7 +23,6 @@
#include "audio/audio_receive_stream.h"
#include "audio/audio_send_stream.h"
#include "call/audio_state.h"
-#include "call/call.h"
#include "logging/rtc_event_log/rtc_event_log.h"
#include "modules/audio_device/include/mock_audio_device.h"
#include "modules/audio_processing/include/mock_audio_processing.h"
diff --git a/call/degraded_call.cc b/call/degraded_call.cc
index 4b6d1af..20a7d7d 100644
--- a/call/degraded_call.cc
+++ b/call/degraded_call.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/degraded_call.h"
+
#include <utility>
#include "absl/memory/memory.h"
-#include "call/degraded_call.h"
#include "rtc_base/location.h"
namespace webrtc {
diff --git a/call/degraded_call.h b/call/degraded_call.h
index 86b1c9a..57480ed 100644
--- a/call/degraded_call.h
+++ b/call/degraded_call.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/call/fake_network_pipe.cc b/call/fake_network_pipe.cc
index 46adcb4..ea0415c 100644
--- a/call/fake_network_pipe.cc
+++ b/call/fake_network_pipe.cc
@@ -8,14 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/fake_network_pipe.h"
+
#include <string.h>
+
#include <algorithm>
#include <queue>
#include <utility>
#include <vector>
#include "api/media_types.h"
-#include "call/fake_network_pipe.h"
#include "modules/utility/include/process_thread.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/call/flexfec_receive_stream.h b/call/flexfec_receive_stream.h
index 77c9932..2f7438f 100644
--- a/call/flexfec_receive_stream.h
+++ b/call/flexfec_receive_stream.h
@@ -12,6 +12,7 @@
#define CALL_FLEXFEC_RECEIVE_STREAM_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/call/flexfec_receive_stream_impl.cc b/call/flexfec_receive_stream_impl.cc
index fedb64d..39b53af 100644
--- a/call/flexfec_receive_stream_impl.cc
+++ b/call/flexfec_receive_stream_impl.cc
@@ -11,6 +11,7 @@
#include "call/flexfec_receive_stream_impl.h"
#include <stddef.h>
+
#include <cstdint>
#include <string>
#include <vector>
diff --git a/call/flexfec_receive_stream_unittest.cc b/call/flexfec_receive_stream_unittest.cc
index 6fcc5dd..45f4589 100644
--- a/call/flexfec_receive_stream_unittest.cc
+++ b/call/flexfec_receive_stream_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/flexfec_receive_stream.h"
+
#include <cstdint>
#include <memory>
#include <vector>
@@ -17,7 +19,6 @@
#include "api/call/transport.h"
#include "api/rtp_headers.h"
#include "api/rtp_parameters.h"
-#include "call/flexfec_receive_stream.h"
#include "call/flexfec_receive_stream_impl.h"
#include "call/rtp_stream_receiver_controller.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
diff --git a/call/receive_time_calculator.h b/call/receive_time_calculator.h
index 5c61063..0bd3a82 100644
--- a/call/receive_time_calculator.h
+++ b/call/receive_time_calculator.h
@@ -11,6 +11,7 @@
#define CALL_RECEIVE_TIME_CALCULATOR_H_
#include <stdint.h>
+
#include <memory>
#include "api/units/time_delta.h"
diff --git a/call/receive_time_calculator_unittest.cc b/call/receive_time_calculator_unittest.cc
index 4349ee4..d18fb1b 100644
--- a/call/receive_time_calculator_unittest.cc
+++ b/call/receive_time_calculator_unittest.cc
@@ -11,6 +11,7 @@
#include "call/receive_time_calculator.h"
#include <stdlib.h>
+
#include <algorithm>
#include <cmath>
#include <cstdint>
diff --git a/call/rtcp_demuxer.cc b/call/rtcp_demuxer.cc
index d35548d..738109f 100644
--- a/call/rtcp_demuxer.cc
+++ b/call/rtcp_demuxer.cc
@@ -11,6 +11,7 @@
#include "call/rtcp_demuxer.h"
#include <stddef.h>
+
#include <algorithm>
#include <utility>
diff --git a/call/rtcp_demuxer_unittest.cc b/call/rtcp_demuxer_unittest.cc
index 16faa28..23c305c 100644
--- a/call/rtcp_demuxer_unittest.cc
+++ b/call/rtcp_demuxer_unittest.cc
@@ -11,6 +11,7 @@
#include "call/rtcp_demuxer.h"
#include <stddef.h>
+
#include <set>
#include "api/rtp_headers.h"
diff --git a/call/rtp_bitrate_configurator_unittest.cc b/call/rtp_bitrate_configurator_unittest.cc
index 70a4cf6..6449a1a 100644
--- a/call/rtp_bitrate_configurator_unittest.cc
+++ b/call/rtp_bitrate_configurator_unittest.cc
@@ -7,9 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtp_bitrate_configurator.h"
+
#include <memory>
-#include "call/rtp_bitrate_configurator.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/call/rtp_config.h b/call/rtp_config.h
index 0af48a5..a0596a8 100644
--- a/call/rtp_config.h
+++ b/call/rtp_config.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/call/rtp_payload_params.cc b/call/rtp_payload_params.cc
index 5990123..af7bfd2 100644
--- a/call/rtp_payload_params.cc
+++ b/call/rtp_payload_params.cc
@@ -11,6 +11,7 @@
#include "call/rtp_payload_params.h"
#include <stddef.h>
+
#include <algorithm>
#include "absl/container/inlined_vector.h"
diff --git a/call/rtp_payload_params_unittest.cc b/call/rtp_payload_params_unittest.cc
index 0000348..d3bdf56 100644
--- a/call/rtp_payload_params_unittest.cc
+++ b/call/rtp_payload_params_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtp_payload_params.h"
+
#include <string.h>
+
#include <map>
#include <set>
@@ -17,7 +20,6 @@
#include "absl/types/variant.h"
#include "api/video/video_content_type.h"
#include "api/video/video_rotation.h"
-#include "call/rtp_payload_params.h"
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
#include "modules/video_coding/codecs/interface/common_constants.h"
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
@@ -152,7 +154,7 @@
EncodedImage encoded_image;
CodecSpecificInfo codec_info;
- CodecSpecificInfoH264 *h264info = &codec_info.codecSpecific.H264;
+ CodecSpecificInfoH264* h264info = &codec_info.codecSpecific.H264;
codec_info.codecType = kVideoCodecH264;
h264info->packetization_mode = H264PacketizationMode::SingleNalUnit;
h264info->temporal_idx = kNoTemporalIdx;
diff --git a/call/rtp_rtcp_demuxer_helper_unittest.cc b/call/rtp_rtcp_demuxer_helper_unittest.cc
index 523cd88..17e6617 100644
--- a/call/rtp_rtcp_demuxer_helper_unittest.cc
+++ b/call/rtp_rtcp_demuxer_helper_unittest.cc
@@ -8,10 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtp_rtcp_demuxer_helper.h"
+
#include <string.h>
+
#include <cstdio>
-#include "call/rtp_rtcp_demuxer_helper.h"
#include "modules/rtp_rtcp/source/rtcp_packet/bye.h"
#include "modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h"
#include "modules/rtp_rtcp/source/rtcp_packet/extended_reports.h"
diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc
index a7acf53..842afd7 100644
--- a/call/rtp_transport_controller_send.cc
+++ b/call/rtp_transport_controller_send.cc
@@ -7,6 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtp_transport_controller_send.h"
+
#include <utility>
#include <vector>
@@ -17,7 +19,6 @@
#include "api/units/data_rate.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
-#include "call/rtp_transport_controller_send.h"
#include "call/rtp_video_sender.h"
#include "logging/rtc_event_log/events/rtc_event_route_change.h"
#include "rtc_base/checks.h"
diff --git a/call/rtp_video_sender_unittest.cc b/call/rtp_video_sender_unittest.cc
index 5e01576b..c314c3c 100644
--- a/call/rtp_video_sender_unittest.cc
+++ b/call/rtp_video_sender_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtp_video_sender.h"
+
#include <memory>
#include <string>
#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "call/rtp_transport_controller_send.h"
-#include "call/rtp_video_sender.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/rtcp_packet/nack.h"
diff --git a/call/rtx_receive_stream.cc b/call/rtx_receive_stream.cc
index 25bd9c1..3c8b53b 100644
--- a/call/rtx_receive_stream.cc
+++ b/call/rtx_receive_stream.cc
@@ -8,11 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/rtx_receive_stream.h"
+
#include <string.h>
+
#include <utility>
#include "api/array_view.h"
-#include "call/rtx_receive_stream.h"
#include "modules/rtp_rtcp/include/receive_statistics.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
diff --git a/call/rtx_receive_stream_unittest.cc b/call/rtx_receive_stream_unittest.cc
index f003c4e..79dc2f1 100644
--- a/call/rtx_receive_stream_unittest.cc
+++ b/call/rtx_receive_stream_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "call/rtx_receive_stream.h"
+
#include "call/test/mock_rtp_packet_sink_interface.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
@@ -30,27 +31,49 @@
constexpr uint16_t kMediaSeqno = 0x5657;
constexpr uint8_t kRtxPacket[] = {
- 0x80, // Version 2.
- 98, // Payload type.
- 0x12, 0x34, // Seqno.
- 0x11, 0x11, 0x11, 0x11, // Timestamp.
- 0x22, 0x22, 0x22, 0x22, // SSRC.
+ 0x80, // Version 2.
+ 98, // Payload type.
+ 0x12,
+ 0x34, // Seqno.
+ 0x11,
+ 0x11,
+ 0x11,
+ 0x11, // Timestamp.
+ 0x22,
+ 0x22,
+ 0x22,
+ 0x22, // SSRC.
// RTX header.
- 0x56, 0x57, // Orig seqno.
+ 0x56,
+ 0x57, // Orig seqno.
// Payload.
0xee,
};
constexpr uint8_t kRtxPacketWithCVO[] = {
- 0x90, // Version 2, X set.
- 98, // Payload type.
- 0x12, 0x34, // Seqno.
- 0x11, 0x11, 0x11, 0x11, // Timestamp.
- 0x22, 0x22, 0x22, 0x22, // SSRC.
- 0xbe, 0xde, 0x00, 0x01, // Extension header.
- 0x30, 0x01, 0x00, 0x00, // 90 degree rotation.
+ 0x90, // Version 2, X set.
+ 98, // Payload type.
+ 0x12,
+ 0x34, // Seqno.
+ 0x11,
+ 0x11,
+ 0x11,
+ 0x11, // Timestamp.
+ 0x22,
+ 0x22,
+ 0x22,
+ 0x22, // SSRC.
+ 0xbe,
+ 0xde,
+ 0x00,
+ 0x01, // Extension header.
+ 0x30,
+ 0x01,
+ 0x00,
+ 0x00, // 90 degree rotation.
// RTX header.
- 0x56, 0x57, // Orig seqno.
+ 0x56,
+ 0x57, // Orig seqno.
// Payload.
0xee,
};
diff --git a/call/simulated_network.h b/call/simulated_network.h
index 7106063..2e42ddc 100644
--- a/call/simulated_network.h
+++ b/call/simulated_network.h
@@ -11,6 +11,7 @@
#define CALL_SIMULATED_NETWORK_H_
#include <stdint.h>
+
#include <deque>
#include <queue>
#include <vector>
diff --git a/call/simulated_network_unittest.cc b/call/simulated_network_unittest.cc
index 5c92e57..25fb1c1 100644
--- a/call/simulated_network_unittest.cc
+++ b/call/simulated_network_unittest.cc
@@ -7,14 +7,15 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "call/simulated_network.h"
+
+#include <algorithm>
#include <map>
#include <set>
#include <vector>
-#include <algorithm>
#include "absl/algorithm/container.h"
#include "api/units/data_rate.h"
-#include "call/simulated_network.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/call/test/mock_rtp_packet_sink_interface.h b/call/test/mock_rtp_packet_sink_interface.h
index add399b..adc804f 100644
--- a/call/test/mock_rtp_packet_sink_interface.h
+++ b/call/test/mock_rtp_packet_sink_interface.h
@@ -11,7 +11,6 @@
#define CALL_TEST_MOCK_RTP_PACKET_SINK_INTERFACE_H_
#include "call/rtp_packet_sink_interface.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/call/video_receive_stream.cc b/call/video_receive_stream.cc
index 79783fd..9f737e2 100644
--- a/call/video_receive_stream.cc
+++ b/call/video_receive_stream.cc
@@ -9,6 +9,7 @@
*/
#include "call/video_receive_stream.h"
+
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
diff --git a/call/video_send_stream.h b/call/video_send_stream.h
index f38f7bc..daf2d39 100644
--- a/call/video_send_stream.h
+++ b/call/video_send_stream.h
@@ -12,6 +12,7 @@
#define CALL_VIDEO_SEND_STREAM_H_
#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
diff --git a/common_audio/audio_converter.h b/common_audio/audio_converter.h
index 73ad1ef..481ac08 100644
--- a/common_audio/audio_converter.h
+++ b/common_audio/audio_converter.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_AUDIO_CONVERTER_H_
#include <stddef.h>
+
#include <memory>
#include "rtc_base/constructor_magic.h"
diff --git a/common_audio/audio_converter_unittest.cc b/common_audio/audio_converter_unittest.cc
index b99d825..9f49497 100644
--- a/common_audio/audio_converter_unittest.cc
+++ b/common_audio/audio_converter_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_audio/audio_converter.h"
+
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
-#include "common_audio/audio_converter.h"
#include "common_audio/channel_buffer.h"
#include "common_audio/resampler/push_sinc_resampler.h"
#include "rtc_base/arraysize.h"
diff --git a/common_audio/channel_buffer.h b/common_audio/channel_buffer.h
index 3f9ba9c..dc44369 100644
--- a/common_audio/channel_buffer.h
+++ b/common_audio/channel_buffer.h
@@ -131,8 +131,8 @@
private:
std::unique_ptr<T[]> data_;
- std::unique_ptr<T* []> channels_;
- std::unique_ptr<T* []> bands_;
+ std::unique_ptr<T*[]> channels_;
+ std::unique_ptr<T*[]> bands_;
const size_t num_frames_;
const size_t num_frames_per_band_;
// Number of channels the internal buffer holds.
diff --git a/common_audio/channel_buffer_unittest.cc b/common_audio/channel_buffer_unittest.cc
index 196f87f..7d45e7c 100644
--- a/common_audio/channel_buffer_unittest.cc
+++ b/common_audio/channel_buffer_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "common_audio/channel_buffer.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/common_audio/fir_filter_c.cc b/common_audio/fir_filter_c.cc
index b6ec27ad..3f1fa09 100644
--- a/common_audio/fir_filter_c.cc
+++ b/common_audio/fir_filter_c.cc
@@ -11,6 +11,7 @@
#include "common_audio/fir_filter_c.h"
#include <string.h>
+
#include <memory>
#include "rtc_base/checks.h"
diff --git a/common_audio/fir_filter_c.h b/common_audio/fir_filter_c.h
index d263e1b..b2ae4c3 100644
--- a/common_audio/fir_filter_c.h
+++ b/common_audio/fir_filter_c.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_FIR_FILTER_C_H_
#include <string.h>
+
#include <memory>
#include "common_audio/fir_filter.h"
diff --git a/common_audio/fir_filter_sse.h b/common_audio/fir_filter_sse.h
index b768a37..32f4945 100644
--- a/common_audio/fir_filter_sse.h
+++ b/common_audio/fir_filter_sse.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_FIR_FILTER_SSE_H_
#include <stddef.h>
+
#include <memory>
#include "common_audio/fir_filter.h"
diff --git a/common_audio/fir_filter_unittest.cc b/common_audio/fir_filter_unittest.cc
index 07abf20..5c5880b 100644
--- a/common_audio/fir_filter_unittest.cc
+++ b/common_audio/fir_filter_unittest.cc
@@ -9,12 +9,12 @@
*/
#include "common_audio/fir_filter.h"
-#include "common_audio/fir_filter_factory.h"
#include <string.h>
#include <memory>
+#include "common_audio/fir_filter_factory.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/common_audio/include/audio_util.h b/common_audio/include/audio_util.h
index bca5718..50c9cf2 100644
--- a/common_audio/include/audio_util.h
+++ b/common_audio/include/audio_util.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_
#include <stdint.h>
+
#include <algorithm>
#include <cmath>
#include <cstring>
diff --git a/common_audio/real_fourier.h b/common_audio/real_fourier.h
index 4d0d8bf..4881fb7 100644
--- a/common_audio/real_fourier.h
+++ b/common_audio/real_fourier.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_REAL_FOURIER_H_
#include <stddef.h>
+
#include <complex>
#include <memory>
diff --git a/common_audio/real_fourier_ooura.h b/common_audio/real_fourier_ooura.h
index b36c84f..b5f1bcf 100644
--- a/common_audio/real_fourier_ooura.h
+++ b/common_audio/real_fourier_ooura.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_REAL_FOURIER_OOURA_H_
#include <stddef.h>
+
#include <complex>
#include <memory>
diff --git a/common_audio/resampler/push_resampler_unittest.cc b/common_audio/resampler/push_resampler_unittest.cc
index 3a1d5c5..8b0d548 100644
--- a/common_audio/resampler/push_resampler_unittest.cc
+++ b/common_audio/resampler/push_resampler_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "common_audio/resampler/include/push_resampler.h"
+
#include "rtc_base/checks.h" // RTC_DCHECK_IS_ON
#include "test/gtest.h"
diff --git a/common_audio/resampler/push_sinc_resampler.h b/common_audio/resampler/push_sinc_resampler.h
index b002ff7..bd609c4 100644
--- a/common_audio/resampler/push_sinc_resampler.h
+++ b/common_audio/resampler/push_sinc_resampler.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "common_audio/resampler/sinc_resampler.h"
diff --git a/common_audio/resampler/push_sinc_resampler_unittest.cc b/common_audio/resampler/push_sinc_resampler_unittest.cc
index ee111c4..1a25a8c 100644
--- a/common_audio/resampler/push_sinc_resampler_unittest.cc
+++ b/common_audio/resampler/push_sinc_resampler_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_audio/resampler/push_sinc_resampler.h"
+
#include <algorithm>
#include <cmath>
#include <cstring>
#include <memory>
#include "common_audio/include/audio_util.h"
-#include "common_audio/resampler/push_sinc_resampler.h"
#include "common_audio/resampler/sinusoidal_linear_chirp_source.h"
#include "rtc_base/time_utils.h"
#include "test/gmock.h"
diff --git a/common_audio/resampler/resampler.cc b/common_audio/resampler/resampler.cc
index e4d2aa2..ce38ef5 100644
--- a/common_audio/resampler/resampler.cc
+++ b/common_audio/resampler/resampler.cc
@@ -12,11 +12,12 @@
* A wrapper for resampling a numerous amount of sampling combinations.
*/
+#include "common_audio/resampler/include/resampler.h"
+
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include "common_audio/resampler/include/resampler.h"
#include "common_audio/signal_processing/include/signal_processing_library.h"
#include "rtc_base/logging.h"
diff --git a/common_audio/resampler/resampler_unittest.cc b/common_audio/resampler/resampler_unittest.cc
index 08a7479..1b90d3e 100644
--- a/common_audio/resampler/resampler_unittest.cc
+++ b/common_audio/resampler/resampler_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_audio/resampler/include/resampler.h"
+
#include <array>
-#include "common_audio/resampler/include/resampler.h"
#include "rtc_base/strings/string_builder.h"
#include "test/gtest.h"
diff --git a/common_audio/resampler/sinc_resampler.cc b/common_audio/resampler/sinc_resampler.cc
index 4601514..21707e9 100644
--- a/common_audio/resampler/sinc_resampler.cc
+++ b/common_audio/resampler/sinc_resampler.cc
@@ -90,6 +90,7 @@
#include <math.h>
#include <stdint.h>
#include <string.h>
+
#include <limits>
#include "rtc_base/checks.h"
diff --git a/common_audio/resampler/sinc_resampler.h b/common_audio/resampler/sinc_resampler.h
index ffd70d9..5181c18 100644
--- a/common_audio/resampler/sinc_resampler.h
+++ b/common_audio/resampler/sinc_resampler.h
@@ -15,6 +15,7 @@
#define COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_
#include <stddef.h>
+
#include <memory>
#include "rtc_base/constructor_magic.h"
diff --git a/common_audio/resampler/sinc_resampler_neon.cc b/common_audio/resampler/sinc_resampler_neon.cc
index 3649324..9ee918b 100644
--- a/common_audio/resampler/sinc_resampler_neon.cc
+++ b/common_audio/resampler/sinc_resampler_neon.cc
@@ -11,10 +11,10 @@
// Modified from the Chromium original:
// src/media/base/sinc_resampler.cc
-#include "common_audio/resampler/sinc_resampler.h"
-
#include <arm_neon.h>
+#include "common_audio/resampler/sinc_resampler.h"
+
namespace webrtc {
float SincResampler::Convolve_NEON(const float* input_ptr,
diff --git a/common_audio/resampler/sinc_resampler_unittest.cc b/common_audio/resampler/sinc_resampler_unittest.cc
index 0aa3c91..7bcd7f1 100644
--- a/common_audio/resampler/sinc_resampler_unittest.cc
+++ b/common_audio/resampler/sinc_resampler_unittest.cc
@@ -14,13 +14,14 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
+#include "common_audio/resampler/sinc_resampler.h"
+
#include <math.h>
#include <algorithm>
#include <memory>
#include <tuple>
-#include "common_audio/resampler/sinc_resampler.h"
#include "common_audio/resampler/sinusoidal_linear_chirp_source.h"
#include "rtc_base/stringize_macros.h"
#include "rtc_base/system/arch.h"
diff --git a/common_audio/signal_processing/include/signal_processing_library.h b/common_audio/signal_processing/include/signal_processing_library.h
index 4e8bf4f..4ad92c4 100644
--- a/common_audio/signal_processing/include/signal_processing_library.h
+++ b/common_audio/signal_processing/include/signal_processing_library.h
@@ -18,6 +18,7 @@
#define COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SIGNAL_PROCESSING_LIBRARY_H_
#include <string.h>
+
#include "common_audio/signal_processing/dot_product_with_scale.h"
// Macros specific for the fixed point implementation
diff --git a/common_audio/signal_processing/real_fft_unittest.cc b/common_audio/signal_processing/real_fft_unittest.cc
index 73fcb16..7cabe7d 100644
--- a/common_audio/signal_processing/real_fft_unittest.cc
+++ b/common_audio/signal_processing/real_fft_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "common_audio/signal_processing/include/real_fft.h"
+
#include "common_audio/signal_processing/include/signal_processing_library.h"
#include "test/gtest.h"
diff --git a/common_audio/smoothing_filter.cc b/common_audio/smoothing_filter.cc
index 422eaeb..961f4a1 100644
--- a/common_audio/smoothing_filter.cc
+++ b/common_audio/smoothing_filter.cc
@@ -11,6 +11,7 @@
#include "common_audio/smoothing_filter.h"
#include <math.h>
+
#include <cmath>
#include "rtc_base/checks.h"
diff --git a/common_audio/smoothing_filter_unittest.cc b/common_audio/smoothing_filter_unittest.cc
index caf9943..8b311d1 100644
--- a/common_audio/smoothing_filter_unittest.cc
+++ b/common_audio/smoothing_filter_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_audio/smoothing_filter.h"
+
#include <cmath>
#include <memory>
-#include "common_audio/smoothing_filter.h"
#include "rtc_base/fake_clock.h"
#include "test/gtest.h"
diff --git a/common_audio/sparse_fir_filter_unittest.cc b/common_audio/sparse_fir_filter_unittest.cc
index b6cd6f9..5dc7b6d 100644
--- a/common_audio/sparse_fir_filter_unittest.cc
+++ b/common_audio/sparse_fir_filter_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include "common_audio/sparse_fir_filter.h"
+#include <memory>
+
#include "common_audio/fir_filter.h"
#include "common_audio/fir_filter_factory.h"
#include "rtc_base/arraysize.h"
diff --git a/common_audio/third_party/fft4g/fft4g.h b/common_audio/third_party/fft4g/fft4g.h
index f1f31a1..0820b6e 100644
--- a/common_audio/third_party/fft4g/fft4g.h
+++ b/common_audio/third_party/fft4g/fft4g.h
@@ -22,4 +22,4 @@
}
#endif
-#endif /* COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ */
+#endif /* COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ */
diff --git a/common_audio/wav_file.cc b/common_audio/wav_file.cc
index da1a899..3f2aa7e 100644
--- a/common_audio/wav_file.cc
+++ b/common_audio/wav_file.cc
@@ -11,6 +11,7 @@
#include "common_audio/wav_file.h"
#include <errno.h>
+
#include <algorithm>
#include <cstdio>
#include <type_traits>
diff --git a/common_audio/wav_file.h b/common_audio/wav_file.h
index a808b0d..e071499 100644
--- a/common_audio/wav_file.h
+++ b/common_audio/wav_file.h
@@ -12,6 +12,7 @@
#define COMMON_AUDIO_WAV_FILE_H_
#include <stdint.h>
+
#include <cstddef>
#include <string>
@@ -94,7 +95,7 @@
size_t num_channels_;
size_t num_samples_; // Total number of samples in the file.
size_t num_samples_remaining_;
- FILE* file_handle_; // Input file, owned by this class.
+ FILE* file_handle_; // Input file, owned by this class.
fpos_t data_start_pos_; // Position in the file immediately after WAV header.
RTC_DISALLOW_COPY_AND_ASSIGN(WavReader);
diff --git a/common_audio/wav_file_unittest.cc b/common_audio/wav_file_unittest.cc
index bf03b1c..01c920c 100644
--- a/common_audio/wav_file_unittest.cc
+++ b/common_audio/wav_file_unittest.cc
@@ -11,10 +11,11 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
+#include "common_audio/wav_file.h"
+
#include <cmath>
#include <limits>
-#include "common_audio/wav_file.h"
#include "common_audio/wav_header.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/common_audio/wav_header_unittest.cc b/common_audio/wav_header_unittest.cc
index 8276e59..0dc3300 100644
--- a/common_audio/wav_header_unittest.cc
+++ b/common_audio/wav_header_unittest.cc
@@ -8,10 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_audio/wav_header.h"
+
#include <string.h>
+
#include <limits>
-#include "common_audio/wav_header.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/common_types.h b/common_types.h
index c156899..aadda4f 100644
--- a/common_types.h
+++ b/common_types.h
@@ -12,6 +12,7 @@
#define COMMON_TYPES_H_
#include <stddef.h> // For size_t
+
#include <cstdint>
namespace webrtc {
diff --git a/common_video/generic_frame_descriptor/generic_frame_info.cc b/common_video/generic_frame_descriptor/generic_frame_info.cc
index 5c40ddc..ca61072 100644
--- a/common_video/generic_frame_descriptor/generic_frame_info.cc
+++ b/common_video/generic_frame_descriptor/generic_frame_info.cc
@@ -21,11 +21,20 @@
for (char symbol : indication_symbols) {
DecodeTargetIndication indication;
switch (symbol) {
- case '-': indication = DecodeTargetIndication::kNotPresent; break;
- case 'D': indication = DecodeTargetIndication::kDiscardable; break;
- case 'R': indication = DecodeTargetIndication::kRequired; break;
- case 'S': indication = DecodeTargetIndication::kSwitch; break;
- default: RTC_NOTREACHED();
+ case '-':
+ indication = DecodeTargetIndication::kNotPresent;
+ break;
+ case 'D':
+ indication = DecodeTargetIndication::kDiscardable;
+ break;
+ case 'R':
+ indication = DecodeTargetIndication::kRequired;
+ break;
+ case 'S':
+ indication = DecodeTargetIndication::kSwitch;
+ break;
+ default:
+ RTC_NOTREACHED();
}
decode_targets.push_back(indication);
}
diff --git a/common_video/h264/h264_bitstream_parser.cc b/common_video/h264/h264_bitstream_parser.cc
index f1ad84f..5a75f48 100644
--- a/common_video/h264/h264_bitstream_parser.cc
+++ b/common_video/h264/h264_bitstream_parser.cc
@@ -10,6 +10,7 @@
#include "common_video/h264/h264_bitstream_parser.h"
#include <stdlib.h>
+
#include <cstdint>
#include <vector>
diff --git a/common_video/h264/h264_common.h b/common_video/h264/h264_common.h
index 027833b..2beef16 100644
--- a/common_video/h264/h264_common.h
+++ b/common_video/h264/h264_common.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "rtc_base/buffer.h"
diff --git a/common_video/h264/sps_vui_rewriter.cc b/common_video/h264/sps_vui_rewriter.cc
index 8f246ec..1c420a9 100644
--- a/common_video/h264/sps_vui_rewriter.cc
+++ b/common_video/h264/sps_vui_rewriter.cc
@@ -12,6 +12,7 @@
#include "common_video/h264/sps_vui_rewriter.h"
#include <string.h>
+
#include <cstdint>
#include <vector>
diff --git a/common_video/h264/sps_vui_rewriter_unittest.cc b/common_video/h264/sps_vui_rewriter_unittest.cc
index 823a58c..6ec6dea 100644
--- a/common_video/h264/sps_vui_rewriter_unittest.cc
+++ b/common_video/h264/sps_vui_rewriter_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_video/h264/sps_vui_rewriter.h"
+
#include <cstdint>
#include <vector>
#include "api/video/color_space.h"
#include "common_video/h264/h264_common.h"
-#include "common_video/h264/sps_vui_rewriter.h"
#include "rtc_base/bit_buffer.h"
#include "rtc_base/buffer.h"
#include "rtc_base/logging.h"
diff --git a/common_video/i420_buffer_pool_unittest.cc b/common_video/i420_buffer_pool_unittest.cc
index 230f340..27503e5 100644
--- a/common_video/i420_buffer_pool_unittest.cc
+++ b/common_video/i420_buffer_pool_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "common_video/include/i420_buffer_pool.h"
+
#include <stdint.h>
#include <string.h>
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
-#include "common_video/include/i420_buffer_pool.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/common_video/include/i420_buffer_pool.h b/common_video/include/i420_buffer_pool.h
index d666c8b..d0ccee5 100644
--- a/common_video/include/i420_buffer_pool.h
+++ b/common_video/include/i420_buffer_pool.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_
#include <stddef.h>
+
#include <list>
#include "api/scoped_refptr.h"
diff --git a/common_video/libyuv/include/webrtc_libyuv.h b/common_video/libyuv/include/webrtc_libyuv.h
index 80615f3..408841e 100644
--- a/common_video/libyuv/include/webrtc_libyuv.h
+++ b/common_video/libyuv/include/webrtc_libyuv.h
@@ -17,6 +17,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <vector>
#include "api/scoped_refptr.h"
diff --git a/common_video/libyuv/libyuv_unittest.cc b/common_video/libyuv/libyuv_unittest.cc
index 0ea4775..68c4501 100644
--- a/common_video/libyuv/libyuv_unittest.cc
+++ b/common_video/libyuv/libyuv_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "third_party/libyuv/include/libyuv.h"
+
#include <math.h>
#include <string.h>
@@ -21,7 +23,6 @@
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
-#include "third_party/libyuv/include/libyuv.h"
namespace webrtc {
diff --git a/common_video/video_frame_unittest.cc b/common_video/video_frame_unittest.cc
index 70dedc9..331c416 100644
--- a/common_video/video_frame_unittest.cc
+++ b/common_video/video_frame_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/video/video_frame.h"
+
#include <math.h>
#include <string.h>
#include "api/video/i010_buffer.h"
#include "api/video/i420_buffer.h"
-#include "api/video/video_frame.h"
#include "rtc_base/bind.h"
#include "rtc_base/time_utils.h"
#include "test/fake_texture_frame.h"
diff --git a/common_video/video_render_frames.h b/common_video/video_render_frames.h
index 2c4bdd9..9973c1f 100644
--- a/common_video/video_render_frames.h
+++ b/common_video/video_render_frames.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include "absl/types/optional.h"
diff --git a/examples/objc/AppRTCMobile/ARDAppEngineClient.h b/examples/objc/AppRTCMobile/ARDAppEngineClient.h
index db4e2ef..7514f36 100644
--- a/examples/objc/AppRTCMobile/ARDAppEngineClient.h
+++ b/examples/objc/AppRTCMobile/ARDAppEngineClient.h
@@ -10,5 +10,5 @@
#import "ARDRoomServerClient.h"
-@interface ARDAppEngineClient : NSObject<ARDRoomServerClient>
+@interface ARDAppEngineClient : NSObject <ARDRoomServerClient>
@end
diff --git a/examples/objc/AppRTCMobile/ios/ARDAppDelegate.h b/examples/objc/AppRTCMobile/ios/ARDAppDelegate.h
index 623e859..7eafff8 100644
--- a/examples/objc/AppRTCMobile/ios/ARDAppDelegate.h
+++ b/examples/objc/AppRTCMobile/ios/ARDAppDelegate.h
@@ -13,5 +13,5 @@
// The main application class of the AppRTCMobile iOS app demonstrating
// interoperability between the Objective C implementation of PeerConnection
// and the appr.tc demo webapp.
-@interface ARDAppDelegate : NSObject<UIApplicationDelegate>
+@interface ARDAppDelegate : NSObject <UIApplicationDelegate>
@end
diff --git a/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h b/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h
index f979655..759af54 100644
--- a/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h
+++ b/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h
@@ -31,7 +31,7 @@
- (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype) new NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
diff --git a/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h b/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h
index 42a908d..931edac 100644
--- a/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h
+++ b/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h
@@ -17,8 +17,7 @@
@protocol ARDExternalSampleDelegate;
API_AVAILABLE(ios(10.0))
-@interface ARDBroadcastSampleHandler
- : RPBroadcastSampleHandler<ARDAppClientDelegate>
+@interface ARDBroadcastSampleHandler : RPBroadcastSampleHandler <ARDAppClientDelegate>
@property(nonatomic, strong) id<ARDExternalSampleDelegate> capturer;
diff --git a/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h b/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h
index e95c5cc..bbf397d 100644
--- a/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h
+++ b/examples/objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h
@@ -12,7 +12,6 @@
#import <UIKit/UIKit.h>
API_AVAILABLE(ios(11.0))
-@interface ARDBroadcastSetupViewController
- : UIViewController<UITextFieldDelegate>
+@interface ARDBroadcastSetupViewController : UIViewController <UITextFieldDelegate>
@end
diff --git a/examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h b/examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h
index 95f3594..2b3ce09 100644
--- a/examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h
+++ b/examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h
@@ -10,5 +10,5 @@
#import <Cocoa/Cocoa.h>
-@interface APPRTCAppDelegate : NSObject<NSApplicationDelegate>
+@interface APPRTCAppDelegate : NSObject <NSApplicationDelegate>
@end
diff --git a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h
index 5cce725..a230646 100644
--- a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h
+++ b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h
@@ -18,23 +18,23 @@
#import <Security/SecCertificate.h>
typedef enum {
- SR_CONNECTING = 0,
- SR_OPEN = 1,
- SR_CLOSING = 2,
- SR_CLOSED = 3,
+ SR_CONNECTING = 0,
+ SR_OPEN = 1,
+ SR_CLOSING = 2,
+ SR_CLOSED = 3,
} SRReadyState;
typedef enum SRStatusCode : NSInteger {
- SRStatusCodeNormal = 1000,
- SRStatusCodeGoingAway = 1001,
- SRStatusCodeProtocolError = 1002,
- SRStatusCodeUnhandledType = 1003,
- // 1004 reserved.
- SRStatusNoStatusReceived = 1005,
- // 1004-1006 reserved.
- SRStatusCodeInvalidUTF8 = 1007,
- SRStatusCodePolicyViolated = 1008,
- SRStatusCodeMessageTooBig = 1009,
+ SRStatusCodeNormal = 1000,
+ SRStatusCodeGoingAway = 1001,
+ SRStatusCodeProtocolError = 1002,
+ SRStatusCodeUnhandledType = 1003,
+ // 1004 reserved.
+ SRStatusNoStatusReceived = 1005,
+ // 1004-1006 reserved.
+ SRStatusCodeInvalidUTF8 = 1007,
+ SRStatusCodePolicyViolated = 1008,
+ SRStatusCodeMessageTooBig = 1009,
} SRStatusCode;
@class SRWebSocket;
@@ -50,14 +50,14 @@
@interface SRWebSocket : NSObject <NSStreamDelegate>
-@property (nonatomic, weak) id <SRWebSocketDelegate> delegate;
+@property(nonatomic, weak) id<SRWebSocketDelegate> delegate;
-@property (nonatomic, readonly) SRReadyState readyState;
-@property (nonatomic, readonly, retain) NSURL *url;
+@property(nonatomic, readonly) SRReadyState readyState;
+@property(nonatomic, readonly, retain) NSURL *url;
// This returns the negotiated protocol.
// It will be nil until after the handshake completes.
-@property (nonatomic, readonly, copy) NSString *protocol;
+@property(nonatomic, readonly, copy) NSString *protocol;
// Protocols should be an array of strings that turn into Sec-WebSocket-Protocol.
- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols;
@@ -69,8 +69,8 @@
// Delegate queue will be dispatch_main_queue by default.
// You cannot set both OperationQueue and dispatch_queue.
-- (void)setDelegateOperationQueue:(NSOperationQueue*) queue;
-- (void)setDelegateDispatchQueue:(dispatch_queue_t) queue;
+- (void)setDelegateOperationQueue:(NSOperationQueue *)queue;
+- (void)setDelegateDispatchQueue:(dispatch_queue_t)queue;
// By default, it will schedule itself on +[NSRunLoop SR_networkRunLoop] using defaultModes.
- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;
@@ -102,7 +102,10 @@
- (void)webSocketDidOpen:(SRWebSocket *)webSocket;
- (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;
-- (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
+- (void)webSocket:(SRWebSocket *)webSocket
+ didCloseWithCode:(NSInteger)code
+ reason:(NSString *)reason
+ wasClean:(BOOL)wasClean;
- (void)webSocket:(SRWebSocket *)webSocket didReceivePong:(NSData *)pongPayload;
@end
@@ -111,7 +114,7 @@
@interface NSURLRequest (CertificateAdditions)
-@property (nonatomic, retain, readonly) NSArray *SR_SSLPinnedCertificates;
+@property(nonatomic, retain, readonly) NSArray *SR_SSLPinnedCertificates;
@end
@@ -119,7 +122,7 @@
@interface NSMutableURLRequest (CertificateAdditions)
-@property (nonatomic, retain) NSArray *SR_SSLPinnedCertificates;
+@property(nonatomic, retain) NSArray *SR_SSLPinnedCertificates;
@end
diff --git a/examples/objcnativeapi/objc/NADAppDelegate.h b/examples/objcnativeapi/objc/NADAppDelegate.h
index d421120..02372db 100644
--- a/examples/objcnativeapi/objc/NADAppDelegate.h
+++ b/examples/objcnativeapi/objc/NADAppDelegate.h
@@ -10,7 +10,7 @@
#import <UIKit/UIKit.h>
-@interface NADAppDelegate : UIResponder<UIApplicationDelegate>
+@interface NADAppDelegate : UIResponder <UIApplicationDelegate>
@property(strong, nonatomic) UIWindow* window;
diff --git a/examples/objcnativeapi/objc/objc_call_client.h b/examples/objcnativeapi/objc/objc_call_client.h
index 986014f..de7e5fd 100644
--- a/examples/objcnativeapi/objc/objc_call_client.h
+++ b/examples/objcnativeapi/objc/objc_call_client.h
@@ -36,17 +36,14 @@
public:
explicit PCObserver(ObjCCallClient* client);
- void OnSignalingChange(
- webrtc::PeerConnectionInterface::SignalingState new_state) override;
- void OnDataChannel(
- rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel) override;
+ void OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState new_state) override;
+ void OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel) override;
void OnRenegotiationNeeded() override;
void OnIceConnectionChange(
webrtc::PeerConnectionInterface::IceConnectionState new_state) override;
void OnIceGatheringChange(
webrtc::PeerConnectionInterface::IceGatheringState new_state) override;
- void OnIceCandidate(
- const webrtc::IceCandidateInterface* candidate) override;
+ void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override;
private:
const ObjCCallClient* client_;
@@ -62,12 +59,10 @@
const std::unique_ptr<PCObserver> pc_observer_;
- rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pcf_
- RTC_GUARDED_BY(thread_checker_);
+ rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pcf_ RTC_GUARDED_BY(thread_checker_);
std::unique_ptr<rtc::Thread> network_thread_ RTC_GUARDED_BY(thread_checker_);
std::unique_ptr<rtc::Thread> worker_thread_ RTC_GUARDED_BY(thread_checker_);
- std::unique_ptr<rtc::Thread> signaling_thread_
- RTC_GUARDED_BY(thread_checker_);
+ std::unique_ptr<rtc::Thread> signaling_thread_ RTC_GUARDED_BY(thread_checker_);
std::unique_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> remote_sink_
RTC_GUARDED_BY(thread_checker_);
@@ -75,8 +70,7 @@
RTC_GUARDED_BY(thread_checker_);
rtc::CriticalSection pc_mutex_;
- rtc::scoped_refptr<webrtc::PeerConnectionInterface> pc_
- RTC_GUARDED_BY(pc_mutex_);
+ rtc::scoped_refptr<webrtc::PeerConnectionInterface> pc_ RTC_GUARDED_BY(pc_mutex_);
};
} // namespace webrtc_examples
diff --git a/examples/peerconnection/client/conductor.cc b/examples/peerconnection/client/conductor.cc
index 64813b0..10fbc79 100644
--- a/examples/peerconnection/client/conductor.cc
+++ b/examples/peerconnection/client/conductor.cc
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <utility>
#include <vector>
@@ -84,8 +85,8 @@
capturer = absl::WrapUnique(
webrtc::test::VcmCapturer::Create(kWidth, kHeight, kFps, i));
if (capturer) {
- return new
- rtc::RefCountedObject<CapturerTrackSource>(std::move(capturer));
+ return new rtc::RefCountedObject<CapturerTrackSource>(
+ std::move(capturer));
}
}
diff --git a/examples/peerconnection/client/linux/main_wnd.cc b/examples/peerconnection/client/linux/main_wnd.cc
index 7a45745..001172c 100644
--- a/examples/peerconnection/client/linux/main_wnd.cc
+++ b/examples/peerconnection/client/linux/main_wnd.cc
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include <cstdint>
#include <map>
#include <utility>
diff --git a/examples/peerconnection/client/linux/main_wnd.h b/examples/peerconnection/client/linux/main_wnd.h
index 2fd3de5..3b31e1b 100644
--- a/examples/peerconnection/client/linux/main_wnd.h
+++ b/examples/peerconnection/client/linux/main_wnd.h
@@ -12,6 +12,7 @@
#define EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_
#include <stdint.h>
+
#include <memory>
#include <string>
diff --git a/examples/peerconnection/server/data_socket.cc b/examples/peerconnection/server/data_socket.cc
index 2ffc0ad..2b625b0 100644
--- a/examples/peerconnection/server/data_socket.cc
+++ b/examples/peerconnection/server/data_socket.cc
@@ -193,7 +193,9 @@
size_t method_name_len;
RequestMethod id;
} supported_methods[] = {
- {"GET", 3, GET}, {"POST", 4, POST}, {"OPTIONS", 7, OPTIONS},
+ {"GET", 3, GET},
+ {"POST", 4, POST},
+ {"OPTIONS", 7, OPTIONS},
};
const char* path = NULL;
diff --git a/examples/peerconnection/server/peer_channel.cc b/examples/peerconnection/server/peer_channel.cc
index 1707176..be0f282 100644
--- a/examples/peerconnection/server/peer_channel.cc
+++ b/examples/peerconnection/server/peer_channel.cc
@@ -13,6 +13,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+
#include <algorithm>
#include "examples/peerconnection/server/data_socket.h"
diff --git a/examples/peerconnection/server/utils.h b/examples/peerconnection/server/utils.h
index 63de88d..85c04a4 100644
--- a/examples/peerconnection/server/utils.h
+++ b/examples/peerconnection/server/utils.h
@@ -12,6 +12,7 @@
#define EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
#include <stddef.h>
+
#include <string>
#ifndef ARRAYSIZE
diff --git a/examples/stunprober/main.cc b/examples/stunprober/main.cc
index 72f05014..1683208 100644
--- a/examples/stunprober/main.cc
+++ b/examples/stunprober/main.cc
@@ -25,8 +25,8 @@
#include "rtc_base/thread.h"
#include "rtc_base/time_utils.h"
-using stunprober::StunProber;
using stunprober::AsyncCallback;
+using stunprober::StunProber;
WEBRTC_DEFINE_bool(help, false, "Prints this message");
WEBRTC_DEFINE_int(interval,
diff --git a/examples/turnserver/read_auth_file_unittest.cc b/examples/turnserver/read_auth_file_unittest.cc
index 4a6f332..23b0264 100644
--- a/examples/turnserver/read_auth_file_unittest.cc
+++ b/examples/turnserver/read_auth_file_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "examples/turnserver/read_auth_file.h"
+
#include <sstream>
-#include "examples/turnserver/read_auth_file.h"
#include "test/gtest.h"
namespace webrtc_examples {
diff --git a/examples/unityplugin/class_reference_holder.h b/examples/unityplugin/class_reference_holder.h
index 2b0eba4..884d471 100644
--- a/examples/unityplugin/class_reference_holder.h
+++ b/examples/unityplugin/class_reference_holder.h
@@ -17,6 +17,7 @@
#define EXAMPLES_UNITYPLUGIN_CLASS_REFERENCE_HOLDER_H_
#include <jni.h>
+
#include <map>
#include <string>
#include <vector>
diff --git a/logging/rtc_event_log/encoder/blob_encoding.h b/logging/rtc_event_log/encoder/blob_encoding.h
index b76b5b2..4a38dc5 100644
--- a/logging/rtc_event_log/encoder/blob_encoding.h
+++ b/logging/rtc_event_log/encoder/blob_encoding.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_ENCODER_BLOB_ENCODING_H_
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/logging/rtc_event_log/encoder/delta_encoding.h b/logging/rtc_event_log/encoder/delta_encoding.h
index d4d4a2c..5e86a98 100644
--- a/logging/rtc_event_log/encoder/delta_encoding.h
+++ b/logging/rtc_event_log/encoder/delta_encoding.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc
index ec39bf3..2d19c3b 100644
--- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc
+++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc
@@ -11,6 +11,7 @@
#include "logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h"
#include <string.h>
+
#include <vector>
#include "absl/types/optional.h"
@@ -54,7 +55,6 @@
#include "rtc_base/ignore_wundef.h"
#include "rtc_base/logging.h"
-
// *.pb.h files are generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
diff --git a/logging/rtc_event_log/encoder/var_int.h b/logging/rtc_event_log/encoder/var_int.h
index 390ac90..178c9ce 100644
--- a/logging/rtc_event_log/encoder/var_int.h
+++ b/logging/rtc_event_log/encoder/var_int.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "absl/strings/string_view.h"
diff --git a/logging/rtc_event_log/events/rtc_event_alr_state.cc b/logging/rtc_event_log/events/rtc_event_alr_state.cc
index 8e5c2ca..8ab7f79 100644
--- a/logging/rtc_event_log/events/rtc_event_alr_state.cc
+++ b/logging/rtc_event_log/events/rtc_event_alr_state.cc
@@ -9,6 +9,7 @@
*/
#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
+
#include "absl/memory/memory.h"
namespace webrtc {
diff --git a/logging/rtc_event_log/events/rtc_event_audio_playout.h b/logging/rtc_event_log/events/rtc_event_audio_playout.h
index 4b40f5c..5c95347 100644
--- a/logging/rtc_event_log/events/rtc_event_audio_playout.h
+++ b/logging/rtc_event_log/events/rtc_event_audio_playout.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_PLAYOUT_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h b/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
index a97d49f..60c4c76 100644
--- a/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
+++ b/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_DELAY_BASED_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h b/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
index b4f8877..0192bbe 100644
--- a/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
+++ b/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_LOSS_BASED_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_generic_ack_received.h b/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
index 59d75db..f439951 100644
--- a/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
+++ b/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
@@ -11,12 +11,11 @@
#ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_ACK_RECEIVED_H_
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_ACK_RECEIVED_H_
-#include "logging/rtc_event_log/events/rtc_event.h"
-
#include <memory>
#include <vector>
#include "absl/types/optional.h"
+#include "logging/rtc_event_log/events/rtc_event.h"
namespace webrtc {
diff --git a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
index 973a12a..3fe3307 100644
--- a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
+++ b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
index 9a499e2..9fb83d8 100644
--- a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
+++ b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_CONFIG_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
index ad757ed..002537e 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_CLUSTER_CREATED_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
index 0c40f0c..02e353b 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_success.h b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
index a08dadd..b3a93fe 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_success.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_SUCCESS_H_
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event.h"
diff --git a/logging/rtc_event_log/events/rtc_event_route_change.cc b/logging/rtc_event_log/events/rtc_event_route_change.cc
index 1370ec8..1ea63e2 100644
--- a/logging/rtc_event_log/events/rtc_event_route_change.cc
+++ b/logging/rtc_event_log/events/rtc_event_route_change.cc
@@ -9,6 +9,7 @@
*/
#include "logging/rtc_event_log/events/rtc_event_route_change.h"
+
#include "absl/memory/memory.h"
namespace webrtc {
diff --git a/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h b/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h
index 8394fe0..2d89612 100644
--- a/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h
+++ b/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_RTCP_PACKET_INCOMING_H_
#include <stdint.h>
+
#include <memory>
#include "api/array_view.h"
diff --git a/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h b/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h
index b47b85d..d281206 100644
--- a/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h
+++ b/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_RTCP_PACKET_OUTGOING_H_
#include <stdint.h>
+
#include <memory>
#include "api/array_view.h"
diff --git a/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h b/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h
index 1e35735..c689378 100644
--- a/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h
+++ b/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h
@@ -43,7 +43,7 @@
private:
RtcEventRtpPacketIncoming(const RtcEventRtpPacketIncoming& other);
- RtpPacket header_; // Only the packet's header will be stored here.
+ RtpPacket header_; // Only the packet's header will be stored here.
const size_t payload_length_; // Media payload, excluding header and padding.
const size_t header_length_; // RTP header.
const size_t padding_length_; // RTP padding.
diff --git a/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h b/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h
index ebddc14..4f9cd68 100644
--- a/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h
+++ b/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h
@@ -45,7 +45,7 @@
private:
RtcEventRtpPacketOutgoing(const RtcEventRtpPacketOutgoing& other);
- RtpPacket header_; // Only the packet's header will be stored here.
+ RtpPacket header_; // Only the packet's header will be stored here.
const size_t payload_length_; // Media payload, excluding header and padding.
const size_t header_length_; // RTP header.
const size_t padding_length_; // RTP padding.
diff --git a/logging/rtc_event_log/rtc_event_log2rtp_dump.cc b/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
index 9128f2b..9a82736 100644
--- a/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
+++ b/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <string.h>
+
#include <iostream>
#include <memory>
#include <string>
diff --git a/logging/rtc_event_log/rtc_event_log_impl.h b/logging/rtc_event_log/rtc_event_log_impl.h
index 9af487c..9c7aae6 100644
--- a/logging/rtc_event_log/rtc_event_log_impl.h
+++ b/logging/rtc_event_log/rtc_event_log_impl.h
@@ -69,7 +69,6 @@
// History containing the most recent (non-configuration) events (~10s).
std::deque<std::unique_ptr<RtcEvent>> history_ RTC_GUARDED_BY(*task_queue_);
-
std::unique_ptr<RtcEventLogEncoder> event_encoder_
RTC_GUARDED_BY(*task_queue_);
std::unique_ptr<RtcEventLogOutput> event_output_ RTC_GUARDED_BY(*task_queue_);
diff --git a/logging/rtc_event_log/rtc_event_log_unittest.cc b/logging/rtc_event_log/rtc_event_log_unittest.cc
index 4d01dad..a3a6433 100644
--- a/logging/rtc_event_log/rtc_event_log_unittest.cc
+++ b/logging/rtc_event_log/rtc_event_log_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "logging/rtc_event_log/rtc_event_log.h"
+
#include <algorithm>
#include <limits>
#include <map>
@@ -41,7 +43,6 @@
#include "logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h"
#include "logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h"
#include "logging/rtc_event_log/events/rtc_event_video_send_stream_config.h"
-#include "logging/rtc_event_log/rtc_event_log.h"
#include "logging/rtc_event_log/rtc_event_log_parser.h"
#include "logging/rtc_event_log/rtc_event_log_unittest_helper.h"
#include "logging/rtc_event_log/rtc_stream_config.h"
@@ -920,5 +921,4 @@
// TODO(terelius): Verify parser behavior if the timestamps are not
// monotonically increasing in the log.
-
} // namespace webrtc
diff --git a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
index 3c4ca0d..8302305 100644
--- a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
+++ b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
@@ -11,6 +11,7 @@
#include "logging/rtc_event_log/rtc_event_log_unittest_helper.h"
#include <string.h> // memcmp
+
#include <cmath>
#include <cstdint>
#include <limits>
diff --git a/logging/rtc_event_log/rtc_event_log_unittest_helper.h b/logging/rtc_event_log/rtc_event_log_unittest_helper.h
index 716d89f..5efcdca 100644
--- a/logging/rtc_event_log/rtc_event_log_unittest_helper.h
+++ b/logging/rtc_event_log/rtc_event_log_unittest_helper.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
diff --git a/logging/rtc_event_log/rtc_event_processor.h b/logging/rtc_event_log/rtc_event_processor.h
index 4657f6e..9441681 100644
--- a/logging/rtc_event_log/rtc_event_processor.h
+++ b/logging/rtc_event_log/rtc_event_processor.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_RTC_EVENT_PROCESSOR_H_
#include <stdint.h>
+
#include <algorithm>
#include <memory>
#include <utility>
diff --git a/logging/rtc_event_log/rtc_event_processor_unittest.cc b/logging/rtc_event_log/rtc_event_processor_unittest.cc
index 9f33540..4ec5abe 100644
--- a/logging/rtc_event_log/rtc_event_processor_unittest.cc
+++ b/logging/rtc_event_log/rtc_event_processor_unittest.cc
@@ -11,6 +11,7 @@
#include "logging/rtc_event_log/rtc_event_processor.h"
#include <stddef.h>
+
#include <cstdint>
#include <initializer_list>
#include <numeric>
diff --git a/logging/rtc_event_log/rtc_stream_config.h b/logging/rtc_event_log/rtc_stream_config.h
index 6522f99..a81249a 100644
--- a/logging/rtc_event_log/rtc_stream_config.h
+++ b/logging/rtc_event_log/rtc_stream_config.h
@@ -12,6 +12,7 @@
#define LOGGING_RTC_EVENT_LOG_RTC_STREAM_CONFIG_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/media/base/codec_unittest.cc b/media/base/codec_unittest.cc
index bf0addb..62968e0 100644
--- a/media/base/codec_unittest.cc
+++ b/media/base/codec_unittest.cc
@@ -19,10 +19,10 @@
using cricket::Codec;
using cricket::DataCodec;
using cricket::FeedbackParam;
-using cricket::VideoCodec;
using cricket::kCodecParamAssociatedPayloadType;
using cricket::kCodecParamMaxBitrate;
using cricket::kCodecParamMinBitrate;
+using cricket::VideoCodec;
class TestCodec : public Codec {
public:
diff --git a/media/base/fake_frame_source.h b/media/base/fake_frame_source.h
index d6f71be..4c56204 100644
--- a/media/base/fake_frame_source.h
+++ b/media/base/fake_frame_source.h
@@ -12,7 +12,6 @@
#define MEDIA_BASE_FAKE_FRAME_SOURCE_H_
#include "api/video/video_frame.h"
-
#include "rtc_base/time_utils.h"
namespace cricket {
diff --git a/media/base/fake_rtp.cc b/media/base/fake_rtp.cc
index 175de6f..4f42821 100644
--- a/media/base/fake_rtp.cc
+++ b/media/base/fake_rtp.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/base/fake_rtp.h"
+
#include <stdint.h>
#include <string.h>
#include "absl/algorithm/container.h"
-#include "media/base/fake_rtp.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/media/base/fake_rtp.h b/media/base/fake_rtp.h
index 07c8e72..f257815 100644
--- a/media/base/fake_rtp.h
+++ b/media/base/fake_rtp.h
@@ -43,36 +43,214 @@
// PT=0, SN=1, TS=0, SSRC=1
// all data FF
static const unsigned char kPcmuFrameWithExtensions[] = {
- 0x90, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x90,
+ 0x00,
+ 0x00,
+ 0x01,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x01,
// RFC 5285, section 4.2. One-Byte Header.
- 0xBE, 0xDE,
+ 0xBE,
+ 0xDE,
// Header extension length 6 * 32 bits.
- 0x00, 0x06,
+ 0x00,
+ 0x06,
// 8 bytes header id 1.
- 0x17, 0x41, 0x42, 0x73, 0xA4, 0x75, 0x26, 0x27, 0x48,
+ 0x17,
+ 0x41,
+ 0x42,
+ 0x73,
+ 0xA4,
+ 0x75,
+ 0x26,
+ 0x27,
+ 0x48,
// 3 bytes header id 2.
- 0x22, 0x00, 0x00, 0xC8,
+ 0x22,
+ 0x00,
+ 0x00,
+ 0xC8,
// 1 byte header id 3.
- 0x30, 0x8E,
+ 0x30,
+ 0x8E,
// 7 bytes header id 4.
- 0x46, 0x55, 0x99, 0x63, 0x86, 0xB3, 0x95, 0xFB,
+ 0x46,
+ 0x55,
+ 0x99,
+ 0x63,
+ 0x86,
+ 0xB3,
+ 0x95,
+ 0xFB,
// 1 byte header padding.
0x00,
// Payload data.
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
};
// A typical Receiver Report RTCP packet.
diff --git a/media/base/media_engine.cc b/media/base/media_engine.cc
index dff7887..bf5e959 100644
--- a/media/base/media_engine.cc
+++ b/media/base/media_engine.cc
@@ -11,6 +11,7 @@
#include "media/base/media_engine.h"
#include <stddef.h>
+
#include <cstdint>
#include <string>
#include <utility>
diff --git a/media/base/rtp_data_engine_unittest.cc b/media/base/rtp_data_engine_unittest.cc
index cd7d295..cd11eb5 100644
--- a/media/base/rtp_data_engine_unittest.cc
+++ b/media/base/rtp_data_engine_unittest.cc
@@ -8,14 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/base/rtp_data_engine.h"
+
#include <string.h>
+
#include <memory>
#include <string>
#include "api/media_transport_config.h"
#include "media/base/fake_network_interface.h"
#include "media/base/media_constants.h"
-#include "media/base/rtp_data_engine.h"
#include "media/base/rtp_utils.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/fake_clock.h"
diff --git a/media/base/rtp_utils.cc b/media/base/rtp_utils.cc
index 00719b5..0b45e69 100644
--- a/media/base/rtp_utils.cc
+++ b/media/base/rtp_utils.cc
@@ -11,6 +11,7 @@
#include "media/base/rtp_utils.h"
#include <string.h>
+
#include <vector>
// PacketTimeUpdateParams is defined in asyncpacketsocket.h.
diff --git a/media/base/rtp_utils_unittest.cc b/media/base/rtp_utils_unittest.cc
index d88b160..051508c 100644
--- a/media/base/rtp_utils_unittest.cc
+++ b/media/base/rtp_utils_unittest.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/base/rtp_utils.h"
+
#include <string.h>
+
#include <cstdint>
#include <vector>
#include "media/base/fake_rtp.h"
-#include "media/base/rtp_utils.h"
#include "rtc_base/async_packet_socket.h"
#include "test/gtest.h"
diff --git a/media/base/stream_params.cc b/media/base/stream_params.cc
index 0466a64..db781ac 100644
--- a/media/base/stream_params.cc
+++ b/media/base/stream_params.cc
@@ -11,6 +11,7 @@
#include "media/base/stream_params.h"
#include <stdint.h>
+
#include <list>
#include "absl/algorithm/container.h"
diff --git a/media/base/stream_params.h b/media/base/stream_params.h
index 80a3a39..b8c3770 100644
--- a/media/base/stream_params.h
+++ b/media/base/stream_params.h
@@ -47,6 +47,7 @@
#define MEDIA_BASE_STREAM_PARAMS_H_
#include <stddef.h>
+
#include <cstdint>
#include <string>
#include <vector>
diff --git a/media/base/video_adapter.h b/media/base/video_adapter.h
index 83f2f01..bbe0886 100644
--- a/media/base/video_adapter.h
+++ b/media/base/video_adapter.h
@@ -12,6 +12,7 @@
#define MEDIA_BASE_VIDEO_ADAPTER_H_
#include <stdint.h>
+
#include <utility>
#include "absl/types/optional.h"
diff --git a/media/base/video_adapter_unittest.cc b/media/base/video_adapter_unittest.cc
index 3334d36..1f17c88 100644
--- a/media/base/video_adapter_unittest.cc
+++ b/media/base/video_adapter_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/base/video_adapter.h"
+
#include <limits>
#include <memory>
#include <utility>
@@ -15,7 +17,6 @@
#include "absl/memory/memory.h"
#include "api/video/video_frame.h"
#include "media/base/fake_frame_source.h"
-#include "media/base/video_adapter.h"
#include "rtc_base/time_utils.h"
#include "test/gtest.h"
@@ -293,24 +294,21 @@
OnOutputFormatRequest(640, 480, kDefaultFps);
const int64_t first_timestamp = 0;
- adapter_.AdaptFrameResolution(640, 480, first_timestamp,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ adapter_.AdaptFrameResolution(640, 480, first_timestamp, &cropped_width_,
+ &cropped_height_, &out_width_, &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
const int64_t big_offset = -987654321LL * 1000;
const int64_t second_timestamp = big_offset;
- adapter_.AdaptFrameResolution(640, 480, second_timestamp,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ adapter_.AdaptFrameResolution(640, 480, second_timestamp, &cropped_width_,
+ &cropped_height_, &out_width_, &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
const int64_t third_timestamp = big_offset + capture_interval;
- adapter_.AdaptFrameResolution(640, 480, third_timestamp,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ adapter_.AdaptFrameResolution(640, 480, third_timestamp, &cropped_width_,
+ &cropped_height_, &out_width_, &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
}
@@ -321,38 +319,38 @@
OnOutputFormatRequest(640, 480, kDefaultFps);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 0 / 10,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 10 / 10 - 1,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 25 / 10,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 30 / 10,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 35 / 10,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
adapter_.AdaptFrameResolution(640, 480, capture_interval * 50 / 10,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_);
+ &cropped_width_, &cropped_height_, &out_width_,
+ &out_height_);
EXPECT_GT(out_width_, 0);
EXPECT_GT(out_height_, 0);
}
@@ -517,9 +515,9 @@
}
TEST_P(VideoAdapterTest, TestOnOutputFormatRequest) {
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -527,9 +525,9 @@
// Format request 640x400.
OnOutputFormatRequest(640, 400, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -538,9 +536,9 @@
// Request 1280x720, higher than input, but aspect 16:9. Expect cropping but
// no scaling.
OnOutputFormatRequest(1280, 720, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -548,15 +546,15 @@
// Request 0x0.
OnOutputFormatRequest(0, 0, absl::nullopt);
- EXPECT_FALSE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_FALSE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
// Request 320x200. Expect scaling, but no cropping.
OnOutputFormatRequest(320, 200, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(320, out_width_);
@@ -566,9 +564,9 @@
// is not optimized and not allowed, therefore 1/2 scaling will be used
// instead.
OnOutputFormatRequest(424, 265, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(320, out_width_);
@@ -576,9 +574,9 @@
// Request resolution of 3 / 8. Expect adapt down.
OnOutputFormatRequest(640 * 3 / 8, 400 * 3 / 8, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(640 * 3 / 8, out_width_);
@@ -586,9 +584,9 @@
// Switch back up. Expect adapt.
OnOutputFormatRequest(320, 200, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(320, out_width_);
@@ -596,9 +594,9 @@
// Format request 480x300.
OnOutputFormatRequest(480, 300, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 400, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(400, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -607,9 +605,9 @@
TEST_P(VideoAdapterTest, TestViewRequestPlusCameraSwitch) {
// Start at HD.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -617,9 +615,9 @@
// Format request for VGA.
OnOutputFormatRequest(640, 360, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -627,9 +625,9 @@
// Now, the camera reopens at VGA.
// Both the frame and the output format should be 640x360.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -638,9 +636,9 @@
// And another view request comes in for 640x360, which should have no
// real impact.
OnOutputFormatRequest(640, 360, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -651,9 +649,9 @@
// Reqeuested Output format is 640x360.
OnOutputFormatRequest(640, 360, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
// Expect cropping.
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
@@ -661,17 +659,17 @@
EXPECT_EQ(360, out_height_);
// But if frames come in at 640x360, we shouldn't adapt them down.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
EXPECT_EQ(360, out_height_);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -679,9 +677,9 @@
}
TEST_P(VideoAdapterTest, TestOnResolutionRequestInSmallSteps) {
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -690,9 +688,9 @@
// Adapt down one step.
adapter_.OnResolutionFramerateRequest(absl::nullopt, 1280 * 720 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(960, out_width_);
@@ -701,9 +699,9 @@
// Adapt down one step more.
adapter_.OnResolutionFramerateRequest(absl::nullopt, 960 * 540 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -712,45 +710,42 @@
// Adapt down one step more.
adapter_.OnResolutionFramerateRequest(absl::nullopt, 640 * 360 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(480, out_width_);
EXPECT_EQ(270, out_height_);
// Adapt up one step.
- adapter_.OnResolutionFramerateRequest(640 * 360,
- 960 * 540,
+ adapter_.OnResolutionFramerateRequest(640 * 360, 960 * 540,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(640, out_width_);
EXPECT_EQ(360, out_height_);
// Adapt up one step more.
- adapter_.OnResolutionFramerateRequest(960 * 540,
- 1280 * 720,
+ adapter_.OnResolutionFramerateRequest(960 * 540, 1280 * 720,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(960, out_width_);
EXPECT_EQ(540, out_height_);
// Adapt up one step more.
- adapter_.OnResolutionFramerateRequest(1280 * 720,
- 1920 * 1080,
+ adapter_.OnResolutionFramerateRequest(1280 * 720, 1920 * 1080,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -758,9 +753,9 @@
}
TEST_P(VideoAdapterTest, TestOnResolutionRequestMaxZero) {
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -768,18 +763,18 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt, 0,
std::numeric_limits<int>::max());
- EXPECT_FALSE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_FALSE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
}
TEST_P(VideoAdapterTest, TestOnResolutionRequestInLargeSteps) {
// Large step down.
adapter_.OnResolutionFramerateRequest(absl::nullopt, 640 * 360 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -788,9 +783,9 @@
// Large step up.
adapter_.OnResolutionFramerateRequest(1280 * 720, 1920 * 1080,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -800,18 +795,18 @@
TEST_P(VideoAdapterTest, TestOnOutputFormatRequestCapsMaxResolution) {
adapter_.OnResolutionFramerateRequest(absl::nullopt, 640 * 360 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(480, out_width_);
EXPECT_EQ(270, out_height_);
OnOutputFormatRequest(640, 360, absl::nullopt);
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -819,9 +814,9 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt, 960 * 720,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -829,9 +824,9 @@
}
TEST_P(VideoAdapterTest, TestOnResolutionRequestReset) {
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -839,9 +834,9 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt, 640 * 360 - 1,
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -850,9 +845,9 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt,
std::numeric_limits<int>::max(),
std::numeric_limits<int>::max());
- EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(1280, 720, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(1280, cropped_width_);
EXPECT_EQ(720, cropped_height_);
EXPECT_EQ(1280, out_width_);
@@ -949,9 +944,9 @@
// Ask for 640x360 (16:9 aspect).
OnOutputFormatRequest(640, 360, absl::nullopt);
// Send 640x480 (4:3 aspect).
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
// Expect cropping to 16:9 format and no scaling.
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
@@ -962,9 +957,9 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt, 640 * 360 - 1,
std::numeric_limits<int>::max());
// Expect cropping to 16:9 format and 3/4 scaling.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -974,9 +969,9 @@
adapter_.OnResolutionFramerateRequest(absl::nullopt, 480 * 270 - 1,
std::numeric_limits<int>::max());
// Expect cropping to 16:9 format and 1/2 scaling.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(320, out_width_);
@@ -986,9 +981,9 @@
adapter_.OnResolutionFramerateRequest(480 * 270, 640 * 360,
std::numeric_limits<int>::max());
// Expect cropping to 16:9 format and 3/4 scaling.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(480, out_width_);
@@ -998,9 +993,9 @@
adapter_.OnResolutionFramerateRequest(640 * 360, 960 * 540,
std::numeric_limits<int>::max());
// Expect cropping to 16:9 format and no scaling.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -1010,9 +1005,9 @@
adapter_.OnResolutionFramerateRequest(960 * 540, 1280 * 720,
std::numeric_limits<int>::max());
// Expect cropping to 16:9 format and no scaling.
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
EXPECT_EQ(640, cropped_width_);
EXPECT_EQ(360, cropped_height_);
EXPECT_EQ(640, out_width_);
@@ -1027,9 +1022,9 @@
std::numeric_limits<int>::max());
// Send 640x480 (4:3 aspect).
- EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0,
- &cropped_width_, &cropped_height_,
- &out_width_, &out_height_));
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 480, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
// Instead of getting the exact aspect ratio with cropped resolution 640x360,
// the resolution should be adjusted to get a perfect scale factor instead.
diff --git a/media/base/video_broadcaster_unittest.cc b/media/base/video_broadcaster_unittest.cc
index cb76d9f..9a91ed5 100644
--- a/media/base/video_broadcaster_unittest.cc
+++ b/media/base/video_broadcaster_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/base/video_broadcaster.h"
+
#include <limits>
#include "absl/types/optional.h"
@@ -15,12 +17,11 @@
#include "api/video/video_frame.h"
#include "api/video/video_rotation.h"
#include "media/base/fake_video_renderer.h"
-#include "media/base/video_broadcaster.h"
#include "test/gtest.h"
+using cricket::FakeVideoRenderer;
using rtc::VideoBroadcaster;
using rtc::VideoSinkWants;
-using cricket::FakeVideoRenderer;
TEST(VideoBroadcasterTest, frame_wanted) {
VideoBroadcaster broadcaster;
diff --git a/media/engine/encoder_simulcast_proxy.h b/media/engine/encoder_simulcast_proxy.h
index eea8a62..8e9e0ff 100644
--- a/media/engine/encoder_simulcast_proxy.h
+++ b/media/engine/encoder_simulcast_proxy.h
@@ -14,6 +14,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/media/engine/encoder_simulcast_proxy_unittest.cc b/media/engine/encoder_simulcast_proxy_unittest.cc
index f52575a7..591e752 100644
--- a/media/engine/encoder_simulcast_proxy_unittest.cc
+++ b/media/engine/encoder_simulcast_proxy_unittest.cc
@@ -10,6 +10,7 @@
*/
#include "media/engine/encoder_simulcast_proxy.h"
+
#include <string>
#include "api/test/mock_video_encoder.h"
diff --git a/media/engine/fake_webrtc_call.cc b/media/engine/fake_webrtc_call.cc
index 9ad99de..a9cbf32 100644
--- a/media/engine/fake_webrtc_call.cc
+++ b/media/engine/fake_webrtc_call.cc
@@ -20,17 +20,16 @@
namespace cricket {
FakeAudioSendStream::FakeAudioSendStream(
- int id, const webrtc::AudioSendStream::Config& config)
- : id_(id), config_(config) {
-}
+ int id,
+ const webrtc::AudioSendStream::Config& config)
+ : id_(id), config_(config) {}
void FakeAudioSendStream::Reconfigure(
const webrtc::AudioSendStream::Config& config) {
config_ = config;
}
-const webrtc::AudioSendStream::Config&
- FakeAudioSendStream::GetConfig() const {
+const webrtc::AudioSendStream::Config& FakeAudioSendStream::GetConfig() const {
return config_;
}
@@ -40,12 +39,13 @@
}
FakeAudioSendStream::TelephoneEvent
- FakeAudioSendStream::GetLatestTelephoneEvent() const {
+FakeAudioSendStream::GetLatestTelephoneEvent() const {
return latest_telephone_event_;
}
bool FakeAudioSendStream::SendTelephoneEvent(int payload_type,
- int payload_frequency, int event,
+ int payload_frequency,
+ int event,
int duration_ms) {
latest_telephone_event_.payload_type = payload_type;
latest_telephone_event_.payload_frequency = payload_frequency;
@@ -68,12 +68,12 @@
}
FakeAudioReceiveStream::FakeAudioReceiveStream(
- int id, const webrtc::AudioReceiveStream::Config& config)
- : id_(id), config_(config) {
-}
+ int id,
+ const webrtc::AudioReceiveStream::Config& config)
+ : id_(id), config_(config) {}
-const webrtc::AudioReceiveStream::Config&
- FakeAudioReceiveStream::GetConfig() const {
+const webrtc::AudioReceiveStream::Config& FakeAudioReceiveStream::GetConfig()
+ const {
return config_;
}
@@ -199,8 +199,7 @@
void FakeVideoSendStream::OnFrame(const webrtc::VideoFrame& frame) {
++num_swapped_frames_;
- if (!last_frame_ ||
- frame.width() != last_frame_->width() ||
+ if (!last_frame_ || frame.width() != last_frame_->width() ||
frame.height() != last_frame_->height() ||
frame.rotation() != last_frame_->rotation()) {
video_streams_ = encoder_config_.video_stream_factory->CreateEncoderStreams(
@@ -250,7 +249,7 @@
config.encoder_specific_settings->FillVideoCodecH264(
&codec_specific_settings_.h264);
codec_specific_settings_.h264.numberOfTemporalLayers =
- num_temporal_layers;
+ num_temporal_layers;
} else {
ADD_FAILURE() << "Unsupported encoder payload: "
<< config_.rtp.payload_name;
@@ -470,8 +469,8 @@
webrtc::AudioSendStream* FakeCall::CreateAudioSendStream(
const webrtc::AudioSendStream::Config& config) {
- FakeAudioSendStream* fake_stream = new FakeAudioSendStream(next_stream_id_++,
- config);
+ FakeAudioSendStream* fake_stream =
+ new FakeAudioSendStream(next_stream_id_++, config);
audio_send_streams_.push_back(fake_stream);
++num_created_send_streams_;
return fake_stream;
@@ -490,8 +489,8 @@
webrtc::AudioReceiveStream* FakeCall::CreateAudioReceiveStream(
const webrtc::AudioReceiveStream::Config& config) {
- audio_receive_streams_.push_back(new FakeAudioReceiveStream(next_stream_id_++,
- config));
+ audio_receive_streams_.push_back(
+ new FakeAudioReceiveStream(next_stream_id_++, config));
++num_created_receive_streams_;
return audio_receive_streams_.back();
}
diff --git a/media/engine/fake_webrtc_video_engine.h b/media/engine/fake_webrtc_video_engine.h
index 68a3d46..7b32ac8 100644
--- a/media/engine/fake_webrtc_video_engine.h
+++ b/media/engine/fake_webrtc_video_engine.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
@@ -44,9 +45,7 @@
~FakeWebRtcVideoDecoder();
int32_t InitDecode(const webrtc::VideoCodec*, int32_t) override;
- int32_t Decode(const webrtc::EncodedImage&,
- bool,
- int64_t) override;
+ int32_t Decode(const webrtc::EncodedImage&, bool, int64_t) override;
int32_t RegisterDecodeCompleteCallback(
webrtc::DecodedImageCallback*) override;
int32_t Release() override;
diff --git a/media/engine/payload_type_mapper_unittest.cc b/media/engine/payload_type_mapper_unittest.cc
index 2e6ae1e..c8b2234 100644
--- a/media/engine/payload_type_mapper_unittest.cc
+++ b/media/engine/payload_type_mapper_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/payload_type_mapper.h"
+
#include <set>
#include <string>
#include "absl/strings/string_view.h"
#include "media/base/media_constants.h"
-#include "media/engine/payload_type_mapper.h"
#include "test/gtest.h"
namespace cricket {
diff --git a/media/engine/simulcast.cc b/media/engine/simulcast.cc
index bfd7a2a..a59538b 100644
--- a/media/engine/simulcast.cc
+++ b/media/engine/simulcast.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/simulcast.h"
+
#include <stdint.h>
#include <stdio.h>
+
#include <algorithm>
#include <string>
@@ -17,7 +20,6 @@
#include "api/video/video_codec_constants.h"
#include "media/base/media_constants.h"
#include "media/engine/constants.h"
-#include "media/engine/simulcast.h"
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/checks.h"
diff --git a/media/engine/simulcast.h b/media/engine/simulcast.h
index 1f3d2e4..6a51172 100644
--- a/media/engine/simulcast.h
+++ b/media/engine/simulcast.h
@@ -12,6 +12,7 @@
#define MEDIA_ENGINE_SIMULCAST_H_
#include <stddef.h>
+
#include <vector>
#include "api/video_codecs/video_encoder_config.h"
diff --git a/media/engine/simulcast_encoder_adapter.cc b/media/engine/simulcast_encoder_adapter.cc
index a128d01..1b4d3b8 100644
--- a/media/engine/simulcast_encoder_adapter.cc
+++ b/media/engine/simulcast_encoder_adapter.cc
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <string>
diff --git a/media/engine/simulcast_encoder_adapter_unittest.cc b/media/engine/simulcast_encoder_adapter_unittest.cc
index ee8da30..161a301 100644
--- a/media/engine/simulcast_encoder_adapter_unittest.cc
+++ b/media/engine/simulcast_encoder_adapter_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/simulcast_encoder_adapter.h"
+
#include <array>
#include <memory>
#include <vector>
@@ -23,7 +25,6 @@
#include "common_video/include/video_frame_buffer.h"
#include "media/base/media_constants.h"
#include "media/engine/internal_encoder_factory.h"
-#include "media/engine/simulcast_encoder_adapter.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
diff --git a/media/engine/unhandled_packets_buffer.h b/media/engine/unhandled_packets_buffer.h
index 0db06d2..ef03588 100644
--- a/media/engine/unhandled_packets_buffer.h
+++ b/media/engine/unhandled_packets_buffer.h
@@ -12,6 +12,7 @@
#define MEDIA_ENGINE_UNHANDLED_PACKETS_BUFFER_H_
#include <stdint.h>
+
#include <functional>
#include <tuple>
#include <utility>
diff --git a/media/engine/unhandled_packets_buffer_unittest.cc b/media/engine/unhandled_packets_buffer_unittest.cc
index 1a7dd55..11abd86 100644
--- a/media/engine/unhandled_packets_buffer_unittest.cc
+++ b/media/engine/unhandled_packets_buffer_unittest.cc
@@ -11,6 +11,7 @@
#include "media/engine/unhandled_packets_buffer.h"
#include <memory>
+
#include "absl/memory/memory.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/media/engine/webrtc_media_engine.cc b/media/engine/webrtc_media_engine.cc
index c69e17b..480d0901 100644
--- a/media/engine/webrtc_media_engine.cc
+++ b/media/engine/webrtc_media_engine.cc
@@ -134,12 +134,11 @@
// Sort by name, ascending (prioritise encryption), so that we don't reset
// extensions if they were specified in a different order (also allows us
// to use std::unique below).
- absl::c_sort(
- result,
- [](const webrtc::RtpExtension& rhs, const webrtc::RtpExtension& lhs) {
- return rhs.encrypt == lhs.encrypt ? rhs.uri < lhs.uri
- : rhs.encrypt > lhs.encrypt;
- });
+ absl::c_sort(result, [](const webrtc::RtpExtension& rhs,
+ const webrtc::RtpExtension& lhs) {
+ return rhs.encrypt == lhs.encrypt ? rhs.uri < lhs.uri
+ : rhs.encrypt > lhs.encrypt;
+ });
// Remove unnecessary extensions (used on send side).
if (filter_redundant_extensions) {
diff --git a/media/engine/webrtc_media_engine_unittest.cc b/media/engine/webrtc_media_engine_unittest.cc
index 0849a65..c39f97d 100644
--- a/media/engine/webrtc_media_engine_unittest.cc
+++ b/media/engine/webrtc_media_engine_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/webrtc_media_engine.h"
+
#include <memory>
#include <utility>
@@ -16,7 +18,6 @@
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "api/video_codecs/builtin_video_decoder_factory.h"
#include "api/video_codecs/builtin_video_encoder_factory.h"
-#include "media/engine/webrtc_media_engine.h"
#include "media/engine/webrtc_media_engine_defaults.h"
#include "modules/audio_processing/include/audio_processing.h"
#include "test/field_trial.h"
diff --git a/media/engine/webrtc_video_engine.cc b/media/engine/webrtc_video_engine.cc
index 9770b1b..bcb0273 100644
--- a/media/engine/webrtc_video_engine.cc
+++ b/media/engine/webrtc_video_engine.cc
@@ -11,6 +11,7 @@
#include "media/engine/webrtc_video_engine.h"
#include <stdio.h>
+
#include <algorithm>
#include <set>
#include <string>
@@ -819,23 +820,23 @@
}
}
- for (auto& kv : send_streams_) {
- kv.second->SetSendParameters(changed_params);
+ for (auto& kv : send_streams_) {
+ kv.second->SetSendParameters(changed_params);
+ }
+ if (changed_params.send_codec || changed_params.rtcp_mode) {
+ // Update receive feedback parameters from new codec or RTCP mode.
+ RTC_LOG(LS_INFO)
+ << "SetFeedbackOptions on all the receive streams because the send "
+ "codec or RTCP mode has changed.";
+ for (auto& kv : receive_streams_) {
+ RTC_DCHECK(kv.second != nullptr);
+ kv.second->SetFeedbackParameters(
+ HasLntf(send_codec_->codec), HasNack(send_codec_->codec),
+ HasRemb(send_codec_->codec), HasTransportCc(send_codec_->codec),
+ send_params_.rtcp.reduced_size ? webrtc::RtcpMode::kReducedSize
+ : webrtc::RtcpMode::kCompound);
}
- if (changed_params.send_codec || changed_params.rtcp_mode) {
- // Update receive feedback parameters from new codec or RTCP mode.
- RTC_LOG(LS_INFO)
- << "SetFeedbackOptions on all the receive streams because the send "
- "codec or RTCP mode has changed.";
- for (auto& kv : receive_streams_) {
- RTC_DCHECK(kv.second != nullptr);
- kv.second->SetFeedbackParameters(
- HasLntf(send_codec_->codec), HasNack(send_codec_->codec),
- HasRemb(send_codec_->codec), HasTransportCc(send_codec_->codec),
- send_params_.rtcp.reduced_size ? webrtc::RtcpMode::kReducedSize
- : webrtc::RtcpMode::kCompound);
- }
- }
+ }
return true;
}
@@ -1082,9 +1083,9 @@
RTC_DLOG(LS_ERROR) << "SetSend(true) called before setting codec.";
return false;
}
- for (const auto& kv : send_streams_) {
- kv.second->SetSend(send);
- }
+ for (const auto& kv : send_streams_) {
+ kv.second->SetSend(send);
+ }
sending_ = send;
return true;
}
@@ -1202,30 +1203,30 @@
RTC_LOG(LS_INFO) << "RemoveSendStream: " << ssrc;
WebRtcVideoSendStream* removed_stream;
- std::map<uint32_t, WebRtcVideoSendStream*>::iterator it =
- send_streams_.find(ssrc);
- if (it == send_streams_.end()) {
- return false;
+ std::map<uint32_t, WebRtcVideoSendStream*>::iterator it =
+ send_streams_.find(ssrc);
+ if (it == send_streams_.end()) {
+ return false;
+ }
+
+ for (uint32_t old_ssrc : it->second->GetSsrcs())
+ send_ssrcs_.erase(old_ssrc);
+
+ removed_stream = it->second;
+ send_streams_.erase(it);
+
+ // Switch receiver report SSRCs, the one in use is no longer valid.
+ if (rtcp_receiver_report_ssrc_ == ssrc) {
+ rtcp_receiver_report_ssrc_ = send_streams_.empty()
+ ? kDefaultRtcpReceiverReportSsrc
+ : send_streams_.begin()->first;
+ RTC_LOG(LS_INFO) << "SetLocalSsrc on all the receive streams because the "
+ "previous local SSRC was removed.";
+
+ for (auto& kv : receive_streams_) {
+ kv.second->SetLocalSsrc(rtcp_receiver_report_ssrc_);
}
-
- for (uint32_t old_ssrc : it->second->GetSsrcs())
- send_ssrcs_.erase(old_ssrc);
-
- removed_stream = it->second;
- send_streams_.erase(it);
-
- // Switch receiver report SSRCs, the one in use is no longer valid.
- if (rtcp_receiver_report_ssrc_ == ssrc) {
- rtcp_receiver_report_ssrc_ = send_streams_.empty()
- ? kDefaultRtcpReceiverReportSsrc
- : send_streams_.begin()->first;
- RTC_LOG(LS_INFO) << "SetLocalSsrc on all the receive streams because the "
- "previous local SSRC was removed.";
-
- for (auto& kv : receive_streams_) {
- kv.second->SetLocalSsrc(rtcp_receiver_report_ssrc_);
- }
- }
+ }
delete removed_stream;
@@ -3008,8 +3009,8 @@
absl::EqualsIgnoreCase(codec_name_, kH264CodecName)) &&
is_screenshare_ && screenshare_config_explicitly_enabled_)) {
const bool temporal_layers_supported =
- absl::EqualsIgnoreCase(codec_name_, kVp8CodecName)
- || absl::EqualsIgnoreCase(codec_name_, kH264CodecName);
+ absl::EqualsIgnoreCase(codec_name_, kVp8CodecName) ||
+ absl::EqualsIgnoreCase(codec_name_, kH264CodecName);
layers = GetSimulcastConfig(encoder_config.number_of_streams, width, height,
encoder_config.bitrate_priority, max_qp_,
is_screenshare_, temporal_layers_supported);
diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc
index 0f09960..0403049 100644
--- a/media/engine/webrtc_video_engine_unittest.cc
+++ b/media/engine/webrtc_video_engine_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/webrtc_video_engine.h"
+
#include <map>
#include <memory>
#include <string>
@@ -48,7 +50,6 @@
#include "media/engine/fake_webrtc_call.h"
#include "media/engine/fake_webrtc_video_engine.h"
#include "media/engine/simulcast.h"
-#include "media/engine/webrtc_video_engine.h"
#include "media/engine/webrtc_voice_engine.h"
#include "modules/rtp_rtcp/include/rtp_header_parser.h"
#include "rtc_base/arraysize.h"
@@ -540,9 +541,9 @@
// TODO(deadbeef): This test should be updated if/when we start
// adding RTX codecs for unrecognized codec names.
TEST_F(WebRtcVideoEngineTest, RtxCodecAddedForH264Codec) {
- using webrtc::H264::ProfileLevelIdToString;
- using webrtc::H264::ProfileLevelId;
using webrtc::H264::kLevel1;
+ using webrtc::H264::ProfileLevelId;
+ using webrtc::H264::ProfileLevelIdToString;
webrtc::SdpVideoFormat h264_constrained_baseline("H264");
h264_constrained_baseline.parameters[kH264FmtpProfileLevelId] =
*ProfileLevelIdToString(
@@ -1898,10 +1899,10 @@
// Tests that we can add and remove capturers and frames are sent out properly
TEST_F(WebRtcVideoChannelBaseTest, DISABLED_AddRemoveCapturer) {
- using cricket::VideoCodec;
- using cricket::VideoOptions;
- using cricket::VideoFormat;
using cricket::FOURCC_I420;
+ using cricket::VideoCodec;
+ using cricket::VideoFormat;
+ using cricket::VideoOptions;
VideoCodec codec = DefaultCodec();
const int time_between_send_ms = VideoFormat::FpsToInterval(kFramerate);
diff --git a/media/engine/webrtc_voice_engine_unittest.cc b/media/engine/webrtc_voice_engine_unittest.cc
index d292038..00c3624 100644
--- a/media/engine/webrtc_voice_engine_unittest.cc
+++ b/media/engine/webrtc_voice_engine_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/engine/webrtc_voice_engine.h"
+
#include <memory>
#include <utility>
@@ -26,7 +28,6 @@
#include "media/base/fake_rtp.h"
#include "media/base/media_constants.h"
#include "media/engine/fake_webrtc_call.h"
-#include "media/engine/webrtc_voice_engine.h"
#include "modules/audio_device/include/mock_audio_device.h"
#include "modules/audio_processing/include/mock_audio_processing.h"
#include "rtc_base/arraysize.h"
diff --git a/media/sctp/sctp_transport.cc b/media/sctp/sctp_transport.cc
index 7c60832..fb0f59e 100644
--- a/media/sctp/sctp_transport.cc
+++ b/media/sctp/sctp_transport.cc
@@ -18,8 +18,6 @@
};
} // namespace
-#include "media/sctp/sctp_transport.h"
-
#include <stdarg.h>
#include <stdio.h>
@@ -29,6 +27,7 @@
#include "media/base/codec.h"
#include "media/base/media_constants.h"
#include "media/base/stream_params.h"
+#include "media/sctp/sctp_transport.h"
#include "p2p/base/dtls_transport_internal.h" // For PF_NORMAL
#include "rtc_base/arraysize.h"
#include "rtc_base/copy_on_write_buffer.h"
diff --git a/media/sctp/sctp_transport_unittest.cc b/media/sctp/sctp_transport_unittest.cc
index 703f7a9..843fcc2 100644
--- a/media/sctp/sctp_transport_unittest.cc
+++ b/media/sctp/sctp_transport_unittest.cc
@@ -8,14 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "media/sctp/sctp_transport.h"
+
#include <stdio.h>
#include <string.h>
+
#include <memory>
#include <string>
#include <vector>
#include "absl/algorithm/container.h"
-#include "media/sctp/sctp_transport.h"
#include "p2p/base/fake_dtls_transport.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/gunit.h"
diff --git a/modules/audio_coding/acm2/acm_receive_test.h b/modules/audio_coding/acm2/acm_receive_test.h
index 9d004c6..043092c 100644
--- a/modules/audio_coding/acm2/acm_receive_test.h
+++ b/modules/audio_coding/acm2/acm_receive_test.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_H_
#include <stddef.h> // for size_t
+
#include <memory>
#include <string>
diff --git a/modules/audio_coding/acm2/acm_receiver.cc b/modules/audio_coding/acm2/acm_receiver.cc
index 5ac71dd..6de45e7 100644
--- a/modules/audio_coding/acm2/acm_receiver.cc
+++ b/modules/audio_coding/acm2/acm_receiver.cc
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <string.h>
+
#include <cstdint>
#include <vector>
@@ -95,8 +96,7 @@
format = neteq_->GetDecoderFormat(payload_type);
}
if (!format) {
- RTC_LOG_F(LS_ERROR) << "Payload-type "
- << payload_type
+ RTC_LOG_F(LS_ERROR) << "Payload-type " << payload_type
<< " is not registered.";
return -1;
}
@@ -218,8 +218,8 @@
return neteq_->TargetDelayMs();
}
-absl::optional<std::pair<int, SdpAudioFormat>>
- AcmReceiver::LastDecoder() const {
+absl::optional<std::pair<int, SdpAudioFormat>> AcmReceiver::LastDecoder()
+ const {
rtc::CritScope lock(&crit_sect_);
if (!last_decoder_) {
return absl::nullopt;
diff --git a/modules/audio_coding/acm2/acm_receiver.h b/modules/audio_coding/acm2/acm_receiver.h
index 1f449a3..8d62312 100644
--- a/modules/audio_coding/acm2/acm_receiver.h
+++ b/modules/audio_coding/acm2/acm_receiver.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_
#include <stdint.h>
+
#include <map>
#include <memory>
#include <string>
diff --git a/modules/audio_coding/acm2/acm_receiver_unittest.cc b/modules/audio_coding/acm2/acm_receiver_unittest.cc
index 780026d..5d40fc1 100644
--- a/modules/audio_coding/acm2/acm_receiver_unittest.cc
+++ b/modules/audio_coding/acm2/acm_receiver_unittest.cc
@@ -314,14 +314,13 @@
{1, {"PCMA", 8000, 1}},
{2, {"ISAC", 32000, 1}},
{3, {"L16", 32000, 1}}};
- const std::map<int, int> cng_payload_types = {{8000, 100},
- {16000, 101},
- {32000, 102}};
+ const std::map<int, int> cng_payload_types = {
+ {8000, 100}, {16000, 101}, {32000, 102}};
{
std::map<int, SdpAudioFormat> receive_codecs = codecs;
for (const auto& cng_type : cng_payload_types) {
- receive_codecs.emplace(
- std::make_pair(cng_type.second, SdpAudioFormat("CN", cng_type.first, 1)));
+ receive_codecs.emplace(std::make_pair(
+ cng_type.second, SdpAudioFormat("CN", cng_type.first, 1)));
}
receiver_->SetCodecs(receive_codecs);
}
@@ -333,7 +332,7 @@
packet_sent_ = false;
InsertOnePacketOfSilence(
SetEncoder(0, codecs.at(0), cng_payload_types)); // Enough to test
- // with one codec.
+ // with one codec.
ASSERT_TRUE(packet_sent_);
EXPECT_EQ(AudioFrameType::kAudioFrameCN, last_frame_type_);
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc
index 741cef9..e500c78 100644
--- a/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/include/audio_coding_module.h"
#include <assert.h>
+
#include <algorithm>
#include <cstdint>
@@ -654,7 +655,7 @@
}
absl::optional<std::pair<int, SdpAudioFormat>>
- AudioCodingModuleImpl::ReceiveCodec() const {
+AudioCodingModuleImpl::ReceiveCodec() const {
rtc::CritScope lock(&acm_crit_sect_);
return receiver_.LastDecoder();
}
diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
index f30deed..ffa2bdc 100644
--- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/include/audio_coding_module.h"
+
#include <stdio.h>
#include <string.h>
+
#include <atomic>
#include <memory>
#include <vector>
@@ -28,7 +31,6 @@
#include "modules/audio_coding/codecs/g711/audio_decoder_pcm.h"
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
#include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
-#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/include/audio_coding_module_typedefs.h"
#include "modules/audio_coding/neteq/tools/audio_checksum.h"
#include "modules/audio_coding/neteq/tools/audio_loop.h"
@@ -54,9 +56,9 @@
#include "test/mock_audio_encoder.h"
#include "test/testsupport/file_utils.h"
+using ::testing::_;
using ::testing::AtLeast;
using ::testing::Invoke;
-using ::testing::_;
namespace webrtc {
diff --git a/modules/audio_coding/acm2/call_statistics_unittest.cc b/modules/audio_coding/acm2/call_statistics_unittest.cc
index 528708f..d7ac953 100644
--- a/modules/audio_coding/acm2/call_statistics_unittest.cc
+++ b/modules/audio_coding/acm2/call_statistics_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_coding/acm2/call_statistics.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc
index ff6ac01..11f93e6 100644
--- a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc
+++ b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h"
#include <stdint.h>
+
#include <utility>
#include <vector>
diff --git a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h
index fc2358b..e7cd056 100644
--- a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h
+++ b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_AUDIO_NETWORK_ADAPTOR_IMPL_H_
#include <stdio.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc
index 76531d0..9612996 100644
--- a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h"
+
#include <utility>
#include <vector>
#include "logging/rtc_event_log/events/rtc_event.h"
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
-#include "modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_controller.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_controller_manager.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h"
diff --git a/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc b/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc
index f077357..76f52ad 100644
--- a/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/bitrate_controller_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_coding/audio_network_adaptor/bitrate_controller.h"
+
#include "rtc_base/numerics/safe_conversions.h"
#include "test/field_trial.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/audio_network_adaptor/channel_controller.cc b/modules/audio_coding/audio_network_adaptor/channel_controller.cc
index a1c30db..2f5af67 100644
--- a/modules/audio_coding/audio_network_adaptor/channel_controller.cc
+++ b/modules/audio_coding/audio_network_adaptor/channel_controller.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/channel_controller.h"
+
#include <algorithm>
-#include "modules/audio_coding/audio_network_adaptor/channel_controller.h"
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc b/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc
index bfa6f01..21504bc 100644
--- a/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/channel_controller_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/channel_controller.h"
+
#include <memory>
-#include "modules/audio_coding/audio_network_adaptor/channel_controller.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc b/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc
index ce47699..7fa4096 100644
--- a/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/controller_manager.h"
+
#include <string>
#include <utility>
-#include "modules/audio_coding/audio_network_adaptor/controller_manager.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_controller.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h"
#include "rtc_base/fake_clock.h"
@@ -129,8 +130,7 @@
TEST(ControllerManagerTest, ControllersWithoutCharPointAtEndAndInDefaultOrder) {
auto states = CreateControllerManager();
- CheckControllersOrder(&states, 0,
- 0.0,
+ CheckControllersOrder(&states, 0, 0.0,
{kNumControllers - 2, kNumControllers - 1, -1, -1});
}
diff --git a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc
index 805df0a..6daefa5 100644
--- a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc
+++ b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc
@@ -33,9 +33,9 @@
#if WEBRTC_ENABLE_PROTOBUF
namespace {
+using audio_network_adaptor::debug_dump::EncoderRuntimeConfig;
using audio_network_adaptor::debug_dump::Event;
using audio_network_adaptor::debug_dump::NetworkMetrics;
-using audio_network_adaptor::debug_dump::EncoderRuntimeConfig;
void DumpEventToFile(const Event& event, FileWrapper* dump_file) {
RTC_CHECK(dump_file->is_open());
diff --git a/modules/audio_coding/audio_network_adaptor/dtx_controller.cc b/modules/audio_coding/audio_network_adaptor/dtx_controller.cc
index cbfea95..48384c9 100644
--- a/modules/audio_coding/audio_network_adaptor/dtx_controller.cc
+++ b/modules/audio_coding/audio_network_adaptor/dtx_controller.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_coding/audio_network_adaptor/dtx_controller.h"
+
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc b/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc
index 67bf9e5..567df6f 100644
--- a/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/dtx_controller_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/dtx_controller.h"
+
#include <memory>
-#include "modules/audio_coding/audio_network_adaptor/dtx_controller.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/event_log_writer.cc b/modules/audio_coding/audio_network_adaptor/event_log_writer.cc
index 7925b89..7aa522e 100644
--- a/modules/audio_coding/audio_network_adaptor/event_log_writer.cc
+++ b/modules/audio_coding/audio_network_adaptor/event_log_writer.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/event_log_writer.h"
+
#include <math.h>
+
#include <algorithm>
#include <cstdlib>
#include <utility>
@@ -18,7 +21,6 @@
#include "logging/rtc_event_log/events/rtc_event.h"
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
#include "logging/rtc_event_log/rtc_event_log.h"
-#include "modules/audio_coding/audio_network_adaptor/event_log_writer.h"
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc b/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
index 5d5e5df..2c34453 100644
--- a/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/event_log_writer_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/event_log_writer.h"
+
#include <memory>
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
-#include "modules/audio_coding/audio_network_adaptor/event_log_writer.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc b/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc
index d3f54ee..d95cbce 100644
--- a/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc
@@ -8,17 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h"
+
#include <utility>
#include "common_audio/mocks/mock_smoothing_filter.h"
-#include "modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.h"
#include "test/gtest.h"
namespace webrtc {
+using ::testing::_;
using ::testing::NiceMock;
using ::testing::Return;
-using ::testing::_;
namespace {
diff --git a/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based_unittest.cc b/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based_unittest.cc
index 4438a23..c51d561 100644
--- a/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based.h"
+
#include <random>
#include <utility>
-#include "modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/audio_network_adaptor/frame_length_controller.h b/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
index e182247..0268ddc 100644
--- a/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
+++ b/modules/audio_coding/audio_network_adaptor/frame_length_controller.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTROLLER_H_
#include <stddef.h>
+
#include <map>
#include <set>
diff --git a/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc b/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc
index 8d6d815..6709336 100644
--- a/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/frame_length_controller.h"
+
#include <memory>
#include <utility>
-#include "modules/audio_coding/audio_network_adaptor/frame_length_controller.h"
#include "test/gtest.h"
namespace webrtc {
@@ -209,8 +210,7 @@
CreateController(CreateChangeCriteriaFor20msAnd60ms(), {20}, 20);
// Use a low uplink bandwidth and a low uplink packet loss fraction that would
// cause frame length to increase if receiver frame length included 60ms.
- UpdateNetworkMetrics(controller.get(),
- kFl20msTo60msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl20msTo60msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 20);
@@ -219,8 +219,7 @@
TEST(FrameLengthControllerTest, Maintain20MsOnMediumUplinkBandwidth) {
auto controller =
CreateController(CreateChangeCriteriaFor20msAnd60ms(), {20, 60}, 20);
- UpdateNetworkMetrics(controller.get(),
- kMediumBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kMediumBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 20);
@@ -231,18 +230,15 @@
CreateController(CreateChangeCriteriaFor20msAnd60ms(), {20, 60}, 20);
// Use a low uplink bandwidth that would cause frame length to increase if
// uplink packet loss fraction was low.
- UpdateNetworkMetrics(controller.get(),
- kFl20msTo60msBandwidthBps,
- kMediumPacketLossFraction,
- kOverheadBytesPerPacket);
+ UpdateNetworkMetrics(controller.get(), kFl20msTo60msBandwidthBps,
+ kMediumPacketLossFraction, kOverheadBytesPerPacket);
CheckDecision(controller.get(), 20);
}
TEST(FrameLengthControllerTest, Maintain60MsWhenNo120msCriteriaIsSet) {
auto controller =
CreateController(CreateChangeCriteriaFor20msAnd60ms(), {20, 60, 120}, 60);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
@@ -307,13 +303,11 @@
auto controller = CreateController(CreateChangeCriteriaFor20ms60msAnd120ms(),
{20, 60, 120}, 20);
// It takes two steps for frame length to go from 20ms to 120ms.
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 120);
@@ -322,13 +316,11 @@
TEST(FrameLengthControllerTest, Stall60MsIf120MsNotInReceiverFrameLengthRange) {
auto controller =
CreateController(CreateChangeCriteriaFor20ms60msAnd120ms(), {20, 60}, 20);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
@@ -337,38 +329,31 @@
TEST(FrameLengthControllerTest, CheckBehaviorOnChangingNetworkMetrics) {
auto controller = CreateController(CreateChangeCriteriaFor20ms60msAnd120ms(),
{20, 60, 120}, 20);
- UpdateNetworkMetrics(controller.get(),
- kMediumBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kMediumBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 20);
- UpdateNetworkMetrics(controller.get(),
- kFl20msTo60msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl20msTo60msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
- kMediumPacketLossFraction,
- kOverheadBytesPerPacket);
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
+ kMediumPacketLossFraction, kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
- UpdateNetworkMetrics(controller.get(),
- kFl60msTo120msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl60msTo120msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 120);
- UpdateNetworkMetrics(controller.get(),
- kFl120msTo60msBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kFl120msTo60msBandwidthBps,
kFlIncreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 60);
- UpdateNetworkMetrics(controller.get(),
- kMediumBandwidthBps,
+ UpdateNetworkMetrics(controller.get(), kMediumBandwidthBps,
kFlDecreasingPacketLossFraction,
kOverheadBytesPerPacket);
CheckDecision(controller.get(), 20);
diff --git a/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc b/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc
index 0375e76..9984049 100644
--- a/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc
+++ b/modules/audio_coding/audio_network_adaptor/util/threshold_curve_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
+
#include <memory>
-#include "modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
#include "test/gtest.h"
// A threshold curve divides 2D space into three domains - below, on and above
diff --git a/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc b/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc
index 9b36dfd..968c118 100644
--- a/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc
+++ b/modules/audio_coding/codecs/builtin_audio_decoder_factory_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/audio_codecs/builtin_audio_decoder_factory.h"
+
#include <memory>
-#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc b/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc
index a548be8..108b1c1 100644
--- a/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc
+++ b/modules/audio_coding/codecs/builtin_audio_encoder_factory_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/audio_codecs/builtin_audio_encoder_factory.h"
+
#include <limits>
#include <memory>
#include <vector>
-#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng.h b/modules/audio_coding/codecs/cng/audio_encoder_cng.h
index 2ef3236..8a11834 100644
--- a/modules/audio_coding/codecs/cng/audio_encoder_cng.h
+++ b/modules/audio_coding/codecs/cng/audio_encoder_cng.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_CODECS_CNG_AUDIO_ENCODER_CNG_H_
#include <stddef.h>
+
#include <memory>
#include "api/audio_codecs/audio_encoder.h"
diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc b/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
index 3ecefd4..6dda862 100644
--- a/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
+++ b/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
@@ -8,21 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/codecs/cng/audio_encoder_cng.h"
+
#include <memory>
#include <vector>
#include "common_audio/vad/mock/mock_vad.h"
-#include "modules/audio_coding/codecs/cng/audio_encoder_cng.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
#include "test/mock_audio_encoder.h"
-using ::testing::Return;
using ::testing::_;
-using ::testing::SetArgPointee;
using ::testing::InSequence;
using ::testing::Invoke;
+using ::testing::Return;
+using ::testing::SetArgPointee;
namespace webrtc {
diff --git a/modules/audio_coding/codecs/cng/webrtc_cng.h b/modules/audio_coding/codecs/cng/webrtc_cng.h
index 6ff7529..563f676 100644
--- a/modules/audio_coding/codecs/cng/webrtc_cng.h
+++ b/modules/audio_coding/codecs/cng/webrtc_cng.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_CODECS_CNG_WEBRTC_CNG_H_
#include <stdint.h>
+
#include <cstddef>
#include "api/array_view.h"
diff --git a/modules/audio_coding/codecs/g711/audio_decoder_pcm.h b/modules/audio_coding/codecs/g711/audio_decoder_pcm.h
index 8fae71c..6185918 100644
--- a/modules/audio_coding/codecs/g711/audio_decoder_pcm.h
+++ b/modules/audio_coding/codecs/g711/audio_decoder_pcm.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/audio_codecs/audio_decoder.h"
diff --git a/modules/audio_coding/codecs/g722/audio_decoder_g722.cc b/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
index 4de55a0..f02ca7f 100644
--- a/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
+++ b/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/codecs/g722/audio_decoder_g722.h"
#include <string.h>
+
#include <utility>
#include "modules/audio_coding/codecs/g722/g722_interface.h"
diff --git a/modules/audio_coding/codecs/isac/fix/include/isacfix.h b/modules/audio_coding/codecs/isac/fix/include/isacfix.h
index 8fcfebb..4c95bfd 100644
--- a/modules/audio_coding/codecs/isac/fix/include/isacfix.h
+++ b/modules/audio_coding/codecs/isac/fix/include/isacfix.h
@@ -15,7 +15,9 @@
#include "modules/audio_coding/codecs/isac/bandwidth_info.h"
-typedef struct { void* dummy; } ISACFIX_MainStruct;
+typedef struct {
+ void* dummy;
+} ISACFIX_MainStruct;
#if defined(__cplusplus)
extern "C" {
diff --git a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
index 554ec0c..82793f1 100644
--- a/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
+++ b/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.h"
+
#include "system_wrappers/include/cpu_features_wrapper.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/codecs/isac/fix/source/structs.h b/modules/audio_coding/codecs/isac/fix/source/structs.h
index 59226ac..89375fb 100644
--- a/modules/audio_coding/codecs/isac/fix/source/structs.h
+++ b/modules/audio_coding/codecs/isac/fix/source/structs.h
@@ -167,12 +167,10 @@
uint32_t prevSendTime; /* Send time for previous packet, from RTP header */
uint32_t prevArrivalTime; /* Arrival time for previous packet (in ms using
timeGetTime()) */
- uint16_t
- prevRtpRate; /* rate of previous packet, derived from RTP timestamps (in
- bits/s) */
- uint32_t
- lastUpdate; /* Time since the last update of the Bottle Neck estimate (in
- samples) */
+ uint16_t prevRtpRate; /* rate of previous packet, derived from RTP timestamps
+ (in bits/s) */
+ uint32_t lastUpdate; /* Time since the last update of the Bottle Neck estimate
+ (in samples) */
uint32_t lastReduction; /* Time sinse the last reduction (in samples) */
int32_t countUpdates; /* How many times the estimate was update in the
beginning */
@@ -197,9 +195,8 @@
uint32_t sendBwAvg; /* The estimated bottle neck rate from here to there (in
bits/s) */
- int32_t
- sendMaxDelayAvg; /* The estimated mean absolute jitter value, as seen on
- the other siee (in ms) */
+ int32_t sendMaxDelayAvg; /* The estimated mean absolute jitter value, as seen
+ on the other siee (in ms) */
int16_t countRecPkts; /* number of packets received since last update */
int16_t highSpeedRec; /* flag for marking that a high speed network has been
@@ -308,8 +305,8 @@
packet */
int16_t payloadLimitBytes60; /* Maximum allowed number of bits for a 30 msec
packet */
- int16_t maxPayloadBytes; /* Maximum allowed number of bits for both 30 and 60
- msec packet */
+ int16_t maxPayloadBytes; /* Maximum allowed number of bits for both 30 and 60
+ msec packet */
int16_t maxRateInBytes; /* Maximum allowed rate in bytes per 30 msec packet */
int16_t enforceFrameSize; /* If set iSAC will never change packet size */
@@ -339,8 +336,8 @@
} ISACFIX_SubStruct;
typedef struct {
- int32_t lpcGains
- [12]; /* 6 lower-band & 6 upper-band we may need to double it for 60*/
+ int32_t lpcGains[12]; /* 6 lower-band & 6 upper-band we may need to double it
+ for 60*/
/* */
uint32_t W_upper; /* Upper boundary of interval W */
uint32_t streamval;
diff --git a/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_unittest.cc b/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_unittest.cc
index 87ae0e0..07bab05 100644
--- a/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_unittest.cc
+++ b/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
+
#include <limits>
-#include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc b/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
index 6d9b013..c98b21d 100644
--- a/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
+++ b/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
@@ -7,9 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/codecs/isac/main/include/isac.h"
+
#include <string>
-#include "modules/audio_coding/codecs/isac/main/include/isac.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/modules/audio_coding/codecs/isac/main/source/lpc_tables.h b/modules/audio_coding/codecs/isac/main/source/lpc_tables.h
index 2d92dfa..56ff22c 100644
--- a/modules/audio_coding/codecs/isac/main/source/lpc_tables.h
+++ b/modules/audio_coding/codecs/isac/main/source/lpc_tables.h
@@ -18,9 +18,8 @@
#ifndef MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_
#define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_
-#include "modules/audio_coding/codecs/isac/main/source/structs.h"
-
#include "modules/audio_coding/codecs/isac/main/source/settings.h"
+#include "modules/audio_coding/codecs/isac/main/source/structs.h"
#define KLT_STEPSIZE 1.00000000
#define KLT_NUM_AVG_GAIN 0
diff --git a/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc b/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
index 188e105..934794d 100644
--- a/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
+++ b/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+
#include <iostream>
/* include API */
diff --git a/modules/audio_coding/codecs/legacy_encoded_audio_frame.h b/modules/audio_coding/codecs/legacy_encoded_audio_frame.h
index 41b08f7..21da136 100644
--- a/modules/audio_coding/codecs/legacy_encoded_audio_frame.h
+++ b/modules/audio_coding/codecs/legacy_encoded_audio_frame.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h b/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h
index 5e5e6d4..efc3f0d 100644
--- a/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h
+++ b/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_DECODER_MULTI_CHANNEL_OPUS_IMPL_H_
#include <stddef.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_coding/codecs/opus/audio_decoder_opus.h b/modules/audio_coding/codecs/opus/audio_decoder_opus.h
index 3a2bb71..c792722 100644
--- a/modules/audio_coding/codecs/opus/audio_decoder_opus.h
+++ b/modules/audio_coding/codecs/opus/audio_decoder_opus.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/audio_codecs/audio_decoder.h"
diff --git a/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc b/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
index ab6e7db..8ae9ee7 100644
--- a/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
+++ b/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/audio_codecs/opus/audio_encoder_opus.h"
+
#include <array>
#include <memory>
#include <utility>
#include "absl/memory/memory.h"
-#include "api/audio_codecs/opus/audio_encoder_opus.h"
#include "common_audio/mocks/mock_smoothing_filter.h"
#include "modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h"
#include "modules/audio_coding/codecs/opus/audio_encoder_opus.h"
diff --git a/modules/audio_coding/codecs/opus/opus_fec_test.cc b/modules/audio_coding/codecs/opus/opus_fec_test.cc
index 287213c..7f13380 100644
--- a/modules/audio_coding/codecs/opus/opus_fec_test.cc
+++ b/modules/audio_coding/codecs/opus/opus_fec_test.cc
@@ -15,9 +15,9 @@
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
+using std::get;
using std::string;
using std::tuple;
-using std::get;
using ::testing::TestWithParam;
namespace webrtc {
diff --git a/modules/audio_coding/codecs/opus/opus_unittest.cc b/modules/audio_coding/codecs/opus/opus_unittest.cc
index 8a5bb6a..f0f2ef0 100644
--- a/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -101,9 +101,9 @@
} // namespace
using test::AudioLoop;
+using ::testing::Combine;
using ::testing::TestWithParam;
using ::testing::Values;
-using ::testing::Combine;
// Maximum number of bytes in output bitstream.
const size_t kMaxBytes = 2000;
diff --git a/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc b/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc
index 5c44bc5..6dbc8ee 100644
--- a/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc
+++ b/modules/audio_coding/codecs/opus/test/audio_ring_buffer_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include "modules/audio_coding/codecs/opus/test/audio_ring_buffer.h"
+#include <memory>
+
#include "common_audio/channel_buffer.h"
#include "test/gtest.h"
@@ -29,7 +29,7 @@
const size_t num_channels = input.num_channels();
const size_t total_frames = input.num_frames();
AudioRingBuffer buf(num_channels, buffer_frames);
- std::unique_ptr<float* []> slice(new float*[num_channels]);
+ std::unique_ptr<float*[]> slice(new float*[num_channels]);
size_t input_pos = 0;
size_t output_pos = 0;
diff --git a/modules/audio_coding/codecs/opus/test/blocker_unittest.cc b/modules/audio_coding/codecs/opus/test/blocker_unittest.cc
index bfdb2e6..9c8e789 100644
--- a/modules/audio_coding/codecs/opus/test/blocker_unittest.cc
+++ b/modules/audio_coding/codecs/opus/test/blocker_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include "modules/audio_coding/codecs/opus/test/blocker.h"
+#include <memory>
+
#include "rtc_base/arraysize.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
index 0334104..f08c4a6 100644
--- a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
+++ b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/audio_codecs/audio_decoder.h"
diff --git a/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc b/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc
index 8f8bba5..ecf91b4 100644
--- a/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc
+++ b/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
#include <stdint.h>
+
#include <initializer_list>
namespace webrtc {
diff --git a/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
index 124e811..a0db045 100644
--- a/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
+++ b/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
#include <string.h>
+
#include <utility>
#include <vector>
diff --git a/modules/audio_coding/codecs/red/audio_encoder_copy_red.h b/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
index f05de19..448df27 100644
--- a/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
+++ b/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc b/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
index 0f5a811..22e9a7f 100644
--- a/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
+++ b/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
@@ -8,21 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
+
#include <memory>
#include <vector>
-#include "modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
#include "test/mock_audio_encoder.h"
-using ::testing::Return;
using ::testing::_;
-using ::testing::SetArgPointee;
using ::testing::InSequence;
using ::testing::Invoke;
using ::testing::MockFunction;
+using ::testing::Return;
+using ::testing::SetArgPointee;
namespace webrtc {
diff --git a/modules/audio_coding/include/audio_coding_module.h b/modules/audio_coding/include/audio_coding_module.h
index 61fa541..d711cca 100644
--- a/modules/audio_coding/include/audio_coding_module.h
+++ b/modules/audio_coding/include/audio_coding_module.h
@@ -225,8 +225,8 @@
// the last received payload.
// An empty Optional if no payload has yet been received.
//
- virtual absl::optional<std::pair<int, SdpAudioFormat>>
- ReceiveCodec() const = 0;
+ virtual absl::optional<std::pair<int, SdpAudioFormat>> ReceiveCodec()
+ const = 0;
///////////////////////////////////////////////////////////////////////////
// int32_t IncomingPacket()
diff --git a/modules/audio_coding/neteq/audio_multi_vector.h b/modules/audio_coding/neteq/audio_multi_vector.h
index a21bf57..0bb0b28 100644
--- a/modules/audio_coding/neteq/audio_multi_vector.h
+++ b/modules/audio_coding/neteq/audio_multi_vector.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <string.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/audio_coding/neteq/audio_vector.h b/modules/audio_coding/neteq/audio_vector.h
index c8279da..a257586 100644
--- a/modules/audio_coding/neteq/audio_vector.h
+++ b/modules/audio_coding/neteq/audio_vector.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_AUDIO_VECTOR_H_
#include <string.h>
+
#include <cstdint>
#include <memory>
diff --git a/modules/audio_coding/neteq/background_noise.h b/modules/audio_coding/neteq/background_noise.h
index 5191179..631db0d 100644
--- a/modules/audio_coding/neteq/background_noise.h
+++ b/modules/audio_coding/neteq/background_noise.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_BACKGROUND_NOISE_H_
#include <string.h> // size_t
+
#include <memory>
#include "api/array_view.h"
diff --git a/modules/audio_coding/neteq/buffer_level_filter.cc b/modules/audio_coding/neteq/buffer_level_filter.cc
index 144da63..d238665 100644
--- a/modules/audio_coding/neteq/buffer_level_filter.cc
+++ b/modules/audio_coding/neteq/buffer_level_filter.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/buffer_level_filter.h"
#include <stdint.h>
+
#include <algorithm>
#include "rtc_base/numerics/safe_conversions.h"
diff --git a/modules/audio_coding/neteq/comfort_noise.cc b/modules/audio_coding/neteq/comfort_noise.cc
index cb2b74d..a21cdda 100644
--- a/modules/audio_coding/neteq/comfort_noise.cc
+++ b/modules/audio_coding/neteq/comfort_noise.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/comfort_noise.h"
#include <assert.h>
+
#include <cstdint>
#include <memory>
diff --git a/modules/audio_coding/neteq/decision_logic.cc b/modules/audio_coding/neteq/decision_logic.cc
index fc255e5..e4a32fb 100644
--- a/modules/audio_coding/neteq/decision_logic.cc
+++ b/modules/audio_coding/neteq/decision_logic.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <stdio.h>
+
#include <string>
#include "absl/types/optional.h"
@@ -201,9 +202,9 @@
decoder_frame_length, sample_rate_, estimate_dtx_delay_);
if ((prev_mode == kModeExpand || prev_mode == kModeCodecPlc) &&
expand.MuteFactor(0) < 16384 / 2 &&
- current_span < static_cast<size_t>(delay_manager_->TargetLevel() *
- packet_length_samples_ *
- kPostponeDecodingLevel / 100)>> 8 &&
+ current_span<static_cast<size_t>(delay_manager_->TargetLevel() *
+ packet_length_samples_ *
+ kPostponeDecodingLevel / 100)>> 8 &&
!packet_buffer_.ContainsDtxOrCngPacket(decoder_database_)) {
return kExpand;
}
diff --git a/modules/audio_coding/neteq/decision_logic_unittest.cc b/modules/audio_coding/neteq/decision_logic_unittest.cc
index 5c3d489..82f86c0 100644
--- a/modules/audio_coding/neteq/decision_logic_unittest.cc
+++ b/modules/audio_coding/neteq/decision_logic_unittest.cc
@@ -11,6 +11,7 @@
// Unit tests for DecisionLogic class and derived classes.
#include "modules/audio_coding/neteq/decision_logic.h"
+
#include "modules/audio_coding/neteq/buffer_level_filter.h"
#include "modules/audio_coding/neteq/decoder_database.h"
#include "modules/audio_coding/neteq/delay_manager.h"
diff --git a/modules/audio_coding/neteq/decoder_database.cc b/modules/audio_coding/neteq/decoder_database.cc
index 2049569..e755e7b 100644
--- a/modules/audio_coding/neteq/decoder_database.cc
+++ b/modules/audio_coding/neteq/decoder_database.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/decoder_database.h"
#include <stddef.h>
+
#include <cstdint>
#include <list>
#include <type_traits>
diff --git a/modules/audio_coding/neteq/delay_manager.cc b/modules/audio_coding/neteq/delay_manager.cc
index 3a74896..bdaa28c 100644
--- a/modules/audio_coding/neteq/delay_manager.cc
+++ b/modules/audio_coding/neteq/delay_manager.cc
@@ -13,6 +13,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+
#include <algorithm>
#include <numeric>
#include <string>
@@ -30,7 +31,7 @@
namespace {
-constexpr int kLimitProbability = 1020054733; // 19/20 in Q30.
+constexpr int kLimitProbability = 1020054733; // 19/20 in Q30.
constexpr int kMinBaseMinimumDelayMs = 0;
constexpr int kMaxBaseMinimumDelayMs = 10000;
constexpr int kIatFactor = 32745; // 0.9993 in Q15.
diff --git a/modules/audio_coding/neteq/delay_manager.h b/modules/audio_coding/neteq/delay_manager.h
index 3075bfb..adefea1 100644
--- a/modules/audio_coding/neteq/delay_manager.h
+++ b/modules/audio_coding/neteq/delay_manager.h
@@ -191,13 +191,13 @@
// detection and streaming mode (Q0).
// TODO(turajs) change the comment according to the implementation of
// minimum-delay.
- int target_level_; // Currently preferred buffer level in (fractions)
- // of packets (Q8), before adding any extra delay.
- int packet_len_ms_; // Length of audio in each incoming packet [ms].
- uint16_t last_seq_no_; // Sequence number for last received packet.
- uint32_t last_timestamp_; // Timestamp for the last received packet.
- int minimum_delay_ms_; // Externally set minimum delay.
- int maximum_delay_ms_; // Externally set maximum allowed delay.
+ int target_level_; // Currently preferred buffer level in (fractions)
+ // of packets (Q8), before adding any extra delay.
+ int packet_len_ms_; // Length of audio in each incoming packet [ms].
+ uint16_t last_seq_no_; // Sequence number for last received packet.
+ uint32_t last_timestamp_; // Timestamp for the last received packet.
+ int minimum_delay_ms_; // Externally set minimum delay.
+ int maximum_delay_ms_; // Externally set maximum allowed delay.
DelayPeakDetector& peak_detector_;
int last_pack_cng_or_dtmf_;
const bool frame_length_change_experiment_;
diff --git a/modules/audio_coding/neteq/delay_manager_unittest.cc b/modules/audio_coding/neteq/delay_manager_unittest.cc
index 1004261..a8e2b3d 100644
--- a/modules/audio_coding/neteq/delay_manager_unittest.cc
+++ b/modules/audio_coding/neteq/delay_manager_unittest.cc
@@ -39,8 +39,8 @@
constexpr int kForgetFactor = 32745;
} // namespace
-using ::testing::Return;
using ::testing::_;
+using ::testing::Return;
class DelayManagerTest : public ::testing::Test {
protected:
@@ -683,7 +683,7 @@
EXPECT_EQ(DelayManager::HistogramMode::RELATIVE_ARRIVAL_DELAY,
dm_->histogram_mode());
EXPECT_EQ(kDefaultHistogramQuantile,
- dm_->histogram_quantile()); // 0.95 in Q30.
+ dm_->histogram_quantile()); // 0.95 in Q30.
EXPECT_EQ(
kForgetFactor,
dm_->histogram()->base_forget_factor_for_testing()); // 0.9993 in Q15.
@@ -696,7 +696,7 @@
EXPECT_EQ(DelayManager::HistogramMode::INTER_ARRIVAL_TIME,
dm_->histogram_mode());
EXPECT_EQ(kDefaultHistogramQuantile,
- dm_->histogram_quantile()); // 0.95 in Q30.
+ dm_->histogram_quantile()); // 0.95 in Q30.
EXPECT_EQ(
kForgetFactor,
dm_->histogram()->base_forget_factor_for_testing()); // 0.9993 in Q15.
diff --git a/modules/audio_coding/neteq/delay_peak_detector.h b/modules/audio_coding/neteq/delay_peak_detector.h
index 8cd198d..15db189 100644
--- a/modules/audio_coding/neteq/delay_peak_detector.h
+++ b/modules/audio_coding/neteq/delay_peak_detector.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <string.h>
+
#include <list>
#include <memory>
diff --git a/modules/audio_coding/neteq/dtmf_buffer.h b/modules/audio_coding/neteq/dtmf_buffer.h
index a994e3a..6bf75e1 100644
--- a/modules/audio_coding/neteq/dtmf_buffer.h
+++ b/modules/audio_coding/neteq/dtmf_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include "rtc_base/constructor_magic.h"
diff --git a/modules/audio_coding/neteq/expand.h b/modules/audio_coding/neteq/expand.h
index 9fc11eb..45d78d0 100644
--- a/modules/audio_coding/neteq/expand.h
+++ b/modules/audio_coding/neteq/expand.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
#include <assert.h>
+
#include <memory>
#include "modules/audio_coding/neteq/audio_vector.h"
diff --git a/modules/audio_coding/neteq/expand_uma_logger.cc b/modules/audio_coding/neteq/expand_uma_logger.cc
index 01c2dab..5db6d21 100644
--- a/modules/audio_coding/neteq/expand_uma_logger.cc
+++ b/modules/audio_coding/neteq/expand_uma_logger.cc
@@ -8,6 +8,7 @@
*/
#include "modules/audio_coding/neteq/expand_uma_logger.h"
+
#include "rtc_base/checks.h"
#include "system_wrappers/include/metrics.h"
diff --git a/modules/audio_coding/neteq/expand_uma_logger.h b/modules/audio_coding/neteq/expand_uma_logger.h
index 7cb11b1..1139bb6 100644
--- a/modules/audio_coding/neteq/expand_uma_logger.h
+++ b/modules/audio_coding/neteq/expand_uma_logger.h
@@ -11,6 +11,7 @@
#define MODULES_AUDIO_CODING_NETEQ_EXPAND_UMA_LOGGER_H_
#include <stdint.h>
+
#include <memory>
#include <string>
diff --git a/modules/audio_coding/neteq/histogram.cc b/modules/audio_coding/neteq/histogram.cc
index fc0801e..99ea9aa 100644
--- a/modules/audio_coding/neteq/histogram.cc
+++ b/modules/audio_coding/neteq/histogram.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/neteq/histogram.h"
+
#include <algorithm>
#include <cstdlib>
#include <numeric>
#include "absl/types/optional.h"
-#include "modules/audio_coding/neteq/histogram.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
diff --git a/modules/audio_coding/neteq/histogram_unittest.cc b/modules/audio_coding/neteq/histogram_unittest.cc
index 6255a0c..4df8b48 100644
--- a/modules/audio_coding/neteq/histogram_unittest.cc
+++ b/modules/audio_coding/neteq/histogram_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/neteq/histogram.h"
+
#include <cmath>
-#include "modules/audio_coding/neteq/histogram.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h b/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
index 031195c..d76afa4 100644
--- a/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
+++ b/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_BUFFER_LEVEL_FILTER_H_
#include "modules/audio_coding/neteq/buffer_level_filter.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_decoder_database.h b/modules/audio_coding/neteq/mock/mock_decoder_database.h
index d1db213..d83dc7f 100644
--- a/modules/audio_coding/neteq/mock/mock_decoder_database.h
+++ b/modules/audio_coding/neteq/mock/mock_decoder_database.h
@@ -14,7 +14,6 @@
#include <string>
#include "modules/audio_coding/neteq/decoder_database.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h b/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
index f7f0465..82706f8 100644
--- a/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
+++ b/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DELAY_PEAK_DETECTOR_H_
#include "modules/audio_coding/neteq/delay_peak_detector.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h b/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
index 11b571f..d9fe5d4 100644
--- a/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
+++ b/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_BUFFER_H_
#include "modules/audio_coding/neteq/dtmf_buffer.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h b/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
index be4b7b5..eea8bee 100644
--- a/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
+++ b/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_
#include "modules/audio_coding/neteq/dtmf_tone_generator.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_expand.h b/modules/audio_coding/neteq/mock/mock_expand.h
index aed0164..286325b 100644
--- a/modules/audio_coding/neteq/mock/mock_expand.h
+++ b/modules/audio_coding/neteq/mock/mock_expand.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
#include "modules/audio_coding/neteq/expand.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_histogram.h b/modules/audio_coding/neteq/mock/mock_histogram.h
index 09b1b89..91ae18f 100644
--- a/modules/audio_coding/neteq/mock/mock_histogram.h
+++ b/modules/audio_coding/neteq/mock/mock_histogram.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_HISTOGRAM_H_
#include "modules/audio_coding/neteq/histogram.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_packet_buffer.h b/modules/audio_coding/neteq/mock/mock_packet_buffer.h
index b477b1a..7efeb15 100644
--- a/modules/audio_coding/neteq/mock/mock_packet_buffer.h
+++ b/modules/audio_coding/neteq/mock/mock_packet_buffer.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_PACKET_BUFFER_H_
#include "modules/audio_coding/neteq/packet_buffer.h"
-
#include "test/gmock.h"
namespace webrtc {
@@ -23,10 +22,8 @@
: PacketBuffer(max_number_of_packets, tick_timer) {}
virtual ~MockPacketBuffer() { Die(); }
MOCK_METHOD0(Die, void());
- MOCK_METHOD0(Flush,
- void());
- MOCK_CONST_METHOD0(Empty,
- bool());
+ MOCK_METHOD0(Flush, void());
+ MOCK_CONST_METHOD0(Empty, bool());
int InsertPacket(Packet&& packet, StatisticsCalculator* stats) {
return InsertPacketWrapped(&packet, stats);
}
@@ -41,12 +38,10 @@
absl::optional<uint8_t>* current_rtp_payload_type,
absl::optional<uint8_t>* current_cng_rtp_payload_type,
StatisticsCalculator* stats));
- MOCK_CONST_METHOD1(NextTimestamp,
- int(uint32_t* next_timestamp));
+ MOCK_CONST_METHOD1(NextTimestamp, int(uint32_t* next_timestamp));
MOCK_CONST_METHOD2(NextHigherTimestamp,
- int(uint32_t timestamp, uint32_t* next_timestamp));
- MOCK_CONST_METHOD0(PeekNextPacket,
- const Packet*());
+ int(uint32_t timestamp, uint32_t* next_timestamp));
+ MOCK_CONST_METHOD0(PeekNextPacket, const Packet*());
MOCK_METHOD0(GetNextPacket, absl::optional<Packet>());
MOCK_METHOD1(DiscardNextPacket, int(StatisticsCalculator* stats));
MOCK_METHOD3(DiscardOldPackets,
@@ -55,12 +50,9 @@
StatisticsCalculator* stats));
MOCK_METHOD2(DiscardAllOldPackets,
void(uint32_t timestamp_limit, StatisticsCalculator* stats));
- MOCK_CONST_METHOD0(NumPacketsInBuffer,
- size_t());
- MOCK_METHOD1(IncrementWaitingTimes,
- void(int));
- MOCK_CONST_METHOD0(current_memory_bytes,
- int());
+ MOCK_CONST_METHOD0(NumPacketsInBuffer, size_t());
+ MOCK_METHOD1(IncrementWaitingTimes, void(int));
+ MOCK_CONST_METHOD0(current_memory_bytes, int());
};
} // namespace webrtc
diff --git a/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h b/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h
index 426c467..68fd356 100644
--- a/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h
+++ b/modules/audio_coding/neteq/mock/mock_red_payload_splitter.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_RED_PAYLOAD_SPLITTER_H_
#include "modules/audio_coding/neteq/red_payload_splitter.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/mock/mock_statistics_calculator.h b/modules/audio_coding/neteq/mock/mock_statistics_calculator.h
index aedb1df..086c7c5 100644
--- a/modules/audio_coding/neteq/mock/mock_statistics_calculator.h
+++ b/modules/audio_coding/neteq/mock/mock_statistics_calculator.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_STATISTICS_CALCULATOR_H_
#include "modules/audio_coding/neteq/statistics_calculator.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/nack_tracker.cc b/modules/audio_coding/neteq/nack_tracker.cc
index e3ecfea..8358769 100644
--- a/modules/audio_coding/neteq/nack_tracker.cc
+++ b/modules/audio_coding/neteq/nack_tracker.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/nack_tracker.h"
#include <assert.h>
+
#include <cstdint>
#include <utility>
diff --git a/modules/audio_coding/neteq/nack_tracker.h b/modules/audio_coding/neteq/nack_tracker.h
index d7c6b08..5a56734 100644
--- a/modules/audio_coding/neteq/nack_tracker.h
+++ b/modules/audio_coding/neteq/nack_tracker.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc
index 62184b0..fc47d91 100644
--- a/modules/audio_coding/neteq/neteq_impl.cc
+++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/neteq_impl.h"
#include <assert.h>
+
#include <algorithm>
#include <cstdint>
#include <cstring>
diff --git a/modules/audio_coding/neteq/neteq_impl.h b/modules/audio_coding/neteq/neteq_impl.h
index d529c9e..9e1af10 100644
--- a/modules/audio_coding/neteq/neteq_impl.h
+++ b/modules/audio_coding/neteq/neteq_impl.h
@@ -64,13 +64,7 @@
class NetEqImpl : public webrtc::NetEq {
public:
- enum class OutputType {
- kNormalSpeech,
- kPLC,
- kCNG,
- kPLCCNG,
- kVadPassive
- };
+ enum class OutputType { kNormalSpeech, kPLC, kCNG, kPLCCNG, kVadPassive };
enum ErrorCodes {
kNoError = 0,
diff --git a/modules/audio_coding/neteq/neteq_impl_unittest.cc b/modules/audio_coding/neteq/neteq_impl_unittest.cc
index 0c7c090..ded54bf 100644
--- a/modules/audio_coding/neteq/neteq_impl_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_impl_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/neteq/neteq_impl.h"
+
#include <memory>
#include <utility>
#include <vector>
@@ -26,7 +28,6 @@
#include "modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h"
#include "modules/audio_coding/neteq/mock/mock_packet_buffer.h"
#include "modules/audio_coding/neteq/mock/mock_red_payload_splitter.h"
-#include "modules/audio_coding/neteq/neteq_impl.h"
#include "modules/audio_coding/neteq/preemptive_expand.h"
#include "modules/audio_coding/neteq/statistics_calculator.h"
#include "modules/audio_coding/neteq/sync_buffer.h"
@@ -198,7 +199,7 @@
UseNoMocks();
CreateInstance();
// Event: 2, E bit, Volume: 17, Length: 4336.
- uint8_t payload[kPayloadLength] = { 0x02, 0x80 + 0x11, 0x10, 0xF0 };
+ uint8_t payload[kPayloadLength] = {0x02, 0x80 + 0x11, 0x10, 0xF0};
RTPHeader rtp_header;
rtp_header.payloadType = kPayloadType;
rtp_header.sequenceNumber = 0x1234;
@@ -228,13 +229,14 @@
EXPECT_THAT(output.packet_infos_, IsEmpty());
// Verify first 64 samples of actual output.
- const std::vector<int16_t> kOutput({
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1578, -2816, -3460, -3403, -2709, -1594,
- -363, 671, 1269, 1328, 908, 202, -513, -964, -955, -431, 504, 1617,
- 2602, 3164, 3101, 2364, 1073, -511, -2047, -3198, -3721, -3525, -2688,
- -1440, -99, 1015, 1663, 1744, 1319, 588, -171, -680, -747, -315, 515,
- 1512, 2378, 2828, 2674, 1877, 568, -986, -2446, -3482, -3864, -3516,
- -2534, -1163 });
+ const std::vector<int16_t> kOutput(
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1578, -2816, -3460, -3403, -2709, -1594, -363, 671, 1269, 1328,
+ 908, 202, -513, -964, -955, -431, 504, 1617, 2602, 3164,
+ 3101, 2364, 1073, -511, -2047, -3198, -3721, -3525, -2688, -1440,
+ -99, 1015, 1663, 1744, 1319, 588, -171, -680, -747, -315,
+ 515, 1512, 2378, 2828, 2674, 1877, 568, -986, -2446, -3482,
+ -3864, -3516, -2534, -1163});
ASSERT_GE(kMaxOutputSize, kOutput.size());
EXPECT_TRUE(std::equal(kOutput.begin(), kOutput.end(), output.data()));
}
@@ -269,7 +271,6 @@
bool use_mock_payload_splitter_ = true;
};
-
// This tests the interface class NetEq.
// TODO(hlundin): Move to separate file?
TEST(NetEq, CreateAndDestroy) {
@@ -358,8 +359,7 @@
// Expectations for packet buffer.
EXPECT_CALL(*mock_packet_buffer_, Empty())
.WillOnce(Return(false)); // Called once after first packet is inserted.
- EXPECT_CALL(*mock_packet_buffer_, Flush())
- .Times(1);
+ EXPECT_CALL(*mock_packet_buffer_, Flush()).Times(1);
EXPECT_CALL(*mock_packet_buffer_, InsertPacketList(_, _, _, _, _))
.Times(2)
.WillRepeatedly(DoAll(SetArgPointee<2>(kPayloadType),
@@ -373,8 +373,7 @@
.WillOnce(Return(&fake_packet));
// Expectations for DTMF buffer.
- EXPECT_CALL(*mock_dtmf_buffer_, Flush())
- .Times(1);
+ EXPECT_CALL(*mock_dtmf_buffer_, Flush()).Times(1);
// Expectations for delay manager.
{
@@ -384,8 +383,7 @@
EXPECT_CALL(*mock_delay_manager_, last_pack_cng_or_dtmf())
.Times(2)
.WillRepeatedly(Return(-1));
- EXPECT_CALL(*mock_delay_manager_, set_last_pack_cng_or_dtmf(0))
- .Times(1);
+ EXPECT_CALL(*mock_delay_manager_, set_last_pack_cng_or_dtmf(0)).Times(1);
EXPECT_CALL(*mock_delay_manager_, ResetPacketIatCount()).Times(1);
// Expectations when the second packet is inserted. Slightly different.
EXPECT_CALL(*mock_delay_manager_, last_pack_cng_or_dtmf())
@@ -409,7 +407,7 @@
const int kPayloadLengthSamples = 80;
const size_t kPayloadLengthBytes = 2 * kPayloadLengthSamples; // PCM 16-bit.
- const uint8_t kPayloadType = 17; // Just an arbitrary number.
+ const uint8_t kPayloadType = 17; // Just an arbitrary number.
const uint32_t kReceiveTime = 17; // Value doesn't matter for this test.
uint8_t payload[kPayloadLengthBytes] = {0};
RTPHeader rtp_header;
@@ -896,18 +894,18 @@
const size_t kMaxOutputSize = static_cast<size_t>(10 * kSampleRateKhz);
AudioFrame output;
AudioFrame::SpeechType expected_type[8] = {
- AudioFrame::kNormalSpeech, AudioFrame::kNormalSpeech,
- AudioFrame::kCNG, AudioFrame::kCNG,
- AudioFrame::kCNG, AudioFrame::kCNG,
- AudioFrame::kNormalSpeech, AudioFrame::kNormalSpeech
- };
+ AudioFrame::kNormalSpeech, AudioFrame::kNormalSpeech, AudioFrame::kCNG,
+ AudioFrame::kCNG, AudioFrame::kCNG, AudioFrame::kCNG,
+ AudioFrame::kNormalSpeech, AudioFrame::kNormalSpeech};
int expected_timestamp_increment[8] = {
-1, // will not be used.
10 * kSampleRateKhz,
- -1, -1, // timestamp will be empty during CNG mode; indicated by -1 here.
- -1, -1,
- 50 * kSampleRateKhz, 10 * kSampleRateKhz
- };
+ -1,
+ -1, // timestamp will be empty during CNG mode; indicated by -1 here.
+ -1,
+ -1,
+ 50 * kSampleRateKhz,
+ 10 * kSampleRateKhz};
bool muted;
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
@@ -1008,11 +1006,9 @@
.Times(AtLeast(1))
.WillRepeatedly(Return(rtc::checked_cast<int>(kNetEqMaxFrameSize)));
- EXPECT_CALL(decoder, SampleRateHz())
- .WillRepeatedly(Return(kSampleRateHz));
+ EXPECT_CALL(decoder, SampleRateHz()).WillRepeatedly(Return(kSampleRateHz));
- EXPECT_CALL(decoder, Channels())
- .WillRepeatedly(Return(kChannels));
+ EXPECT_CALL(decoder, Channels()).WillRepeatedly(Return(kChannels));
EXPECT_TRUE(neteq_->RegisterPayloadType(kPayloadType,
SdpAudioFormat("L16", 8000, 1)));
@@ -1190,10 +1186,8 @@
.WillRepeatedly(Return(0));
EXPECT_CALL(mock_decoder, PacketDuration(_, _))
.WillRepeatedly(Return(rtc::checked_cast<int>(kFrameLengthSamples)));
- EXPECT_CALL(mock_decoder, ErrorCode())
- .WillOnce(Return(kDecoderErrorCode));
- EXPECT_CALL(mock_decoder, HasDecodePlc())
- .WillOnce(Return(false));
+ EXPECT_CALL(mock_decoder, ErrorCode()).WillOnce(Return(kDecoderErrorCode));
+ EXPECT_CALL(mock_decoder, HasDecodePlc()).WillOnce(Return(false));
int16_t dummy_output[kFrameLengthSamples] = {0};
{
@@ -1308,8 +1302,7 @@
.WillRepeatedly(Return(0));
EXPECT_CALL(mock_decoder, PacketDuration(_, _))
.WillRepeatedly(Return(rtc::checked_cast<int>(kFrameLengthSamples)));
- EXPECT_CALL(mock_decoder, ErrorCode())
- .WillOnce(Return(kDecoderErrorCode));
+ EXPECT_CALL(mock_decoder, ErrorCode()).WillOnce(Return(kDecoderErrorCode));
int16_t dummy_output[kFrameLengthSamples] = {0};
{
diff --git a/modules/audio_coding/neteq/neteq_network_stats_unittest.cc b/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
index e05a790..20e5a5a 100644
--- a/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
@@ -13,7 +13,6 @@
#include "absl/memory/memory.h"
#include "api/audio/audio_frame.h"
#include "api/audio_codecs/audio_decoder.h"
-
#include "modules/audio_coding/neteq/include/neteq.h"
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
#include "rtc_base/ref_counted_object.h"
@@ -25,8 +24,8 @@
namespace test {
using ::testing::_;
-using ::testing::SetArgPointee;
using ::testing::Return;
+using ::testing::SetArgPointee;
class MockAudioDecoder final : public AudioDecoder {
public:
diff --git a/modules/audio_coding/neteq/packet.h b/modules/audio_coding/neteq/packet.h
index 4f50e4d..238e769 100644
--- a/modules/audio_coding/neteq/packet.h
+++ b/modules/audio_coding/neteq/packet.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_PACKET_H_
#include <stdint.h>
+
#include <list>
#include <memory>
diff --git a/modules/audio_coding/neteq/packet_buffer_unittest.cc b/modules/audio_coding/neteq/packet_buffer_unittest.cc
index ca42222..688ce8d 100644
--- a/modules/audio_coding/neteq/packet_buffer_unittest.cc
+++ b/modules/audio_coding/neteq/packet_buffer_unittest.cc
@@ -11,6 +11,7 @@
// Unit tests for PacketBuffer class.
#include "modules/audio_coding/neteq/packet_buffer.h"
+
#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "modules/audio_coding/neteq/mock/mock_decoder_database.h"
@@ -20,11 +21,11 @@
#include "test/gmock.h"
#include "test/gtest.h"
-using ::testing::Return;
-using ::testing::StrictMock;
using ::testing::_;
using ::testing::InSequence;
using ::testing::MockFunction;
+using ::testing::Return;
+using ::testing::StrictMock;
namespace {
class MockEncodedAudioFrame : public webrtc::AudioDecoder::EncodedAudioFrame {
@@ -54,12 +55,16 @@
int frame_size_;
};
-PacketGenerator::PacketGenerator(uint16_t seq_no, uint32_t ts, uint8_t pt,
+PacketGenerator::PacketGenerator(uint16_t seq_no,
+ uint32_t ts,
+ uint8_t pt,
int frame_size) {
Reset(seq_no, ts, pt, frame_size);
}
-void PacketGenerator::Reset(uint16_t seq_no, uint32_t ts, uint8_t pt,
+void PacketGenerator::Reset(uint16_t seq_no,
+ uint32_t ts,
+ uint8_t pt,
int frame_size) {
seq_no_ = seq_no;
ts_ = ts;
@@ -211,7 +216,7 @@
¤t_cng_pt, &mock_stats));
EXPECT_TRUE(list.empty()); // The PacketBuffer should have depleted the list.
EXPECT_EQ(10u, buffer.NumPacketsInBuffer());
- EXPECT_EQ(0, current_pt); // Current payload type changed to 0.
+ EXPECT_EQ(0, current_pt); // Current payload type changed to 0.
EXPECT_EQ(absl::nullopt, current_cng_pt); // CNG payload type not changed.
buffer.Flush(); // Clean up.
@@ -260,7 +265,7 @@
¤t_cng_pt, &mock_stats));
EXPECT_TRUE(list.empty()); // The PacketBuffer should have depleted the list.
EXPECT_EQ(1u, buffer.NumPacketsInBuffer()); // Only the last packet.
- EXPECT_EQ(1, current_pt); // Current payload type changed to 1.
+ EXPECT_EQ(1, current_pt); // Current payload type changed to 1.
EXPECT_EQ(absl::nullopt, current_cng_pt); // CNG payload type not changed.
buffer.Flush(); // Clean up.
@@ -276,24 +281,15 @@
const int kPayloadLength = 10;
PacketsToInsert packet_facts[kPackets] = {
- {0xFFFD, 0xFFFFFFD7, 0, true, 0},
- {0xFFFE, 0xFFFFFFE1, 0, true, 1},
- {0xFFFE, 0xFFFFFFD7, 1, false, -1},
- {0xFFFF, 0xFFFFFFEB, 0, true, 2},
- {0xFFFF, 0xFFFFFFE1, 1, false, -1},
- {0x0000, 0xFFFFFFF5, 0, true, 3},
- {0x0000, 0xFFFFFFEB, 1, false, -1},
- {0x0001, 0xFFFFFFFF, 0, true, 4},
- {0x0001, 0xFFFFFFF5, 1, false, -1},
- {0x0002, 0x0000000A, 0, true, 5},
- {0x0002, 0xFFFFFFFF, 1, false, -1},
- {0x0003, 0x0000000A, 1, false, -1},
- {0x0004, 0x0000001E, 0, true, 7},
- {0x0004, 0x00000014, 1, false, 6},
- {0x0005, 0x0000001E, 0, true, -1},
- {0x0005, 0x00000014, 1, false, -1},
- {0x0006, 0x00000028, 0, true, 8},
- {0x0006, 0x0000001E, 1, false, -1},
+ {0xFFFD, 0xFFFFFFD7, 0, true, 0}, {0xFFFE, 0xFFFFFFE1, 0, true, 1},
+ {0xFFFE, 0xFFFFFFD7, 1, false, -1}, {0xFFFF, 0xFFFFFFEB, 0, true, 2},
+ {0xFFFF, 0xFFFFFFE1, 1, false, -1}, {0x0000, 0xFFFFFFF5, 0, true, 3},
+ {0x0000, 0xFFFFFFEB, 1, false, -1}, {0x0001, 0xFFFFFFFF, 0, true, 4},
+ {0x0001, 0xFFFFFFF5, 1, false, -1}, {0x0002, 0x0000000A, 0, true, 5},
+ {0x0002, 0xFFFFFFFF, 1, false, -1}, {0x0003, 0x0000000A, 1, false, -1},
+ {0x0004, 0x0000001E, 0, true, 7}, {0x0004, 0x00000014, 1, false, 6},
+ {0x0005, 0x0000001E, 0, true, -1}, {0x0005, 0x00000014, 1, false, -1},
+ {0x0006, 0x00000028, 0, true, 8}, {0x0006, 0x0000001E, 1, false, -1},
};
const size_t kExpectPacketsInBuffer = 9;
@@ -310,10 +306,8 @@
InSequence s;
MockFunction<void(int check_point_id)> check;
for (int i = 0; i < kPackets; ++i) {
- gen.Reset(packet_facts[i].sequence_number,
- packet_facts[i].timestamp,
- packet_facts[i].payload_type,
- kFrameSize);
+ gen.Reset(packet_facts[i].sequence_number, packet_facts[i].timestamp,
+ packet_facts[i].payload_type, kFrameSize);
Packet packet = gen.NextPacket(kPayloadLength, nullptr);
packet.priority.codec_level = packet_facts[i].primary ? 0 : 1;
if (packet_facts[i].extract_order < 0) {
@@ -495,7 +489,7 @@
ASSERT_TRUE(buffer.PeekNextPacket());
EXPECT_EQ(kCngPt, buffer.PeekNextPacket()->payload_type);
EXPECT_EQ(current_pt, absl::nullopt); // Current payload type not set.
- EXPECT_EQ(kCngPt, current_cng_pt); // CNG payload type set.
+ EXPECT_EQ(kCngPt, current_cng_pt); // CNG payload type set.
// Insert second packet, which is wide-band speech.
{
@@ -513,7 +507,7 @@
ASSERT_TRUE(buffer.PeekNextPacket());
EXPECT_EQ(kSpeechPt, buffer.PeekNextPacket()->payload_type);
- EXPECT_EQ(kSpeechPt, current_pt); // Current payload type set.
+ EXPECT_EQ(kSpeechPt, current_pt); // Current payload type set.
EXPECT_EQ(absl::nullopt, current_cng_pt); // CNG payload type reset.
buffer.Flush(); // Clean up.
@@ -752,11 +746,11 @@
EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
limit_timestamp, limit_timestamp, kZeroHorizon));
// 1 sample behind is old.
- EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp - 1, limit_timestamp, kZeroHorizon));
+ EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp - 1,
+ limit_timestamp, kZeroHorizon));
// 2^31 - 1 samples behind is old.
- EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp - k2Pow31Minus1, limit_timestamp, kZeroHorizon));
+ EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp - k2Pow31Minus1,
+ limit_timestamp, kZeroHorizon));
// 1 sample ahead is not old.
EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
limit_timestamp + 1, limit_timestamp, kZeroHorizon));
@@ -772,26 +766,26 @@
// Fixed horizon at 10 samples.
static const uint32_t kHorizon = 10;
// Timestamp on the limit is not old.
- EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp, limit_timestamp, kHorizon));
+ EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp,
+ limit_timestamp, kHorizon));
// 1 sample behind is old.
- EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp - 1, limit_timestamp, kHorizon));
+ EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp - 1,
+ limit_timestamp, kHorizon));
// 9 samples behind is old.
- EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp - 9, limit_timestamp, kHorizon));
+ EXPECT_TRUE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp - 9,
+ limit_timestamp, kHorizon));
// 10 samples behind is not old.
- EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp - 10, limit_timestamp, kHorizon));
+ EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp - 10,
+ limit_timestamp, kHorizon));
// 2^31 - 1 samples behind is not old.
EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
limit_timestamp - k2Pow31Minus1, limit_timestamp, kHorizon));
// 1 sample ahead is not old.
- EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp + 1, limit_timestamp, kHorizon));
+ EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp + 1,
+ limit_timestamp, kHorizon));
// 2^31 samples ahead is not old.
- EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(
- limit_timestamp + (1 << 31), limit_timestamp, kHorizon));
+ EXPECT_FALSE(PacketBuffer::IsObsoleteTimestamp(limit_timestamp + (1 << 31),
+ limit_timestamp, kHorizon));
}
} // namespace
diff --git a/modules/audio_coding/neteq/red_payload_splitter.cc b/modules/audio_coding/neteq/red_payload_splitter.cc
index 2a9befa..7ff5679 100644
--- a/modules/audio_coding/neteq/red_payload_splitter.cc
+++ b/modules/audio_coding/neteq/red_payload_splitter.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <stddef.h>
+
#include <cstdint>
#include <list>
#include <utility>
diff --git a/modules/audio_coding/neteq/statistics_calculator.cc b/modules/audio_coding/neteq/statistics_calculator.cc
index 4ef239a..d0fd26e 100644
--- a/modules/audio_coding/neteq/statistics_calculator.cc
+++ b/modules/audio_coding/neteq/statistics_calculator.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <string.h> // memset
+
#include <algorithm>
#include "modules/audio_coding/neteq/delay_manager.h"
diff --git a/modules/audio_coding/neteq/sync_buffer.cc b/modules/audio_coding/neteq/sync_buffer.cc
index fee18cc..4949bb2 100644
--- a/modules/audio_coding/neteq/sync_buffer.cc
+++ b/modules/audio_coding/neteq/sync_buffer.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/neteq/sync_buffer.h"
+
#include <algorithm> // Access to min.
-#include "modules/audio_coding/neteq/sync_buffer.h"
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/sync_buffer.h b/modules/audio_coding/neteq/sync_buffer.h
index 7f6c111..754716b 100644
--- a/modules/audio_coding/neteq/sync_buffer.h
+++ b/modules/audio_coding/neteq/sync_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/audio/audio_frame.h"
diff --git a/modules/audio_coding/neteq/sync_buffer_unittest.cc b/modules/audio_coding/neteq/sync_buffer_unittest.cc
index 29c3bca..860dbae 100644
--- a/modules/audio_coding/neteq/sync_buffer_unittest.cc
+++ b/modules/audio_coding/neteq/sync_buffer_unittest.cc
@@ -9,8 +9,8 @@
*/
#include "modules/audio_coding/neteq/sync_buffer.h"
-#include "rtc_base/numerics/safe_conversions.h"
+#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc b/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
index a43c26a..9ec9d44 100644
--- a/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
+++ b/modules/audio_coding/neteq/test/neteq_pcm16b_quality_test.cc
@@ -11,7 +11,6 @@
#include <memory>
#include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h"
-
#include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
#include "rtc_base/checks.h"
#include "rtc_base/flags.h"
diff --git a/modules/audio_coding/neteq/tick_timer.h b/modules/audio_coding/neteq/tick_timer.h
index 724dd12..2504ce3 100644
--- a/modules/audio_coding/neteq/tick_timer.h
+++ b/modules/audio_coding/neteq/tick_timer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_TICK_TIMER_H_
#include <stdint.h>
+
#include <memory>
#include "rtc_base/checks.h"
diff --git a/modules/audio_coding/neteq/tick_timer_unittest.cc b/modules/audio_coding/neteq/tick_timer_unittest.cc
index 875f04d..c501329 100644
--- a/modules/audio_coding/neteq/tick_timer_unittest.cc
+++ b/modules/audio_coding/neteq/tick_timer_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include "modules/audio_coding/neteq/tick_timer.h"
+#include <memory>
+
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/audio_coding/neteq/time_stretch_unittest.cc b/modules/audio_coding/neteq/time_stretch_unittest.cc
index 6f875f0..da3a982 100644
--- a/modules/audio_coding/neteq/time_stretch_unittest.cc
+++ b/modules/audio_coding/neteq/time_stretch_unittest.cc
@@ -10,14 +10,13 @@
// Unit tests for Accelerate and PreemptiveExpand classes.
-#include "modules/audio_coding/neteq/accelerate.h"
-#include "modules/audio_coding/neteq/preemptive_expand.h"
-
#include <map>
#include <memory>
#include "common_audio/signal_processing/include/signal_processing_library.h"
+#include "modules/audio_coding/neteq/accelerate.h"
#include "modules/audio_coding/neteq/background_noise.h"
+#include "modules/audio_coding/neteq/preemptive_expand.h"
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
@@ -64,8 +63,7 @@
sample_rate_hz_(32000),
block_size_(30 * sample_rate_hz_ / 1000), // 30 ms
audio_(new int16_t[block_size_]),
- background_noise_(kNumChannels) {
- }
+ background_noise_(kNumChannels) {}
const int16_t* Next30Ms() {
RTC_CHECK(input_file_->Read(block_size_, audio_.get()));
diff --git a/modules/audio_coding/neteq/timestamp_scaler_unittest.cc b/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
index 5b14189..9ba63e3 100644
--- a/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
+++ b/modules/audio_coding/neteq/timestamp_scaler_unittest.cc
@@ -9,15 +9,16 @@
*/
#include "modules/audio_coding/neteq/timestamp_scaler.h"
+
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "modules/audio_coding/neteq/mock/mock_decoder_database.h"
#include "modules/audio_coding/neteq/packet.h"
#include "test/gmock.h"
#include "test/gtest.h"
+using ::testing::_;
using ::testing::Return;
using ::testing::ReturnNull;
-using ::testing::_;
namespace webrtc {
diff --git a/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h b/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
index 7adb15b..6a79ce4 100644
--- a/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
+++ b/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_CONSTANT_PCM_PACKET_SOURCE_H_
#include <stdio.h>
+
#include <string>
#include "modules/audio_coding/neteq/tools/packet_source.h"
diff --git a/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc b/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc
index bf016a1..52f7ea8 100644
--- a/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc
+++ b/modules/audio_coding/neteq/tools/input_audio_file_unittest.cc
@@ -11,8 +11,8 @@
// Unit tests for test InputAudioFile class.
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
-#include "rtc_base/numerics/safe_conversions.h"
+#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_coding/neteq/tools/neteq_quality_test.cc b/modules/audio_coding/neteq/tools/neteq_quality_test.cc
index ad6aaa5..a990a81 100644
--- a/modules/audio_coding/neteq/tools/neteq_quality_test.cc
+++ b/modules/audio_coding/neteq/tools/neteq_quality_test.cc
@@ -8,10 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
+
#include <stdio.h>
+
#include <cmath>
-#include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
#include "modules/audio_coding/neteq/tools/output_audio_file.h"
#include "modules/audio_coding/neteq/tools/output_wav_file.h"
#include "modules/audio_coding/neteq/tools/resample_input_audio_file.h"
diff --git a/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc b/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc
index 6933fc0..3f06b1c 100644
--- a/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc
+++ b/modules/audio_coding/neteq/tools/neteq_stats_plotter.cc
@@ -12,6 +12,7 @@
#include <inttypes.h>
#include <stdio.h>
+
#include <utility>
namespace webrtc {
diff --git a/modules/audio_coding/neteq/tools/neteq_test_factory.cc b/modules/audio_coding/neteq/tools/neteq_test_factory.cc
index 9b68c5c..a7061eb 100644
--- a/modules/audio_coding/neteq/tools/neteq_test_factory.cc
+++ b/modules/audio_coding/neteq/tools/neteq_test_factory.cc
@@ -14,6 +14,7 @@
#include <limits.h> // For ULONG_MAX returned by strtoul.
#include <stdio.h>
#include <stdlib.h> // For strtoul.
+
#include <fstream>
#include <iostream>
#include <memory>
diff --git a/modules/audio_coding/neteq/tools/output_audio_file.h b/modules/audio_coding/neteq/tools/output_audio_file.h
index c923a1e..d729c9c 100644
--- a/modules/audio_coding/neteq/tools/output_audio_file.h
+++ b/modules/audio_coding/neteq/tools/output_audio_file.h
@@ -13,6 +13,7 @@
#include <assert.h>
#include <stdio.h>
+
#include <string>
#include "modules/audio_coding/neteq/tools/audio_sink.h"
diff --git a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
index f0cc0a3..f864aa1 100644
--- a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
+++ b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/neteq/tools/rtc_event_log_source.h"
#include <string.h>
+
#include <iostream>
#include <limits>
#include <set>
diff --git a/modules/audio_coding/neteq/tools/rtp_generator.cc b/modules/audio_coding/neteq/tools/rtp_generator.cc
index ab7acdc..accd163 100644
--- a/modules/audio_coding/neteq/tools/rtp_generator.cc
+++ b/modules/audio_coding/neteq/tools/rtp_generator.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <assert.h>
-
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
+#include <assert.h>
+
namespace webrtc {
namespace test {
diff --git a/modules/audio_coding/neteq/tools/rtp_jitter.cc b/modules/audio_coding/neteq/tools/rtp_jitter.cc
index 3521145..cccaa9a 100644
--- a/modules/audio_coding/neteq/tools/rtp_jitter.cc
+++ b/modules/audio_coding/neteq/tools/rtp_jitter.cc
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
+
#include <algorithm>
#include <fstream>
#include <iostream>
diff --git a/modules/audio_coding/test/Channel.cc b/modules/audio_coding/test/Channel.cc
index 8ad0e00..e76bacb 100644
--- a/modules/audio_coding/test/Channel.cc
+++ b/modules/audio_coding/test/Channel.cc
@@ -11,6 +11,7 @@
#include "modules/audio_coding/test/Channel.h"
#include <assert.h>
+
#include <iostream>
#include "rtc_base/format_macros.h"
diff --git a/modules/audio_coding/test/EncodeDecodeTest.cc b/modules/audio_coding/test/EncodeDecodeTest.cc
index 25e273a..20e415d 100644
--- a/modules/audio_coding/test/EncodeDecodeTest.cc
+++ b/modules/audio_coding/test/EncodeDecodeTest.cc
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
+
#include <memory>
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@@ -23,14 +24,10 @@
namespace webrtc {
-TestPacketization::TestPacketization(RTPStream *rtpStream, uint16_t frequency)
- : _rtpStream(rtpStream),
- _frequency(frequency),
- _seqNo(0) {
-}
+TestPacketization::TestPacketization(RTPStream* rtpStream, uint16_t frequency)
+ : _rtpStream(rtpStream), _frequency(frequency), _seqNo(0) {}
-TestPacketization::~TestPacketization() {
-}
+TestPacketization::~TestPacketization() {}
int32_t TestPacketization::SendData(const AudioFrameType /* frameType */,
const uint8_t payloadType,
@@ -43,15 +40,14 @@
}
Sender::Sender()
- : _acm(NULL),
- _pcmFile(),
- _audioFrame(),
- _packetization(NULL) {
-}
+ : _acm(NULL), _pcmFile(), _audioFrame(), _packetization(NULL) {}
-void Sender::Setup(AudioCodingModule *acm, RTPStream *rtpStream,
- std::string in_file_name, int in_sample_rate,
- int payload_type, SdpAudioFormat format) {
+void Sender::Setup(AudioCodingModule* acm,
+ RTPStream* rtpStream,
+ std::string in_file_name,
+ int in_sample_rate,
+ int payload_type,
+ SdpAudioFormat format) {
// Open input file
const std::string file_name = webrtc::test::ResourcePath(in_file_name, "pcm");
_pcmFile.Open(file_name, in_sample_rate, "rb");
@@ -96,11 +92,13 @@
Receiver::Receiver()
: _playoutLengthSmpls(WEBRTC_10MS_PCM_AUDIO),
- _payloadSizeBytes(MAX_INCOMING_PAYLOAD) {
-}
+ _payloadSizeBytes(MAX_INCOMING_PAYLOAD) {}
-void Receiver::Setup(AudioCodingModule *acm, RTPStream *rtpStream,
- std::string out_file_name, size_t channels, int file_num) {
+void Receiver::Setup(AudioCodingModule* acm,
+ RTPStream* rtpStream,
+ std::string out_file_name,
+ size_t channels,
+ int file_num) {
EXPECT_EQ(0, acm->InitializeReceiver());
if (channels == 1) {
@@ -187,14 +185,14 @@
return false;
}
EXPECT_EQ(0, ok);
- if (ok < 0){
+ if (ok < 0) {
return false;
}
if (_playoutLengthSmpls == 0) {
return false;
}
- _pcmFile.Write10MsData(audioFrame.data(),
- audioFrame.samples_per_channel_ * audioFrame.num_channels_);
+ _pcmFile.Write10MsData(audioFrame.data(), audioFrame.samples_per_channel_ *
+ audioFrame.num_channels_);
return true;
}
@@ -225,17 +223,15 @@
EncodeDecodeTest::EncodeDecodeTest() = default;
void EncodeDecodeTest::Perform() {
- const std::map<int, SdpAudioFormat> send_codecs = {{103, {"ISAC", 16000, 1}},
- {104, {"ISAC", 32000, 1}},
- {107, {"L16", 8000, 1}},
- {108, {"L16", 16000, 1}},
- {109, {"L16", 32000, 1}},
- {0, {"PCMU", 8000, 1}},
- {8, {"PCMA", 8000, 1}},
+ const std::map<int, SdpAudioFormat> send_codecs = {
+ {103, {"ISAC", 16000, 1}}, {104, {"ISAC", 32000, 1}},
+ {107, {"L16", 8000, 1}}, {108, {"L16", 16000, 1}},
+ {109, {"L16", 32000, 1}}, {0, {"PCMU", 8000, 1}},
+ {8, {"PCMA", 8000, 1}},
#ifdef WEBRTC_CODEC_ILBC
- {102, {"ILBC", 8000, 1}},
+ {102, {"ILBC", 8000, 1}},
#endif
- {9, {"G722", 8000, 1}}};
+ {9, {"G722", 8000, 1}}};
int file_num = 0;
for (const auto& send_codec : send_codecs) {
RTPFile rtpFile;
diff --git a/modules/audio_coding/test/EncodeDecodeTest.h b/modules/audio_coding/test/EncodeDecodeTest.h
index ec95766..a3d1a26 100644
--- a/modules/audio_coding/test/EncodeDecodeTest.h
+++ b/modules/audio_coding/test/EncodeDecodeTest.h
@@ -26,7 +26,7 @@
// TestPacketization callback which writes the encoded payloads to file
class TestPacketization : public AudioPacketizationCallback {
public:
- TestPacketization(RTPStream *rtpStream, uint16_t frequency);
+ TestPacketization(RTPStream* rtpStream, uint16_t frequency);
~TestPacketization();
int32_t SendData(const AudioFrameType frameType,
const uint8_t payloadType,
@@ -35,8 +35,11 @@
const size_t payloadSize) override;
private:
- static void MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType,
- int16_t seqNo, uint32_t timeStamp, uint32_t ssrc);
+ static void MakeRTPheader(uint8_t* rtpHeader,
+ uint8_t payloadType,
+ int16_t seqNo,
+ uint32_t timeStamp,
+ uint32_t ssrc);
RTPStream* _rtpStream;
int32_t _frequency;
int16_t _seqNo;
@@ -45,9 +48,12 @@
class Sender {
public:
Sender();
- void Setup(AudioCodingModule *acm, RTPStream *rtpStream,
- std::string in_file_name, int in_sample_rate,
- int payload_type, SdpAudioFormat format);
+ void Setup(AudioCodingModule* acm,
+ RTPStream* rtpStream,
+ std::string in_file_name,
+ int in_sample_rate,
+ int payload_type,
+ SdpAudioFormat format);
void Teardown();
void Run();
bool Add10MsData();
@@ -65,8 +71,11 @@
public:
Receiver();
virtual ~Receiver() {}
- void Setup(AudioCodingModule *acm, RTPStream *rtpStream,
- std::string out_file_name, size_t channels, int file_num);
+ void Setup(AudioCodingModule* acm,
+ RTPStream* rtpStream,
+ std::string out_file_name,
+ size_t channels,
+ int file_num);
void Teardown();
void Run();
virtual bool IncomingPacket();
diff --git a/modules/audio_coding/test/PacketLossTest.cc b/modules/audio_coding/test/PacketLossTest.cc
index cbe066f..727f692 100644
--- a/modules/audio_coding/test/PacketLossTest.cc
+++ b/modules/audio_coding/test/PacketLossTest.cc
@@ -147,7 +147,7 @@
rtpFile.WriteHeader();
SenderWithFEC sender;
sender.Setup(acm.get(), &rtpFile, in_file_name_, 120, send_format,
- expected_loss_rate_);
+ expected_loss_rate_);
sender.Run();
sender.Teardown();
rtpFile.Close();
@@ -156,7 +156,7 @@
rtpFile.ReadHeader();
ReceiverWithPacketLoss receiver;
receiver.Setup(acm.get(), &rtpFile, "packetLoss_out", channels_, 15,
- actual_loss_rate_, burst_length_);
+ actual_loss_rate_, burst_length_);
receiver.Run();
receiver.Teardown();
rtpFile.Close();
diff --git a/modules/audio_coding/test/PacketLossTest.h b/modules/audio_coding/test/PacketLossTest.h
index b26f6ec..4c0dfd8 100644
--- a/modules/audio_coding/test/PacketLossTest.h
+++ b/modules/audio_coding/test/PacketLossTest.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_
#include <string>
+
#include "modules/audio_coding/test/EncodeDecodeTest.h"
namespace webrtc {
diff --git a/modules/audio_coding/test/RTPFile.cc b/modules/audio_coding/test/RTPFile.cc
index 1273fa8..db4e0f3 100644
--- a/modules/audio_coding/test/RTPFile.cc
+++ b/modules/audio_coding/test/RTPFile.cc
@@ -11,6 +11,7 @@
#include "RTPFile.h"
#include <stdlib.h>
+
#include <limits>
#ifdef WIN32
diff --git a/modules/audio_coding/test/RTPFile.h b/modules/audio_coding/test/RTPFile.h
index 1c555ed..eda576d 100644
--- a/modules/audio_coding/test/RTPFile.h
+++ b/modules/audio_coding/test/RTPFile.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_CODING_TEST_RTPFILE_H_
#include <stdio.h>
+
#include <queue>
#include "modules/audio_coding/include/audio_coding_module.h"
diff --git a/modules/audio_coding/test/TestAllCodecs.cc b/modules/audio_coding/test/TestAllCodecs.cc
index a3f0964..be4460e 100644
--- a/modules/audio_coding/test/TestAllCodecs.cc
+++ b/modules/audio_coding/test/TestAllCodecs.cc
@@ -112,8 +112,7 @@
channel_a_to_b_(NULL),
test_count_(0),
packet_size_samples_(0),
- packet_size_bytes_(0) {
-}
+ packet_size_bytes_(0) {}
TestAllCodecs::~TestAllCodecs() {
if (channel_a_to_b_ != NULL) {
@@ -360,13 +359,15 @@
my_acm = acm_b_.get();
break;
}
- default: { break; }
+ default: {
+ break;
+ }
}
ASSERT_TRUE(my_acm != NULL);
auto factory = CreateBuiltinAudioEncoderFactory();
constexpr int payload_type = 17;
- SdpAudioFormat format = { codec_name, clockrate_hz, num_channels };
+ SdpAudioFormat format = {codec_name, clockrate_hz, num_channels};
format.parameters["ptime"] = rtc::ToString(rtc::CheckedDivExact(
packet_size, rtc::CheckedDivExact(sampling_freq_hz, 1000)));
my_acm->SetEncoder(
diff --git a/modules/audio_coding/test/TestRedFec.cc b/modules/audio_coding/test/TestRedFec.cc
index 0cb2415..5155958 100644
--- a/modules/audio_coding/test/TestRedFec.cc
+++ b/modules/audio_coding/test/TestRedFec.cc
@@ -61,8 +61,8 @@
}
void TestRedFec::Perform() {
- const std::string file_name = webrtc::test::ResourcePath(
- "audio_coding/testfile32kHz", "pcm");
+ const std::string file_name =
+ webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
_inFileA.Open(file_name, 32000, "rb");
ASSERT_EQ(0, _acmA->InitializeReceiver());
@@ -183,9 +183,8 @@
config.payload_type = cn_payload_type;
config.vad_mode = vad_mode.value();
encoder = CreateComfortNoiseEncoder(std::move(config));
- receive_codecs.emplace(
- std::make_pair(cn_payload_type,
- SdpAudioFormat("CN", codec_format.clockrate_hz, 1)));
+ receive_codecs.emplace(std::make_pair(
+ cn_payload_type, SdpAudioFormat("CN", codec_format.clockrate_hz, 1)));
}
if (use_red) {
AudioEncoderCopyRed::Config config;
diff --git a/modules/audio_coding/test/TestStereo.cc b/modules/audio_coding/test/TestStereo.cc
index ea8735b..42bdbd8 100644
--- a/modules/audio_coding/test/TestStereo.cc
+++ b/modules/audio_coding/test/TestStereo.cc
@@ -104,8 +104,7 @@
test_cntr_(0),
pack_size_samp_(0),
pack_size_bytes_(0),
- counter_(0) {
-}
+ counter_(0) {}
TestStereo::~TestStereo() {
if (channel_a2b_ != NULL) {
diff --git a/modules/audio_coding/test/Tester.cc b/modules/audio_coding/test/Tester.cc
index 56e2c46..113dbe0 100644
--- a/modules/audio_coding/test/Tester.cc
+++ b/modules/audio_coding/test/Tester.cc
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
+
#include <string>
#include <vector>
diff --git a/modules/audio_coding/test/TwoWayCommunication.cc b/modules/audio_coding/test/TwoWayCommunication.cc
index 585c1db..91dbfd6 100644
--- a/modules/audio_coding/test/TwoWayCommunication.cc
+++ b/modules/audio_coding/test/TwoWayCommunication.cc
@@ -59,7 +59,6 @@
const int payload_type1,
const SdpAudioFormat& format2,
const int payload_type2) {
-
//--- Set A codecs
_acmA->SetEncoder(
encoder_factory->MakeAudioEncoder(payload_type1, format1, absl::nullopt));
diff --git a/modules/audio_coding/test/iSACTest.cc b/modules/audio_coding/test/iSACTest.cc
index 7776a60..ae6c2b7 100644
--- a/modules/audio_coding/test/iSACTest.cc
+++ b/modules/audio_coding/test/iSACTest.cc
@@ -34,8 +34,8 @@
constexpr int kISAC16kPayloadType = 103;
constexpr int kISAC32kPayloadType = 104;
-const SdpAudioFormat kISAC16kFormat = { "ISAC", 16000, 1 };
-const SdpAudioFormat kISAC32kFormat = { "ISAC", 32000, 1 };
+const SdpAudioFormat kISAC16kFormat = {"ISAC", 16000, 1};
+const SdpAudioFormat kISAC32kFormat = {"ISAC", 32000, 1};
AudioEncoderIsacFloat::Config TweakConfig(
AudioEncoderIsacFloat::Config config,
@@ -107,9 +107,9 @@
}
void ISACTest::ACMTestTimer::CurrentTime(unsigned long& h,
- unsigned char& m,
- unsigned char& s,
- unsigned short& ms) {
+ unsigned char& m,
+ unsigned char& s,
+ unsigned short& ms) {
h = _hour;
m = _min;
s = _sec;
@@ -146,9 +146,9 @@
void ISACTest::Setup() {
// Register both iSAC-wb & iSAC-swb in both sides as receiver codecs.
- std::map<int, SdpAudioFormat> receive_codecs =
- {{kISAC16kPayloadType, kISAC16kFormat},
- {kISAC32kPayloadType, kISAC32kFormat}};
+ std::map<int, SdpAudioFormat> receive_codecs = {
+ {kISAC16kPayloadType, kISAC16kFormat},
+ {kISAC32kPayloadType, kISAC32kFormat}};
_acmA->SetReceiveCodecs(receive_codecs);
_acmB->SetReceiveCodecs(receive_codecs);
@@ -165,14 +165,12 @@
file_name_swb_ =
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
- _acmB->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
- kISAC16kPayloadType));
- _acmA->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
- kISAC32kPayloadType));
+ _acmB->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
+ kISAC16kPayloadType));
+ _acmA->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
+ kISAC32kPayloadType));
_inFileA.Open(file_name_swb_, 32000, "rb");
// Set test length to 500 ms (50 blocks of 10 ms each).
@@ -254,16 +252,14 @@
_outFileB.Open(file_name_out, 32000, "wb");
// Side A is sending super-wideband, and side B is sending wideband.
- _acmA->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- TweakConfig(*AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
- swbISACConfig),
- kISAC32kPayloadType));
- _acmB->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- TweakConfig(*AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
- wbISACConfig),
- kISAC16kPayloadType));
+ _acmA->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ TweakConfig(*AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
+ swbISACConfig),
+ kISAC32kPayloadType));
+ _acmB->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ TweakConfig(*AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
+ wbISACConfig),
+ kISAC16kPayloadType));
bool adaptiveMode = false;
if ((swbISACConfig.currentRateBitPerSec == -1) ||
@@ -309,14 +305,12 @@
// Start with side A sending super-wideband and side B seding wideband.
// Toggle sending wideband/super-wideband in this test.
- _acmA->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
- kISAC32kPayloadType));
- _acmB->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
- kISAC16kPayloadType));
+ _acmA->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
+ kISAC32kPayloadType));
+ _acmB->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
+ kISAC16kPayloadType));
int numSendCodecChanged = 0;
_myTimer.Reset();
@@ -330,18 +324,16 @@
// Switch side A to send super-wideband.
_inFileA.Close();
_inFileA.Open(file_name_swb_, 32000, "rb");
- _acmA->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
- kISAC32kPayloadType));
+ _acmA->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
+ kISAC32kPayloadType));
} else {
// Switch side A to send wideband.
_inFileA.Close();
_inFileA.Open(file_name_swb_, 32000, "rb");
- _acmA->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
- kISAC16kPayloadType));
+ _acmA->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
+ kISAC16kPayloadType));
}
numSendCodecChanged++;
}
@@ -351,18 +343,16 @@
// Switch side B to send super-wideband.
_inFileB.Close();
_inFileB.Open(file_name_swb_, 32000, "rb");
- _acmB->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
- kISAC32kPayloadType));
+ _acmB->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC32kFormat),
+ kISAC32kPayloadType));
} else {
// Switch side B to send wideband.
_inFileB.Close();
_inFileB.Open(file_name_swb_, 32000, "rb");
- _acmB->SetEncoder(
- AudioEncoderIsacFloat::MakeAudioEncoder(
- *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
- kISAC16kPayloadType));
+ _acmB->SetEncoder(AudioEncoderIsacFloat::MakeAudioEncoder(
+ *AudioEncoderIsacFloat::SdpToConfig(kISAC16kFormat),
+ kISAC16kPayloadType));
}
numSendCodecChanged++;
}
diff --git a/modules/audio_coding/test/target_delay_unittest.cc b/modules/audio_coding/test/target_delay_unittest.cc
index 6f7c6cf..2fb59d1 100644
--- a/modules/audio_coding/test/target_delay_unittest.cc
+++ b/modules/audio_coding/test/target_delay_unittest.cc
@@ -33,8 +33,8 @@
ASSERT_EQ(0, acm_->InitializeReceiver());
constexpr int pltype = 108;
- std::map<int, SdpAudioFormat> receive_codecs =
- {{pltype, {"L16", kSampleRateHz, 1}}};
+ std::map<int, SdpAudioFormat> receive_codecs = {
+ {pltype, {"L16", kSampleRateHz, 1}}};
acm_->SetReceiveCodecs(receive_codecs);
rtp_header_.payloadType = pltype;
diff --git a/modules/audio_device/android/aaudio_player.h b/modules/audio_device/android/aaudio_player.h
index 7173a25..820d279 100644
--- a/modules/audio_device/android/aaudio_player.h
+++ b/modules/audio_device/android/aaudio_player.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_DEVICE_ANDROID_AAUDIO_PLAYER_H_
#include <aaudio/AAudio.h>
+
#include <memory>
#include "modules/audio_device/android/aaudio_wrapper.h"
diff --git a/modules/audio_device/android/aaudio_recorder.h b/modules/audio_device/android/aaudio_recorder.h
index cfd463f..d9427e2 100644
--- a/modules/audio_device/android/aaudio_recorder.h
+++ b/modules/audio_device/android/aaudio_recorder.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_DEVICE_ANDROID_AAUDIO_RECORDER_H_
#include <aaudio/AAudio.h>
+
#include <memory>
#include "modules/audio_device/android/aaudio_wrapper.h"
diff --git a/modules/audio_device/android/audio_device_unittest.cc b/modules/audio_device/android/audio_device_unittest.cc
index e9daf1c..9449015 100644
--- a/modules/audio_device/android/audio_device_unittest.cc
+++ b/modules/audio_device/android/audio_device_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/include/audio_device.h"
+
#include <algorithm>
#include <limits>
#include <list>
@@ -24,7 +26,6 @@
#include "modules/audio_device/android/build_info.h"
#include "modules/audio_device/android/ensure_initialized.h"
#include "modules/audio_device/audio_device_impl.h"
-#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/mock_audio_transport.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/critical_section.h"
diff --git a/modules/audio_device/android/audio_manager_unittest.cc b/modules/audio_device/android/audio_manager_unittest.cc
index ed713cb..4abba51 100644
--- a/modules/audio_device/android/audio_manager_unittest.cc
+++ b/modules/audio_device/android/audio_manager_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/android/audio_manager.h"
+
#include <SLES/OpenSLES_Android.h>
-#include "modules/audio_device/android/audio_manager.h"
#include "modules/audio_device/android/build_info.h"
#include "modules/audio_device/android/ensure_initialized.h"
#include "rtc_base/arraysize.h"
diff --git a/modules/audio_device/android/audio_record_jni.h b/modules/audio_device/android/audio_record_jni.h
index 28c8fc4..102f29a 100644
--- a/modules/audio_device/android/audio_record_jni.h
+++ b/modules/audio_device/android/audio_record_jni.h
@@ -11,10 +11,10 @@
#ifndef MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_
#define MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_
-#include <memory>
-
#include <jni.h>
+#include <memory>
+
#include "modules/audio_device/android/audio_manager.h"
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device_defines.h"
diff --git a/modules/audio_device/android/audio_track_jni.cc b/modules/audio_device/android/audio_track_jni.cc
index 592d01b..ef419f9 100644
--- a/modules/audio_device/android/audio_track_jni.cc
+++ b/modules/audio_device/android/audio_track_jni.cc
@@ -9,10 +9,10 @@
*/
#include "modules/audio_device/android/audio_track_jni.h"
-#include "modules/audio_device/android/audio_manager.h"
#include <utility>
+#include "modules/audio_device/android/audio_manager.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/checks.h"
#include "rtc_base/format_macros.h"
diff --git a/modules/audio_device/android/audio_track_jni.h b/modules/audio_device/android/audio_track_jni.h
index ccbdbe2..6303d75 100644
--- a/modules/audio_device/android/audio_track_jni.h
+++ b/modules/audio_device/android/audio_track_jni.h
@@ -11,10 +11,10 @@
#ifndef MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_
#define MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_
-#include <memory>
-
#include <jni.h>
+#include <memory>
+
#include "modules/audio_device/android/audio_common.h"
#include "modules/audio_device/android/audio_manager.h"
#include "modules/audio_device/audio_device_generic.h"
diff --git a/modules/audio_device/android/build_info.h b/modules/audio_device/android/build_info.h
index 7cdf192..2f27093 100644
--- a/modules/audio_device/android/build_info.h
+++ b/modules/audio_device/android/build_info.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_DEVICE_ANDROID_BUILD_INFO_H_
#include <jni.h>
+
#include <memory>
#include <string>
diff --git a/modules/audio_device/audio_device_buffer.cc b/modules/audio_device/audio_device_buffer.cc
index 37191fe..8b56330 100644
--- a/modules/audio_device/audio_device_buffer.cc
+++ b/modules/audio_device/audio_device_buffer.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/audio_device_buffer.h"
+
#include <string.h>
+
#include <cmath>
#include <cstddef>
#include <cstdint>
#include "common_audio/signal_processing/include/signal_processing_library.h"
-#include "modules/audio_device/audio_device_buffer.h"
#include "rtc_base/bind.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/audio_device/audio_device_buffer.h b/modules/audio_device/audio_device_buffer.h
index 9f71ebe..579cf53 100644
--- a/modules/audio_device/audio_device_buffer.h
+++ b/modules/audio_device/audio_device_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <atomic>
#include "api/task_queue/task_queue_factory.h"
diff --git a/modules/audio_device/audio_device_generic.cc b/modules/audio_device/audio_device_generic.cc
index 2baea2a..13d359c 100644
--- a/modules/audio_device/audio_device_generic.cc
+++ b/modules/audio_device/audio_device_generic.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_device/audio_device_generic.h"
+
#include "rtc_base/logging.h"
namespace webrtc {
diff --git a/modules/audio_device/audio_device_impl.h b/modules/audio_device/audio_device_impl.h
index efe9322..5a76595 100644
--- a/modules/audio_device/audio_device_impl.h
+++ b/modules/audio_device/audio_device_impl.h
@@ -14,6 +14,7 @@
#if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
#include <stdint.h>
+
#include <memory>
#include "api/task_queue/task_queue_factory.h"
diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc
index ffecf8e..aeb03ee 100644
--- a/modules/audio_device/audio_device_unittest.cc
+++ b/modules/audio_device/audio_device_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/include/audio_device.h"
+
#include <algorithm>
#include <cstring>
#include <memory>
@@ -20,7 +22,6 @@
#include "api/task_queue/default_task_queue_factory.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/audio_device_impl.h"
-#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/mock_audio_transport.h"
#include "rtc_base/buffer.h"
#include "rtc_base/critical_section.h"
@@ -43,9 +44,9 @@
using ::testing::AtLeast;
using ::testing::Ge;
using ::testing::Invoke;
+using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::NotNull;
-using ::testing::Mock;
namespace webrtc {
namespace {
diff --git a/modules/audio_device/dummy/file_audio_device_factory.cc b/modules/audio_device/dummy/file_audio_device_factory.cc
index 027b13b..60ef92b 100644
--- a/modules/audio_device/dummy/file_audio_device_factory.cc
+++ b/modules/audio_device/dummy/file_audio_device_factory.cc
@@ -11,6 +11,7 @@
#include "modules/audio_device/dummy/file_audio_device_factory.h"
#include <stdio.h>
+
#include <cstdlib>
#include "modules/audio_device/dummy/file_audio_device.h"
diff --git a/modules/audio_device/fine_audio_buffer_unittest.cc b/modules/audio_device/fine_audio_buffer_unittest.cc
index fa8ba64..2199067 100644
--- a/modules/audio_device/fine_audio_buffer_unittest.cc
+++ b/modules/audio_device/fine_audio_buffer_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_device/fine_audio_buffer.h"
#include <limits.h>
+
#include <memory>
#include "api/array_view.h"
diff --git a/modules/audio_device/include/audio_device_defines.h b/modules/audio_device/include/audio_device_defines.h
index f488ab6..2a70643 100644
--- a/modules/audio_device/include/audio_device_defines.h
+++ b/modules/audio_device/include/audio_device_defines.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFINES_H_
#include <stddef.h>
+
#include <string>
#include "rtc_base/checks.h"
diff --git a/modules/audio_device/include/test_audio_device.cc b/modules/audio_device/include/test_audio_device.cc
index e673f82..fd9bf64 100644
--- a/modules/audio_device/include/test_audio_device.cc
+++ b/modules/audio_device/include/test_audio_device.cc
@@ -7,6 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/include/test_audio_device.h"
+
#include <algorithm>
#include <cstdint>
#include <cstdlib>
@@ -20,7 +22,6 @@
#include "api/array_view.h"
#include "common_audio/wav_file.h"
#include "modules/audio_device/include/audio_device_default.h"
-#include "modules/audio_device/include/test_audio_device.h"
#include "rtc_base/buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/critical_section.h"
diff --git a/modules/audio_device/include/test_audio_device.h b/modules/audio_device/include/test_audio_device.h
index f92edf5..48888a4 100644
--- a/modules/audio_device/include/test_audio_device.h
+++ b/modules/audio_device/include/test_audio_device.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
diff --git a/modules/audio_device/include/test_audio_device_unittest.cc b/modules/audio_device/include/test_audio_device_unittest.cc
index bc872c6..2975b11 100644
--- a/modules/audio_device/include/test_audio_device_unittest.cc
+++ b/modules/audio_device/include/test_audio_device_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/include/test_audio_device.h"
+
#include <algorithm>
#include <array>
#include "api/array_view.h"
#include "common_audio/wav_file.h"
#include "common_audio/wav_header.h"
-#include "modules/audio_device/include/test_audio_device.h"
#include "rtc_base/logging.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/audio_device/linux/audio_device_alsa_linux.cc b/modules/audio_device/linux/audio_device_alsa_linux.cc
index 99697e9..fe5c62f 100644
--- a/modules/audio_device/linux/audio_device_alsa_linux.cc
+++ b/modules/audio_device/linux/audio_device_alsa_linux.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/linux/audio_device_alsa_linux.h"
+
#include <assert.h>
#include "modules/audio_device/audio_device_config.h"
-#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/arch.h"
#include "system_wrappers/include/sleep.h"
diff --git a/modules/audio_device/linux/audio_device_pulse_linux.cc b/modules/audio_device/linux/audio_device_pulse_linux.cc
index d93876c..bdd7dde 100644
--- a/modules/audio_device/linux/audio_device_pulse_linux.cc
+++ b/modules/audio_device/linux/audio_device_pulse_linux.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/linux/audio_device_pulse_linux.h"
+
#include <string.h>
-#include "modules/audio_device/linux/audio_device_pulse_linux.h"
#include "modules/audio_device/linux/latebindingsymboltable_linux.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc b/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
index 79a5e4b..8a755f6 100644
--- a/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
+++ b/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
@@ -8,8 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#include "modules/audio_device/linux/audio_mixer_manager_alsa_linux.h"
+
+#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#include "rtc_base/logging.h"
// Accesses ALSA functions through our late-binding symbol table instead of
diff --git a/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h b/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
index 4cd563a..ca26f6a 100644
--- a/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
+++ b/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
@@ -11,12 +11,12 @@
#ifndef AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H_
#define AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H_
+#include <alsa/asoundlib.h>
+
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/linux/alsasymboltable_linux.h"
#include "rtc_base/critical_section.h"
-#include <alsa/asoundlib.h>
-
namespace webrtc {
class AudioMixerManagerLinuxALSA {
diff --git a/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc b/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
index 45b1275..3728a3d 100644
--- a/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
+++ b/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_device/linux/audio_mixer_manager_pulse_linux.h"
+
#include <stddef.h>
#include "modules/audio_device/linux/audio_device_pulse_linux.h"
-#include "modules/audio_device/linux/audio_mixer_manager_pulse_linux.h"
#include "modules/audio_device/linux/latebindingsymboltable_linux.h"
#include "modules/audio_device/linux/pulseaudiosymboltable_linux.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_device/mac/audio_device_mac.cc b/modules/audio_device/mac/audio_device_mac.cc
index 5687dc7..6b4ba92 100644
--- a/modules/audio_device/mac/audio_device_mac.cc
+++ b/modules/audio_device/mac/audio_device_mac.cc
@@ -9,6 +9,12 @@
*/
#include "modules/audio_device/mac/audio_device_mac.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+#include <libkern/OSAtomic.h> // OSAtomicCompareAndSwap()
+#include <mach/mach.h> // mach_task_self()
+#include <sys/sysctl.h> // sysctlbyname()
+
#include "absl/memory/memory.h"
#include "modules/audio_device/audio_device_config.h"
#include "modules/third_party/portaudio/pa_ringbuffer.h"
@@ -17,11 +23,6 @@
#include "rtc_base/platform_thread.h"
#include "rtc_base/system/arch.h"
-#include <ApplicationServices/ApplicationServices.h>
-#include <libkern/OSAtomic.h> // OSAtomicCompareAndSwap()
-#include <mach/mach.h> // mach_task_self()
-#include <sys/sysctl.h> // sysctlbyname()
-
namespace webrtc {
#define WEBRTC_CA_RETURN_ON_ERR(expr) \
@@ -197,7 +198,6 @@
if (kernErr != KERN_SUCCESS) {
RTC_LOG(LS_ERROR) << "semaphore_destroy() error: " << kernErr;
}
-
}
// ============================================================================
diff --git a/modules/audio_device/mac/audio_device_mac.h b/modules/audio_device/mac/audio_device_mac.h
index 49c687d..d7076a3 100644
--- a/modules/audio_device/mac/audio_device_mac.h
+++ b/modules/audio_device/mac/audio_device_mac.h
@@ -11,6 +11,10 @@
#ifndef AUDIO_DEVICE_AUDIO_DEVICE_MAC_H_
#define AUDIO_DEVICE_AUDIO_DEVICE_MAC_H_
+#include <AudioToolbox/AudioConverter.h>
+#include <CoreAudio/CoreAudio.h>
+#include <mach/semaphore.h>
+
#include <memory>
#include "modules/audio_device/audio_device_generic.h"
@@ -20,10 +24,6 @@
#include "rtc_base/logging.h"
#include "rtc_base/thread_annotations.h"
-#include <AudioToolbox/AudioConverter.h>
-#include <CoreAudio/CoreAudio.h>
-#include <mach/semaphore.h>
-
struct PaUtilRingBuffer;
namespace rtc {
diff --git a/modules/audio_device/mac/audio_mixer_manager_mac.cc b/modules/audio_device/mac/audio_mixer_manager_mac.cc
index faedfb0..e2b7d63 100644
--- a/modules/audio_device/mac/audio_mixer_manager_mac.cc
+++ b/modules/audio_device/mac/audio_mixer_manager_mac.cc
@@ -9,10 +9,11 @@
*/
#include "modules/audio_device/mac/audio_mixer_manager_mac.h"
-#include "rtc_base/system/arch.h"
#include <unistd.h> // getpid()
+#include "rtc_base/system/arch.h"
+
namespace webrtc {
#define WEBRTC_CA_RETURN_ON_ERR(expr) \
diff --git a/modules/audio_device/mac/audio_mixer_manager_mac.h b/modules/audio_device/mac/audio_mixer_manager_mac.h
index c073e6c..342e1c9 100644
--- a/modules/audio_device/mac/audio_mixer_manager_mac.h
+++ b/modules/audio_device/mac/audio_mixer_manager_mac.h
@@ -11,12 +11,12 @@
#ifndef AUDIO_DEVICE_AUDIO_MIXER_MANAGER_MAC_H_
#define AUDIO_DEVICE_AUDIO_MIXER_MANAGER_MAC_H_
+#include <CoreAudio/CoreAudio.h>
+
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/logging.h"
-#include <CoreAudio/CoreAudio.h>
-
namespace webrtc {
class AudioMixerManagerMac {
diff --git a/modules/audio_mixer/audio_frame_manipulator_unittest.cc b/modules/audio_mixer/audio_frame_manipulator_unittest.cc
index 28154a5..cfb3f2c 100644
--- a/modules/audio_mixer/audio_frame_manipulator_unittest.cc
+++ b/modules/audio_mixer/audio_frame_manipulator_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_mixer/audio_frame_manipulator.h"
+
#include <algorithm>
-#include "modules/audio_mixer/audio_frame_manipulator.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_mixer/audio_mixer_impl.cc b/modules/audio_mixer/audio_mixer_impl.cc
index 11f5abf..abfda25 100644
--- a/modules/audio_mixer/audio_mixer_impl.cc
+++ b/modules/audio_mixer/audio_mixer_impl.cc
@@ -11,6 +11,7 @@
#include "modules/audio_mixer/audio_mixer_impl.h"
#include <stdint.h>
+
#include <algorithm>
#include <iterator>
#include <type_traits>
diff --git a/modules/audio_mixer/audio_mixer_impl.h b/modules/audio_mixer/audio_mixer_impl.h
index bab4a3d..70a6f1d 100644
--- a/modules/audio_mixer/audio_mixer_impl.h
+++ b/modules/audio_mixer/audio_mixer_impl.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_
#include <stddef.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_mixer/audio_mixer_impl_unittest.cc b/modules/audio_mixer/audio_mixer_impl_unittest.cc
index e14b69e..16ff338 100644
--- a/modules/audio_mixer/audio_mixer_impl_unittest.cc
+++ b/modules/audio_mixer/audio_mixer_impl_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_mixer/audio_mixer_impl.h"
+
#include <string.h>
#include <limits>
@@ -17,7 +19,6 @@
#include "absl/memory/memory.h"
#include "api/audio/audio_mixer.h"
-#include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/audio_mixer/default_output_rate_calculator.h"
#include "rtc_base/bind.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_mixer/audio_mixer_test.cc b/modules/audio_mixer/audio_mixer_test.cc
index 85854f0..a8e1c23 100644
--- a/modules/audio_mixer/audio_mixer_test.cc
+++ b/modules/audio_mixer/audio_mixer_test.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/audio/audio_mixer.h"
+
#include <cstring>
#include <iostream>
#include <vector>
-#include "api/audio/audio_mixer.h"
#include "common_audio/wav_file.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/audio_mixer/default_output_rate_calculator.h"
diff --git a/modules/audio_mixer/gain_change_calculator.cc b/modules/audio_mixer/gain_change_calculator.cc
index 25e57e9..dbd0945 100644
--- a/modules/audio_mixer/gain_change_calculator.cc
+++ b/modules/audio_mixer/gain_change_calculator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_mixer/gain_change_calculator.h"
#include <math.h>
+
#include <cstdlib>
#include <vector>
diff --git a/modules/audio_processing/aec/aec_core.cc b/modules/audio_processing/aec/aec_core.cc
index f0deddc..1e0f63f 100644
--- a/modules/audio_processing/aec/aec_core.cc
+++ b/modules/audio_processing/aec/aec_core.cc
@@ -18,6 +18,7 @@
#include <stddef.h> // size_t
#include <stdlib.h>
#include <string.h>
+
#include <algorithm>
#include <cmath>
diff --git a/modules/audio_processing/aec/aec_core_mips.cc b/modules/audio_processing/aec/aec_core_mips.cc
index bf89cfa..2b388a7 100644
--- a/modules/audio_processing/aec/aec_core_mips.cc
+++ b/modules/audio_processing/aec/aec_core_mips.cc
@@ -12,10 +12,10 @@
* The core AEC algorithm, which is presented with time-aligned signals.
*/
-#include "modules/audio_processing/aec/aec_core.h"
-
#include <math.h>
+#include "modules/audio_processing/aec/aec_core.h"
+
extern "C" {
#include "common_audio/signal_processing/include/signal_processing_library.h"
}
diff --git a/modules/audio_processing/aec/echo_cancellation.h b/modules/audio_processing/aec/echo_cancellation.h
index 2039347..62dc0f0 100644
--- a/modules/audio_processing/aec/echo_cancellation.h
+++ b/modules/audio_processing/aec/echo_cancellation.h
@@ -11,10 +11,10 @@
#ifndef MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
#define MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_
-#include <memory>
-
#include <stddef.h>
+#include <memory>
+
extern "C" {
#include "common_audio/ring_buffer.h"
}
diff --git a/modules/audio_processing/aec3/adaptive_fir_filter.h b/modules/audio_processing/aec3/adaptive_fir_filter.h
index 5afb80e..a7418b0 100644
--- a/modules/audio_processing/aec3/adaptive_fir_filter.h
+++ b/modules/audio_processing/aec3/adaptive_fir_filter.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_ADAPTIVE_FIR_FILTER_H_
#include <stddef.h>
+
#include <array>
#include <vector>
diff --git a/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc b/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
index 3c4f5a5..4e13bd6 100644
--- a/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
+++ b/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc
@@ -11,12 +11,13 @@
#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
// Defines WEBRTC_ARCH_X86_FAMILY, used below.
-#include "rtc_base/system/arch.h"
-
#include <math.h>
+
#include <algorithm>
#include <numeric>
#include <string>
+
+#include "rtc_base/system/arch.h"
#if defined(WEBRTC_ARCH_X86_FAMILY)
#include <emmintrin.h>
#endif
diff --git a/modules/audio_processing/aec3/aec_state.cc b/modules/audio_processing/aec3/aec_state.cc
index 179d98fe..e4ec9f8 100644
--- a/modules/audio_processing/aec3/aec_state.cc
+++ b/modules/audio_processing/aec3/aec_state.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/aec_state.h"
#include <math.h>
+
#include <algorithm>
#include <numeric>
#include <vector>
diff --git a/modules/audio_processing/aec3/aec_state.h b/modules/audio_processing/aec3/aec_state.h
index 51a8ec0..713fa7e 100644
--- a/modules/audio_processing/aec3/aec_state.h
+++ b/modules/audio_processing/aec3/aec_state.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_
#include <stddef.h>
+
#include <array>
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc b/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc
index 86608aa..b902487 100644
--- a/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc
+++ b/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc
@@ -9,8 +9,8 @@
*/
#include "modules/audio_processing/aec3/api_call_jitter_metrics.h"
-#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/block_delay_buffer.h b/modules/audio_processing/aec3/block_delay_buffer.h
index 624e913..dd57759 100644
--- a/modules/audio_processing/aec3/block_delay_buffer.h
+++ b/modules/audio_processing/aec3/block_delay_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_DELAY_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "modules/audio_processing/audio_buffer.h"
diff --git a/modules/audio_processing/aec3/block_processor.cc b/modules/audio_processing/aec3/block_processor.cc
index 0997b1a..0c31a2e 100644
--- a/modules/audio_processing/aec3/block_processor.cc
+++ b/modules/audio_processing/aec3/block_processor.cc
@@ -7,7 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/aec3/block_processor.h"
+
#include <stddef.h>
+
#include <memory>
#include <utility>
#include <vector>
@@ -16,7 +19,6 @@
#include "api/audio/echo_canceller3_config.h"
#include "api/audio/echo_control.h"
#include "modules/audio_processing/aec3/aec3_common.h"
-#include "modules/audio_processing/aec3/block_processor.h"
#include "modules/audio_processing/aec3/block_processor_metrics.h"
#include "modules/audio_processing/aec3/delay_estimate.h"
#include "modules/audio_processing/aec3/echo_path_variability.h"
diff --git a/modules/audio_processing/aec3/block_processor.h b/modules/audio_processing/aec3/block_processor.h
index bcee3b7..8b1bb90 100644
--- a/modules/audio_processing/aec3/block_processor.h
+++ b/modules/audio_processing/aec3/block_processor.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_H_
#include <stddef.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/aec3/block_processor_metrics_unittest.cc b/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
index 73f7689..3e23c24 100644
--- a/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
+++ b/modules/audio_processing/aec3/block_processor_metrics_unittest.cc
@@ -9,8 +9,8 @@
*/
#include "modules/audio_processing/aec3/block_processor_metrics.h"
-#include "modules/audio_processing/aec3/aec3_common.h"
+#include "modules/audio_processing/aec3/aec3_common.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/cascaded_biquad_filter.h b/modules/audio_processing/aec3/cascaded_biquad_filter.h
index 3d9b14b..34085f1 100644
--- a/modules/audio_processing/aec3/cascaded_biquad_filter.h
+++ b/modules/audio_processing/aec3/cascaded_biquad_filter.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_CASCADED_BIQUAD_FILTER_H_
#include <stddef.h>
+
#include <complex>
#include <vector>
diff --git a/modules/audio_processing/aec3/comfort_noise_generator.h b/modules/audio_processing/aec3/comfort_noise_generator.h
index f78fda2..79bf623 100644
--- a/modules/audio_processing/aec3/comfort_noise_generator.h
+++ b/modules/audio_processing/aec3/comfort_noise_generator.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_COMFORT_NOISE_GENERATOR_H_
#include <stdint.h>
+
#include <array>
#include <memory>
diff --git a/modules/audio_processing/aec3/decimator_unittest.cc b/modules/audio_processing/aec3/decimator_unittest.cc
index 79e7440..cf8de84 100644
--- a/modules/audio_processing/aec3/decimator_unittest.cc
+++ b/modules/audio_processing/aec3/decimator_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/decimator.h"
#include <math.h>
+
#include <algorithm>
#include <array>
#include <cmath>
diff --git a/modules/audio_processing/aec3/downsampled_render_buffer.h b/modules/audio_processing/aec3/downsampled_render_buffer.h
index c91ea3b..fbdc9b4 100644
--- a/modules/audio_processing/aec3/downsampled_render_buffer.h
+++ b/modules/audio_processing/aec3/downsampled_render_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_DOWNSAMPLED_RENDER_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/aec3/echo_canceller3.h b/modules/audio_processing/aec3/echo_canceller3.h
index c1298d2..2782687 100644
--- a/modules/audio_processing/aec3/echo_canceller3.h
+++ b/modules/audio_processing/aec3/echo_canceller3.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_ECHO_CANCELLER3_H_
#include <stddef.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/aec3/echo_path_variability_unittest.cc b/modules/audio_processing/aec3/echo_path_variability_unittest.cc
index b1795ed..0f10f95 100644
--- a/modules/audio_processing/aec3/echo_path_variability_unittest.cc
+++ b/modules/audio_processing/aec3/echo_path_variability_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/aec3/echo_path_variability.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/echo_remover.cc b/modules/audio_processing/aec3/echo_remover.cc
index 493916c..f93288c 100644
--- a/modules/audio_processing/aec3/echo_remover.cc
+++ b/modules/audio_processing/aec3/echo_remover.cc
@@ -11,6 +11,7 @@
#include <math.h>
#include <stddef.h>
+
#include <algorithm>
#include <array>
#include <cmath>
diff --git a/modules/audio_processing/aec3/echo_remover_metrics.cc b/modules/audio_processing/aec3/echo_remover_metrics.cc
index 71d149e..4590f85 100644
--- a/modules/audio_processing/aec3/echo_remover_metrics.cc
+++ b/modules/audio_processing/aec3/echo_remover_metrics.cc
@@ -12,6 +12,7 @@
#include <math.h>
#include <stddef.h>
+
#include <algorithm>
#include <cmath>
#include <numeric>
diff --git a/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc b/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
index 00ce1ea..c16c7ea 100644
--- a/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
+++ b/modules/audio_processing/aec3/echo_remover_metrics_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/echo_remover_metrics.h"
#include <math.h>
+
#include <cmath>
#include "modules/audio_processing/aec3/aec3_fft.h"
diff --git a/modules/audio_processing/aec3/erl_estimator.h b/modules/audio_processing/aec3/erl_estimator.h
index 060fb91..2ca21df 100644
--- a/modules/audio_processing/aec3/erl_estimator.h
+++ b/modules/audio_processing/aec3/erl_estimator.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_
#include <stddef.h>
+
#include <array>
#include "api/array_view.h"
diff --git a/modules/audio_processing/aec3/erle_estimator.h b/modules/audio_processing/aec3/erle_estimator.h
index 8036c21..126774d 100644
--- a/modules/audio_processing/aec3/erle_estimator.h
+++ b/modules/audio_processing/aec3/erle_estimator.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_ERLE_ESTIMATOR_H_
#include <stddef.h>
+
#include <array>
#include <memory>
diff --git a/modules/audio_processing/aec3/erle_estimator_unittest.cc b/modules/audio_processing/aec3/erle_estimator_unittest.cc
index 5ef4f24..ac681b3 100644
--- a/modules/audio_processing/aec3/erle_estimator_unittest.cc
+++ b/modules/audio_processing/aec3/erle_estimator_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/aec3/erle_estimator.h"
+
#include <cmath>
#include "api/array_view.h"
-#include "modules/audio_processing/aec3/erle_estimator.h"
#include "modules/audio_processing/aec3/render_delay_buffer.h"
#include "modules/audio_processing/aec3/vector_buffer.h"
#include "rtc_base/random.h"
diff --git a/modules/audio_processing/aec3/fft_buffer.h b/modules/audio_processing/aec3/fft_buffer.h
index 9f81a91..a367f9e 100644
--- a/modules/audio_processing/aec3/fft_buffer.h
+++ b/modules/audio_processing/aec3/fft_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_FFT_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "modules/audio_processing/aec3/fft_data.h"
diff --git a/modules/audio_processing/aec3/filter_analyzer.cc b/modules/audio_processing/aec3/filter_analyzer.cc
index 6bbeb6e..06bd4b7 100644
--- a/modules/audio_processing/aec3/filter_analyzer.cc
+++ b/modules/audio_processing/aec3/filter_analyzer.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/aec3/filter_analyzer.h"
+
#include <math.h>
#include <algorithm>
diff --git a/modules/audio_processing/aec3/filter_analyzer.h b/modules/audio_processing/aec3/filter_analyzer.h
index 0e1798c..bcce528 100644
--- a/modules/audio_processing/aec3/filter_analyzer.h
+++ b/modules/audio_processing/aec3/filter_analyzer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_FILTER_ANALYZER_H_
#include <stddef.h>
+
#include <array>
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/aec3/frame_blocker.h b/modules/audio_processing/aec3/frame_blocker.h
index 68cee97..759f431 100644
--- a/modules/audio_processing/aec3/frame_blocker.h
+++ b/modules/audio_processing/aec3/frame_blocker.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
#include <stddef.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/audio_processing/aec3/main_filter_update_gain.h b/modules/audio_processing/aec3/main_filter_update_gain.h
index 5c817cd..dca0ff87 100644
--- a/modules/audio_processing/aec3/main_filter_update_gain.h
+++ b/modules/audio_processing/aec3/main_filter_update_gain.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_MAIN_FILTER_UPDATE_GAIN_H_
#include <stddef.h>
+
#include <array>
#include <memory>
diff --git a/modules/audio_processing/aec3/matched_filter.h b/modules/audio_processing/aec3/matched_filter.h
index 084267f..df92453 100644
--- a/modules/audio_processing/aec3/matched_filter.h
+++ b/modules/audio_processing/aec3/matched_filter.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_MATCHED_FILTER_H_
#include <stddef.h>
+
#include <vector>
#include "api/array_view.h"
@@ -66,7 +67,6 @@
} // namespace aec3
-
// Produces recursively updated cross-correlation estimates for several signal
// shifts where the intra-shift spacing is uniform.
class MatchedFilter {
diff --git a/modules/audio_processing/aec3/matrix_buffer.h b/modules/audio_processing/aec3/matrix_buffer.h
index cae3759..8fb96d21 100644
--- a/modules/audio_processing/aec3/matrix_buffer.h
+++ b/modules/audio_processing/aec3/matrix_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_MATRIX_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/aec3/moving_average.h b/modules/audio_processing/aec3/moving_average.h
index 0f855be..913d785 100644
--- a/modules/audio_processing/aec3/moving_average.h
+++ b/modules/audio_processing/aec3/moving_average.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_MOVING_AVERAGE_H_
#include <stddef.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/audio_processing/aec3/moving_average_unittest.cc b/modules/audio_processing/aec3/moving_average_unittest.cc
index 05542d1..84ba9cb 100644
--- a/modules/audio_processing/aec3/moving_average_unittest.cc
+++ b/modules/audio_processing/aec3/moving_average_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/aec3/moving_average.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/render_buffer.h b/modules/audio_processing/aec3/render_buffer.h
index cc6cd1c..762eab8 100644
--- a/modules/audio_processing/aec3/render_buffer.h
+++ b/modules/audio_processing/aec3/render_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_BUFFER_H_
#include <stddef.h>
+
#include <array>
#include <vector>
diff --git a/modules/audio_processing/aec3/render_delay_buffer.cc b/modules/audio_processing/aec3/render_delay_buffer.cc
index 0b2e979..1a48f15 100644
--- a/modules/audio_processing/aec3/render_delay_buffer.cc
+++ b/modules/audio_processing/aec3/render_delay_buffer.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/aec3/render_delay_buffer.h"
+
#include <string.h>
+
#include <algorithm>
#include <memory>
#include <numeric>
@@ -25,7 +28,6 @@
#include "modules/audio_processing/aec3/fft_data.h"
#include "modules/audio_processing/aec3/matrix_buffer.h"
#include "modules/audio_processing/aec3/render_buffer.h"
-#include "modules/audio_processing/aec3/render_delay_buffer.h"
#include "modules/audio_processing/aec3/vector_buffer.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/atomic_ops.h"
diff --git a/modules/audio_processing/aec3/render_delay_buffer.h b/modules/audio_processing/aec3/render_delay_buffer.h
index 89b3a2a..970cf91 100644
--- a/modules/audio_processing/aec3/render_delay_buffer.h
+++ b/modules/audio_processing/aec3/render_delay_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "api/audio/echo_canceller3_config.h"
diff --git a/modules/audio_processing/aec3/render_delay_controller.cc b/modules/audio_processing/aec3/render_delay_controller.cc
index e8423cb..ceafa21 100644
--- a/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/modules/audio_processing/aec3/render_delay_controller.cc
@@ -7,7 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/aec3/render_delay_controller.h"
+
#include <stddef.h>
+
#include <algorithm>
#include <memory>
@@ -18,7 +21,6 @@
#include "modules/audio_processing/aec3/delay_estimate.h"
#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "modules/audio_processing/aec3/echo_path_delay_estimator.h"
-#include "modules/audio_processing/aec3/render_delay_controller.h"
#include "modules/audio_processing/aec3/render_delay_controller_metrics.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/atomic_ops.h"
diff --git a/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc b/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
index 216b0e2..e7d7703 100644
--- a/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
+++ b/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
@@ -9,9 +9,9 @@
*/
#include "modules/audio_processing/aec3/render_delay_controller_metrics.h"
+
#include "absl/types/optional.h"
#include "modules/audio_processing/aec3/aec3_common.h"
-
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/render_signal_analyzer.cc b/modules/audio_processing/aec3/render_signal_analyzer.cc
index 33b04bf..e3e41a7 100644
--- a/modules/audio_processing/aec3/render_signal_analyzer.cc
+++ b/modules/audio_processing/aec3/render_signal_analyzer.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/render_signal_analyzer.h"
#include <math.h>
+
#include <algorithm>
#include <utility>
#include <vector>
diff --git a/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc b/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
index ffd7fe2..1adfbfb 100644
--- a/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
+++ b/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/render_signal_analyzer.h"
#include <math.h>
+
#include <array>
#include <cmath>
#include <vector>
diff --git a/modules/audio_processing/aec3/residual_echo_estimator.cc b/modules/audio_processing/aec3/residual_echo_estimator.cc
index eaeaf49..a6fd2ff 100644
--- a/modules/audio_processing/aec3/residual_echo_estimator.cc
+++ b/modules/audio_processing/aec3/residual_echo_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/residual_echo_estimator.h"
#include <stddef.h>
+
#include <algorithm>
#include <vector>
diff --git a/modules/audio_processing/aec3/reverb_decay_estimator.cc b/modules/audio_processing/aec3/reverb_decay_estimator.cc
index cdcbee5..2415931 100644
--- a/modules/audio_processing/aec3/reverb_decay_estimator.cc
+++ b/modules/audio_processing/aec3/reverb_decay_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/reverb_decay_estimator.h"
#include <stddef.h>
+
#include <algorithm>
#include <cmath>
#include <numeric>
diff --git a/modules/audio_processing/aec3/reverb_frequency_response.cc b/modules/audio_processing/aec3/reverb_frequency_response.cc
index 98eeca6..f4bd91f 100644
--- a/modules/audio_processing/aec3/reverb_frequency_response.cc
+++ b/modules/audio_processing/aec3/reverb_frequency_response.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/reverb_frequency_response.h"
#include <stddef.h>
+
#include <algorithm>
#include <array>
#include <numeric>
@@ -59,7 +60,6 @@
int filter_delay_blocks,
const absl::optional<float>& linear_filter_quality,
bool stationary_block) {
-
if (stationary_block || !linear_filter_quality) {
return;
}
diff --git a/modules/audio_processing/aec3/reverb_model.cc b/modules/audio_processing/aec3/reverb_model.cc
index f0a24c0..ca65960 100644
--- a/modules/audio_processing/aec3/reverb_model.cc
+++ b/modules/audio_processing/aec3/reverb_model.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/reverb_model.h"
#include <stddef.h>
+
#include <algorithm>
#include <functional>
diff --git a/modules/audio_processing/aec3/reverb_model_estimator_unittest.cc b/modules/audio_processing/aec3/reverb_model_estimator_unittest.cc
index 9947ed7..8fce9d2 100644
--- a/modules/audio_processing/aec3/reverb_model_estimator_unittest.cc
+++ b/modules/audio_processing/aec3/reverb_model_estimator_unittest.cc
@@ -21,7 +21,6 @@
#include "modules/audio_processing/aec3/aec3_fft.h"
#include "modules/audio_processing/aec3/fft_data.h"
#include "rtc_base/checks.h"
-
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/aec3/reverb_model_fallback.h b/modules/audio_processing/aec3/reverb_model_fallback.h
index 1bd2b59..83ad233 100644
--- a/modules/audio_processing/aec3/reverb_model_fallback.h
+++ b/modules/audio_processing/aec3/reverb_model_fallback.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_REVERB_MODEL_FALLBACK_H_
#include <stddef.h>
+
#include <array>
#include <vector>
diff --git a/modules/audio_processing/aec3/shadow_filter_update_gain.h b/modules/audio_processing/aec3/shadow_filter_update_gain.h
index 05e632f..9d14807 100644
--- a/modules/audio_processing/aec3/shadow_filter_update_gain.h
+++ b/modules/audio_processing/aec3/shadow_filter_update_gain.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_SHADOW_FILTER_UPDATE_GAIN_H_
#include <stddef.h>
+
#include <array>
#include "api/audio/echo_canceller3_config.h"
diff --git a/modules/audio_processing/aec3/stationarity_estimator.h b/modules/audio_processing/aec3/stationarity_estimator.h
index 704859a..023043b 100644
--- a/modules/audio_processing/aec3/stationarity_estimator.h
+++ b/modules/audio_processing/aec3/stationarity_estimator.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_STATIONARITY_ESTIMATOR_H_
#include <stddef.h>
+
#include <array>
#include <memory>
diff --git a/modules/audio_processing/aec3/subband_erle_estimator.h b/modules/audio_processing/aec3/subband_erle_estimator.h
index 903c629..0a22d61 100644
--- a/modules/audio_processing/aec3/subband_erle_estimator.h
+++ b/modules/audio_processing/aec3/subband_erle_estimator.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_SUBBAND_ERLE_ESTIMATOR_H_
#include <stddef.h>
+
#include <array>
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/aec3/subtractor.h b/modules/audio_processing/aec3/subtractor.h
index 910be18..ccff7c1 100644
--- a/modules/audio_processing/aec3/subtractor.h
+++ b/modules/audio_processing/aec3/subtractor.h
@@ -13,6 +13,7 @@
#include <math.h>
#include <stddef.h>
+
#include <array>
#include <vector>
diff --git a/modules/audio_processing/aec3/suppression_filter_unittest.cc b/modules/audio_processing/aec3/suppression_filter_unittest.cc
index 2c745ad..80d96ec 100644
--- a/modules/audio_processing/aec3/suppression_filter_unittest.cc
+++ b/modules/audio_processing/aec3/suppression_filter_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/aec3/suppression_filter.h"
#include <math.h>
+
#include <algorithm>
#include <cmath>
#include <numeric>
diff --git a/modules/audio_processing/aec3/suppression_gain.cc b/modules/audio_processing/aec3/suppression_gain.cc
index b741a71..4831b71 100644
--- a/modules/audio_processing/aec3/suppression_gain.cc
+++ b/modules/audio_processing/aec3/suppression_gain.cc
@@ -12,6 +12,7 @@
#include <math.h>
#include <stddef.h>
+
#include <algorithm>
#include <numeric>
@@ -264,9 +265,9 @@
std::array<float, kFftLengthBy2Plus1> max_gain;
GetMaxGain(max_gain);
- GainToNoAudibleEcho(nearend, weighted_residual_echo, comfort_noise,
- min_gain, max_gain, gain);
- AdjustForExternalFilters(gain);
+ GainToNoAudibleEcho(nearend, weighted_residual_echo, comfort_noise, min_gain,
+ max_gain, gain);
+ AdjustForExternalFilters(gain);
// Adjust the gain for frequencies which have not yet converged.
AdjustNonConvergedFrequencies(gain);
diff --git a/modules/audio_processing/aec3/vector_buffer.h b/modules/audio_processing/aec3/vector_buffer.h
index 4c0257c..9d1539f 100644
--- a/modules/audio_processing/aec3/vector_buffer.h
+++ b/modules/audio_processing/aec3/vector_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_VECTOR_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/aec3/vector_math.h b/modules/audio_processing/aec3/vector_math.h
index 255331b..883cd95 100644
--- a/modules/audio_processing/aec3/vector_math.h
+++ b/modules/audio_processing/aec3/vector_math.h
@@ -21,6 +21,7 @@
#include <emmintrin.h>
#endif
#include <math.h>
+
#include <algorithm>
#include <array>
#include <functional>
diff --git a/modules/audio_processing/aec_dump/aec_dump_impl.cc b/modules/audio_processing/aec_dump/aec_dump_impl.cc
index ba15336..904033a 100644
--- a/modules/audio_processing/aec_dump/aec_dump_impl.cc
+++ b/modules/audio_processing/aec_dump/aec_dump_impl.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <utility>
-
#include "modules/audio_processing/aec_dump/aec_dump_impl.h"
+#include <utility>
+
#include "absl/memory/memory.h"
#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/aec_dump/aec_dump_unittest.cc b/modules/audio_processing/aec_dump/aec_dump_unittest.cc
index 561fa62..3624bfc 100644
--- a/modules/audio_processing/aec_dump/aec_dump_unittest.cc
+++ b/modules/audio_processing/aec_dump/aec_dump_unittest.cc
@@ -11,7 +11,6 @@
#include <utility>
#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
-
#include "rtc_base/task_queue_for_test.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/modules/audio_processing/aecm/aecm_core.cc b/modules/audio_processing/aecm/aecm_core.cc
index 67b70bf..78d8dfd 100644
--- a/modules/audio_processing/aecm/aecm_core.cc
+++ b/modules/audio_processing/aecm/aecm_core.cc
@@ -21,7 +21,6 @@
#include "common_audio/signal_processing/include/signal_processing_library.h"
#include "modules/audio_processing/aecm/echo_control_mobile.h"
#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
-
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
@@ -440,9 +439,8 @@
aecm->farEnergyMin = WEBRTC_SPL_WORD16_MAX;
aecm->farEnergyMax = WEBRTC_SPL_WORD16_MIN;
aecm->farEnergyMaxMin = 0;
- aecm->farEnergyVAD =
- FAR_ENERGY_MIN; // This prevents false speech detection at the
- // beginning.
+ aecm->farEnergyVAD = FAR_ENERGY_MIN; // This prevents false speech detection
+ // at the beginning.
aecm->farEnergyMSE = 0;
aecm->currentVADValue = 0;
aecm->vadUpdateCount = 0;
diff --git a/modules/audio_processing/aecm/aecm_core_c.cc b/modules/audio_processing/aecm/aecm_core_c.cc
index 905274f..2727182 100644
--- a/modules/audio_processing/aecm/aecm_core_c.cc
+++ b/modules/audio_processing/aecm/aecm_core_c.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_processing/aecm/aecm_core.h"
-
#include <stddef.h>
#include <stdlib.h>
+#include "modules/audio_processing/aecm/aecm_core.h"
+
extern "C" {
#include "common_audio/ring_buffer.h"
#include "common_audio/signal_processing/include/real_fft.h"
@@ -198,11 +198,11 @@
} else if (freq_signal[i].imag == 0) {
freq_signal_abs[i] = (uint16_t)WEBRTC_SPL_ABS_W16(freq_signal[i].real);
} else {
-// Approximation for magnitude of complex fft output
-// magn = sqrt(real^2 + imag^2)
-// magn ~= alpha * max(|imag|,|real|) + beta * min(|imag|,|real|)
-//
-// The parameters alpha and beta are stored in Q15
+ // Approximation for magnitude of complex fft output
+ // magn = sqrt(real^2 + imag^2)
+ // magn ~= alpha * max(|imag|,|real|) + beta * min(|imag|,|real|)
+ //
+ // The parameters alpha and beta are stored in Q15
#ifdef AECM_WITH_ABS_APPROX
tmp16no1 = WEBRTC_SPL_ABS_W16(freq_signal[i].real);
diff --git a/modules/audio_processing/aecm/aecm_core_mips.cc b/modules/audio_processing/aecm/aecm_core_mips.cc
index 11e4095..75aee91 100644
--- a/modules/audio_processing/aecm/aecm_core_mips.cc
+++ b/modules/audio_processing/aecm/aecm_core_mips.cc
@@ -9,7 +9,6 @@
*/
#include "modules/audio_processing/aecm/aecm_core.h"
-
#include "modules/audio_processing/aecm/echo_control_mobile.h"
#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/aecm/aecm_core_neon.cc b/modules/audio_processing/aecm/aecm_core_neon.cc
index a2153a2..94a318b 100644
--- a/modules/audio_processing/aecm/aecm_core_neon.cc
+++ b/modules/audio_processing/aecm/aecm_core_neon.cc
@@ -8,11 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_processing/aecm/aecm_core.h"
-
#include <arm_neon.h>
#include "common_audio/signal_processing/include/real_fft.h"
+#include "modules/audio_processing/aecm/aecm_core.h"
#include "rtc_base/checks.h"
// TODO(kma): Re-write the corresponding assembly file, the offset
diff --git a/modules/audio_processing/agc/loudness_histogram.cc b/modules/audio_processing/agc/loudness_histogram.cc
index cd57b82..4775ff7 100644
--- a/modules/audio_processing/agc/loudness_histogram.cc
+++ b/modules/audio_processing/agc/loudness_histogram.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc/loudness_histogram.h"
#include <string.h>
+
#include <cmath>
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/agc/loudness_histogram.h b/modules/audio_processing/agc/loudness_histogram.h
index b210be9..badd443 100644
--- a/modules/audio_processing/agc/loudness_histogram.h
+++ b/modules/audio_processing/agc/loudness_histogram.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AGC_LOUDNESS_HISTOGRAM_H_
#include <stdint.h>
+
#include <memory>
namespace webrtc {
diff --git a/modules/audio_processing/agc/loudness_histogram_unittest.cc b/modules/audio_processing/agc/loudness_histogram_unittest.cc
index 0c291d8..30ea5d3 100644
--- a/modules/audio_processing/agc/loudness_histogram_unittest.cc
+++ b/modules/audio_processing/agc/loudness_histogram_unittest.cc
@@ -13,6 +13,7 @@
#include "modules/audio_processing/agc/loudness_histogram.h"
#include <stdio.h>
+
#include <algorithm>
#include <cmath>
#include <memory>
diff --git a/modules/audio_processing/agc/mock_agc.h b/modules/audio_processing/agc/mock_agc.h
index 4297e2a..d31c265 100644
--- a/modules/audio_processing/agc/mock_agc.h
+++ b/modules/audio_processing/agc/mock_agc.h
@@ -12,7 +12,6 @@
#define MODULES_AUDIO_PROCESSING_AGC_MOCK_AGC_H_
#include "modules/audio_processing/agc/agc.h"
-
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/audio_processing/agc2/agc2_common.cc b/modules/audio_processing/agc2/agc2_common.cc
index 1107885..3f697d1 100644
--- a/modules/audio_processing/agc2/agc2_common.cc
+++ b/modules/audio_processing/agc2/agc2_common.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc2/agc2_common.h"
#include <stdio.h>
+
#include <string>
#include "system_wrappers/include/field_trial.h"
diff --git a/modules/audio_processing/agc2/agc2_testing_common_unittest.cc b/modules/audio_processing/agc2/agc2_testing_common_unittest.cc
index b9f7126..f52ea3c 100644
--- a/modules/audio_processing/agc2/agc2_testing_common_unittest.cc
+++ b/modules/audio_processing/agc2/agc2_testing_common_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/agc2/agc2_testing_common.h"
+
#include "rtc_base/gunit.h"
namespace webrtc {
diff --git a/modules/audio_processing/agc2/down_sampler.cc b/modules/audio_processing/agc2/down_sampler.cc
index 50486e0..654ed4b 100644
--- a/modules/audio_processing/agc2/down_sampler.cc
+++ b/modules/audio_processing/agc2/down_sampler.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc2/down_sampler.h"
#include <string.h>
+
#include <algorithm>
#include "modules/audio_processing/agc2/biquad_filter.h"
diff --git a/modules/audio_processing/agc2/interpolated_gain_curve.cc b/modules/audio_processing/agc2/interpolated_gain_curve.cc
index f5d6b47..502e702 100644
--- a/modules/audio_processing/agc2/interpolated_gain_curve.cc
+++ b/modules/audio_processing/agc2/interpolated_gain_curve.cc
@@ -113,7 +113,9 @@
}
break;
}
- default: { RTC_NOTREACHED(); }
+ default: {
+ RTC_NOTREACHED();
+ }
}
}
diff --git a/modules/audio_processing/agc2/interpolated_gain_curve.h b/modules/audio_processing/agc2/interpolated_gain_curve.h
index 1ecb94e..ef1c027 100644
--- a/modules/audio_processing/agc2/interpolated_gain_curve.h
+++ b/modules/audio_processing/agc2/interpolated_gain_curve.h
@@ -15,7 +15,6 @@
#include <string>
#include "modules/audio_processing/agc2/agc2_common.h"
-
#include "rtc_base/constructor_magic.h"
#include "rtc_base/gtest_prod_util.h"
#include "system_wrappers/include/metrics.h"
diff --git a/modules/audio_processing/agc2/interpolated_gain_curve_unittest.cc b/modules/audio_processing/agc2/interpolated_gain_curve_unittest.cc
index a8e0f23..67d34e5 100644
--- a/modules/audio_processing/agc2/interpolated_gain_curve_unittest.cc
+++ b/modules/audio_processing/agc2/interpolated_gain_curve_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/agc2/interpolated_gain_curve.h"
+
#include <array>
#include <type_traits>
#include <vector>
@@ -16,7 +18,6 @@
#include "common_audio/include/audio_util.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/agc2/compute_interpolated_gain_curve.h"
-#include "modules/audio_processing/agc2/interpolated_gain_curve.h"
#include "modules/audio_processing/agc2/limiter_db_gain_curve.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/agc2/noise_level_estimator.cc b/modules/audio_processing/agc2/noise_level_estimator.cc
index 6e43672..2ca5034 100644
--- a/modules/audio_processing/agc2/noise_level_estimator.cc
+++ b/modules/audio_processing/agc2/noise_level_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc2/noise_level_estimator.h"
#include <stddef.h>
+
#include <algorithm>
#include <cmath>
#include <numeric>
diff --git a/modules/audio_processing/agc2/noise_spectrum_estimator.cc b/modules/audio_processing/agc2/noise_spectrum_estimator.cc
index 5735faf..31438b1 100644
--- a/modules/audio_processing/agc2/noise_spectrum_estimator.cc
+++ b/modules/audio_processing/agc2/noise_spectrum_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc2/noise_spectrum_estimator.h"
#include <string.h>
+
#include <algorithm>
#include "api/array_view.h"
diff --git a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc
index 0561c37..af3619b 100644
--- a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc
+++ b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h"
#include <stdlib.h>
+
#include <algorithm>
#include <cmath>
#include <cstddef>
diff --git a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h
index 6ccd165..2cc5ce6 100644
--- a/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h
+++ b/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_PITCH_SEARCH_INTERNAL_H_
#include <stddef.h>
+
#include <array>
#include "api/array_view.h"
diff --git a/modules/audio_processing/agc2/rnn_vad/pitch_search_unittest.cc b/modules/audio_processing/agc2/rnn_vad/pitch_search_unittest.cc
index 494dfe7..99c9dfa 100644
--- a/modules/audio_processing/agc2/rnn_vad/pitch_search_unittest.cc
+++ b/modules/audio_processing/agc2/rnn_vad/pitch_search_unittest.cc
@@ -9,12 +9,12 @@
*/
#include "modules/audio_processing/agc2/rnn_vad/pitch_search.h"
-#include "modules/audio_processing/agc2/rnn_vad/pitch_info.h"
-#include "modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h"
#include <algorithm>
#include <vector>
+#include "modules/audio_processing/agc2/rnn_vad/pitch_info.h"
+#include "modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h"
#include "modules/audio_processing/agc2/rnn_vad/test_utils.h"
// TODO(bugs.webrtc.org/8948): Add when the issue is fixed.
// #include "test/fpe_observer.h"
diff --git a/modules/audio_processing/agc2/rnn_vad/rnn.cc b/modules/audio_processing/agc2/rnn_vad/rnn.cc
index 2b36034..a5b34c4 100644
--- a/modules/audio_processing/agc2/rnn_vad/rnn.cc
+++ b/modules/audio_processing/agc2/rnn_vad/rnn.cc
@@ -25,21 +25,21 @@
using rnnoise::kInputLayerInputSize;
static_assert(kFeatureVectorSize == kInputLayerInputSize, "");
-using rnnoise::kInputDenseWeights;
using rnnoise::kInputDenseBias;
+using rnnoise::kInputDenseWeights;
using rnnoise::kInputLayerOutputSize;
static_assert(kInputLayerOutputSize <= kFullyConnectedLayersMaxUnits,
"Increase kFullyConnectedLayersMaxUnits.");
+using rnnoise::kHiddenGruBias;
using rnnoise::kHiddenGruRecurrentWeights;
using rnnoise::kHiddenGruWeights;
-using rnnoise::kHiddenGruBias;
using rnnoise::kHiddenLayerOutputSize;
static_assert(kHiddenLayerOutputSize <= kRecurrentLayersMaxUnits,
"Increase kRecurrentLayersMaxUnits.");
-using rnnoise::kOutputDenseWeights;
using rnnoise::kOutputDenseBias;
+using rnnoise::kOutputDenseWeights;
using rnnoise::kOutputLayerOutputSize;
static_assert(kOutputLayerOutputSize <= kFullyConnectedLayersMaxUnits,
"Increase kFullyConnectedLayersMaxUnits.");
diff --git a/modules/audio_processing/agc2/rnn_vad/rnn.h b/modules/audio_processing/agc2/rnn_vad/rnn.h
index a7d057d..1129464 100644
--- a/modules/audio_processing/agc2/rnn_vad/rnn.h
+++ b/modules/audio_processing/agc2/rnn_vad/rnn.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <sys/types.h>
+
#include <array>
#include "api/array_view.h"
diff --git a/modules/audio_processing/agc2/rnn_vad/rnn_unittest.cc b/modules/audio_processing/agc2/rnn_vad/rnn_unittest.cc
index 933b555..40ac70b 100644
--- a/modules/audio_processing/agc2/rnn_vad/rnn_unittest.cc
+++ b/modules/audio_processing/agc2/rnn_vad/rnn_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/agc2/rnn_vad/rnn.h"
+
#include <array>
-#include "modules/audio_processing/agc2/rnn_vad/rnn.h"
#include "modules/audio_processing/agc2/rnn_vad/test_utils.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h b/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h
index 24b0219..ed4caad 100644
--- a/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h
+++ b/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_SPECTRAL_FEATURES_INTERNAL_H_
#include <stddef.h>
+
#include <array>
#include <vector>
diff --git a/modules/audio_processing/audio_buffer.cc b/modules/audio_processing/audio_buffer.cc
index 0c38a4f..1a99463 100644
--- a/modules/audio_processing/audio_buffer.cc
+++ b/modules/audio_processing/audio_buffer.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/audio_buffer.h"
#include <string.h>
+
#include <cstdint>
#include "common_audio/channel_buffer.h"
diff --git a/modules/audio_processing/audio_buffer.h b/modules/audio_processing/audio_buffer.h
index a85144b..8fba9f9 100644
--- a/modules/audio_processing/audio_buffer.h
+++ b/modules/audio_processing/audio_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/audio_buffer_unittest.cc b/modules/audio_processing/audio_buffer_unittest.cc
index 4cbb98e..5c23159 100644
--- a/modules/audio_processing/audio_buffer_unittest.cc
+++ b/modules/audio_processing/audio_buffer_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/audio_buffer.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index a700038..9b4ae81 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -1492,7 +1492,9 @@
TRACE_EVENT0("webrtc", "AudioProcessing::AnalyzeReverseStream_ChannelLayout");
rtc::CritScope cs(&crit_render_);
const StreamConfig reverse_config = {
- sample_rate_hz, ChannelsFromLayout(layout), LayoutHasKeyboard(layout),
+ sample_rate_hz,
+ ChannelsFromLayout(layout),
+ LayoutHasKeyboard(layout),
};
if (samples_per_channel != reverse_config.num_frames()) {
return kBadDataLengthError;
diff --git a/modules/audio_processing/audio_processing_impl_locking_unittest.cc b/modules/audio_processing/audio_processing_impl_locking_unittest.cc
index 9063980..9182d2c 100644
--- a/modules/audio_processing/audio_processing_impl_locking_unittest.cc
+++ b/modules/audio_processing/audio_processing_impl_locking_unittest.cc
@@ -8,13 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_processing/audio_processing_impl.h"
-
#include <algorithm>
#include <memory>
#include <vector>
#include "api/array_view.h"
+#include "modules/audio_processing/audio_processing_impl.h"
#include "modules/audio_processing/test/test_utils.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/event.h"
diff --git a/modules/audio_processing/audio_processing_performance_unittest.cc b/modules/audio_processing/audio_processing_performance_unittest.cc
index 993b8b6..4e297a5 100644
--- a/modules/audio_processing/audio_processing_performance_unittest.cc
+++ b/modules/audio_processing/audio_processing_performance_unittest.cc
@@ -7,8 +7,6 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_processing/audio_processing_impl.h"
-
#include <math.h>
#include <algorithm>
@@ -16,6 +14,7 @@
#include <vector>
#include "api/array_view.h"
+#include "modules/audio_processing/audio_processing_impl.h"
#include "modules/audio_processing/test/test_utils.h"
#include "rtc_base/atomic_ops.h"
#include "rtc_base/event.h"
diff --git a/modules/audio_processing/audio_processing_unittest.cc b/modules/audio_processing/audio_processing_unittest.cc
index 2c23cb3..831799f 100644
--- a/modules/audio_processing/audio_processing_unittest.cc
+++ b/modules/audio_processing/audio_processing_unittest.cc
@@ -7,6 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/include/audio_processing.h"
+
#include <math.h>
#include <stdio.h>
@@ -23,7 +25,6 @@
#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
#include "modules/audio_processing/audio_processing_impl.h"
#include "modules/audio_processing/common.h"
-#include "modules/audio_processing/include/audio_processing.h"
#include "modules/audio_processing/include/mock_audio_processing.h"
#include "modules/audio_processing/test/protobuf_utils.h"
#include "modules/audio_processing/test/test_utils.h"
@@ -78,16 +79,11 @@
enum StreamDirection { kForward = 0, kReverse };
void ConvertToFloat(const int16_t* int_data, ChannelBuffer<float>* cb) {
- ChannelBuffer<int16_t> cb_int(cb->num_frames(),
- cb->num_channels());
- Deinterleave(int_data,
- cb->num_frames(),
- cb->num_channels(),
+ ChannelBuffer<int16_t> cb_int(cb->num_frames(), cb->num_channels());
+ Deinterleave(int_data, cb->num_frames(), cb->num_channels(),
cb_int.channels());
for (size_t i = 0; i < cb->num_channels(); ++i) {
- S16ToFloat(cb_int.channels()[i],
- cb->num_frames(),
- cb->channels()[i]);
+ S16ToFloat(cb_int.channels()[i], cb->num_frames(), cb->channels()[i]);
}
}
@@ -110,13 +106,15 @@
return 0;
}
-void MixStereoToMono(const float* stereo, float* mono,
+void MixStereoToMono(const float* stereo,
+ float* mono,
size_t samples_per_channel) {
for (size_t i = 0; i < samples_per_channel; ++i)
mono[i] = (stereo[i * 2] + stereo[i * 2 + 1]) / 2;
}
-void MixStereoToMono(const int16_t* stereo, int16_t* mono,
+void MixStereoToMono(const int16_t* stereo,
+ int16_t* mono,
size_t samples_per_channel) {
for (size_t i = 0; i < samples_per_channel; ++i)
mono[i] = (stereo[i * 2] + stereo[i * 2 + 1]) >> 1;
@@ -206,7 +204,7 @@
// These functions are only used by ApmTest.Process.
template <class T>
T AbsValue(T a) {
- return a > 0 ? a: -a;
+ return a > 0 ? a : -a;
}
int16_t MaxAudioFrame(const AudioFrame& frame) {
@@ -232,7 +230,7 @@
ASSERT_EQ(1u, fwrite(&size, sizeof(size), 1, file));
ASSERT_EQ(static_cast<size_t>(size),
- fwrite(array.get(), sizeof(array[0]), size, file));
+ fwrite(array.get(), sizeof(array[0]), size, file));
fclose(file);
}
@@ -317,7 +315,9 @@
//
// |int_data| and |float_data| are just temporary space that must be
// sufficiently large to hold the 10 ms chunk.
-bool ReadChunk(FILE* file, int16_t* int_data, float* float_data,
+bool ReadChunk(FILE* file,
+ int16_t* int_data,
+ float* float_data,
ChannelBuffer<float>* cb) {
// The files always contain stereo audio.
size_t frame_size = cb->num_frames() * 2;
@@ -332,8 +332,7 @@
if (cb->num_channels() == 1) {
MixStereoToMono(float_data, cb->channels()[0], cb->num_frames());
} else {
- Deinterleave(float_data, cb->num_frames(), 2,
- cb->channels());
+ Deinterleave(float_data, cb->num_frames(), 2, cb->channels());
}
return true;
@@ -350,10 +349,7 @@
static void TearDownTestSuite() { ClearTempFiles(); }
// Used to select between int and float interface tests.
- enum Format {
- kIntFormat,
- kFloatFormat
- };
+ enum Format { kIntFormat, kFloatFormat };
void Init(int sample_rate_hz,
int output_sample_rate_hz,
@@ -367,11 +363,14 @@
bool ReadFrame(FILE* file, AudioFrame* frame);
bool ReadFrame(FILE* file, AudioFrame* frame, ChannelBuffer<float>* cb);
void ReadFrameWithRewind(FILE* file, AudioFrame* frame);
- void ReadFrameWithRewind(FILE* file, AudioFrame* frame,
+ void ReadFrameWithRewind(FILE* file,
+ AudioFrame* frame,
ChannelBuffer<float>* cb);
void ProcessWithDefaultStreamParameters(AudioFrame* frame);
- void ProcessDelayVerificationTest(int delay_ms, int system_delay_ms,
- int delay_min, int delay_max);
+ void ProcessDelayVerificationTest(int delay_ms,
+ int system_delay_ms,
+ int delay_min,
+ int delay_max);
void TestChangingChannelsInt16Interface(
size_t num_channels,
AudioProcessing::Error expected_return);
@@ -408,11 +407,11 @@
ApmTest::ApmTest()
: output_path_(test::OutputPath()),
#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
- ref_filename_(test::ResourcePath("audio_processing/output_data_fixed",
- "pb")),
+ ref_filename_(
+ test::ResourcePath("audio_processing/output_data_fixed", "pb")),
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
- ref_filename_(test::ResourcePath("audio_processing/output_data_float",
- "pb")),
+ ref_filename_(
+ test::ResourcePath("audio_processing/output_data_float", "pb")),
#endif
frame_(NULL),
revframe_(NULL),
@@ -491,16 +490,14 @@
}
std::string filename = ResourceFilePath("far", sample_rate_hz);
far_file_ = fopen(filename.c_str(), "rb");
- ASSERT_TRUE(far_file_ != NULL) << "Could not open file " <<
- filename << "\n";
+ ASSERT_TRUE(far_file_ != NULL) << "Could not open file " << filename << "\n";
if (near_file_) {
ASSERT_EQ(0, fclose(near_file_));
}
filename = ResourceFilePath("near", sample_rate_hz);
near_file_ = fopen(filename.c_str(), "rb");
- ASSERT_TRUE(near_file_ != NULL) << "Could not open file " <<
- filename << "\n";
+ ASSERT_TRUE(near_file_ != NULL) << "Could not open file " << filename << "\n";
if (open_output_file) {
if (out_file_) {
@@ -511,8 +508,8 @@
reverse_sample_rate_hz, num_input_channels, num_output_channels,
num_reverse_channels, num_reverse_channels, kForward);
out_file_ = fopen(filename.c_str(), "wb");
- ASSERT_TRUE(out_file_ != NULL) << "Could not open file " <<
- filename << "\n";
+ ASSERT_TRUE(out_file_ != NULL)
+ << "Could not open file " << filename << "\n";
}
}
@@ -520,14 +517,13 @@
EnableAllAPComponents(apm_.get());
}
-bool ApmTest::ReadFrame(FILE* file, AudioFrame* frame,
+bool ApmTest::ReadFrame(FILE* file,
+ AudioFrame* frame,
ChannelBuffer<float>* cb) {
// The files always contain stereo audio.
size_t frame_size = frame->samples_per_channel_ * 2;
- size_t read_count = fread(frame->mutable_data(),
- sizeof(int16_t),
- frame_size,
- file);
+ size_t read_count =
+ fread(frame->mutable_data(), sizeof(int16_t), frame_size, file);
if (read_count != frame_size) {
// Check that the file really ended.
EXPECT_NE(0, feof(file));
@@ -551,7 +547,8 @@
// If the end of the file has been reached, rewind it and attempt to read the
// frame again.
-void ApmTest::ReadFrameWithRewind(FILE* file, AudioFrame* frame,
+void ApmTest::ReadFrameWithRewind(FILE* file,
+ AudioFrame* frame,
ChannelBuffer<float>* cb) {
if (!ReadFrame(near_file_, frame_, cb)) {
rewind(near_file_);
@@ -565,8 +562,7 @@
void ApmTest::ProcessWithDefaultStreamParameters(AudioFrame* frame) {
EXPECT_EQ(apm_->kNoError, apm_->set_stream_delay_ms(0));
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(127));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_stream_analog_level(127));
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame));
}
@@ -574,13 +570,11 @@
if (format == kIntFormat) {
return apm_->ProcessStream(frame_);
}
- return apm_->ProcessStream(float_cb_->channels(),
- frame_->samples_per_channel_,
- frame_->sample_rate_hz_,
- LayoutFromChannels(frame_->num_channels_),
- output_sample_rate_hz_,
- LayoutFromChannels(num_output_channels_),
- float_cb_->channels());
+ return apm_->ProcessStream(
+ float_cb_->channels(), frame_->samples_per_channel_,
+ frame_->sample_rate_hz_, LayoutFromChannels(frame_->num_channels_),
+ output_sample_rate_hz_, LayoutFromChannels(num_output_channels_),
+ float_cb_->channels());
}
int ApmTest::AnalyzeReverseStreamChooser(Format format) {
@@ -588,14 +582,14 @@
return apm_->ProcessReverseStream(revframe_);
}
return apm_->AnalyzeReverseStream(
- revfloat_cb_->channels(),
- revframe_->samples_per_channel_,
- revframe_->sample_rate_hz_,
- LayoutFromChannels(revframe_->num_channels_));
+ revfloat_cb_->channels(), revframe_->samples_per_channel_,
+ revframe_->sample_rate_hz_, LayoutFromChannels(revframe_->num_channels_));
}
-void ApmTest::ProcessDelayVerificationTest(int delay_ms, int system_delay_ms,
- int delay_min, int delay_max) {
+void ApmTest::ProcessDelayVerificationTest(int delay_ms,
+ int system_delay_ms,
+ int delay_min,
+ int delay_max) {
// The |revframe_| and |frame_| should include the proper frame information,
// hence can be used for extracting information.
AudioFrame tmp_frame;
@@ -687,15 +681,12 @@
// -- Missing AGC level --
EXPECT_EQ(apm_->kNoError, apm_->gain_control()->Enable(true));
- EXPECT_EQ(apm_->kStreamParameterNotSetError,
- ProcessStreamChooser(format));
+ EXPECT_EQ(apm_->kStreamParameterNotSetError, ProcessStreamChooser(format));
// Resets after successful ProcessStream().
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(127));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_stream_analog_level(127));
EXPECT_EQ(apm_->kNoError, ProcessStreamChooser(format));
- EXPECT_EQ(apm_->kStreamParameterNotSetError,
- ProcessStreamChooser(format));
+ EXPECT_EQ(apm_->kStreamParameterNotSetError, ProcessStreamChooser(format));
// Other stream parameters set correctly.
AudioProcessing::Config apm_config = apm_->GetConfig();
@@ -703,8 +694,7 @@
apm_config.echo_canceller.mobile_mode = false;
apm_->ApplyConfig(apm_config);
EXPECT_EQ(apm_->kNoError, apm_->set_stream_delay_ms(100));
- EXPECT_EQ(apm_->kStreamParameterNotSetError,
- ProcessStreamChooser(format));
+ EXPECT_EQ(apm_->kStreamParameterNotSetError, ProcessStreamChooser(format));
EXPECT_EQ(apm_->kNoError, apm_->gain_control()->Enable(false));
// -- Missing delay --
@@ -718,20 +708,17 @@
// Other stream parameters set correctly.
EXPECT_EQ(apm_->kNoError, apm_->gain_control()->Enable(true));
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(127));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_stream_analog_level(127));
EXPECT_EQ(apm_->kNoError, ProcessStreamChooser(format));
EXPECT_EQ(apm_->kNoError, apm_->gain_control()->Enable(false));
// -- No stream parameters --
- EXPECT_EQ(apm_->kNoError,
- AnalyzeReverseStreamChooser(format));
+ EXPECT_EQ(apm_->kNoError, AnalyzeReverseStreamChooser(format));
EXPECT_EQ(apm_->kNoError, ProcessStreamChooser(format));
// -- All there --
EXPECT_EQ(apm_->kNoError, apm_->set_stream_delay_ms(100));
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(127));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_stream_analog_level(127));
EXPECT_EQ(apm_->kNoError, ProcessStreamChooser(format));
}
@@ -856,40 +843,34 @@
TEST_F(ApmTest, GainControl) {
// Testing gain modes
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_mode(
- apm_->gain_control()->mode()));
+ apm_->gain_control()->set_mode(apm_->gain_control()->mode()));
- GainControl::Mode mode[] = {
- GainControl::kAdaptiveAnalog,
- GainControl::kAdaptiveDigital,
- GainControl::kFixedDigital
- };
+ GainControl::Mode mode[] = {GainControl::kAdaptiveAnalog,
+ GainControl::kAdaptiveDigital,
+ GainControl::kFixedDigital};
for (size_t i = 0; i < arraysize(mode); i++) {
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_mode(mode[i]));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_mode(mode[i]));
EXPECT_EQ(mode[i], apm_->gain_control()->mode());
}
// Testing target levels
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_target_level_dbfs(
- apm_->gain_control()->target_level_dbfs()));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_target_level_dbfs(
+ apm_->gain_control()->target_level_dbfs()));
int level_dbfs[] = {0, 6, 31};
for (size_t i = 0; i < arraysize(level_dbfs); i++) {
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_target_level_dbfs(level_dbfs[i]));
+ apm_->gain_control()->set_target_level_dbfs(level_dbfs[i]));
EXPECT_EQ(level_dbfs[i], apm_->gain_control()->target_level_dbfs());
}
// Testing compression gains
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_compression_gain_db(
- apm_->gain_control()->compression_gain_db()));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_compression_gain_db(
+ apm_->gain_control()->compression_gain_db()));
int gain_db[] = {0, 10, 90};
for (size_t i = 0; i < arraysize(gain_db); i++) {
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_compression_gain_db(gain_db[i]));
+ apm_->gain_control()->set_compression_gain_db(gain_db[i]));
ProcessStreamChooser(kFloatFormat);
EXPECT_EQ(gain_db[i], apm_->gain_control()->compression_gain_db());
}
@@ -901,22 +882,21 @@
EXPECT_TRUE(apm_->gain_control()->is_limiter_enabled());
// Testing level limits
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_analog_level_limits(
- apm_->gain_control()->analog_level_minimum(),
- apm_->gain_control()->analog_level_maximum()));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_analog_level_limits(
+ apm_->gain_control()->analog_level_minimum(),
+ apm_->gain_control()->analog_level_maximum()));
int min_level[] = {0, 255, 1024};
for (size_t i = 0; i < arraysize(min_level); i++) {
- EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_analog_level_limits(min_level[i], 1024));
+ EXPECT_EQ(apm_->kNoError, apm_->gain_control()->set_analog_level_limits(
+ min_level[i], 1024));
EXPECT_EQ(min_level[i], apm_->gain_control()->analog_level_minimum());
}
int max_level[] = {0, 1024, 65535};
for (size_t i = 0; i < arraysize(min_level); i++) {
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_analog_level_limits(0, max_level[i]));
+ apm_->gain_control()->set_analog_level_limits(0, max_level[i]));
EXPECT_EQ(max_level[i], apm_->gain_control()->analog_level_maximum());
}
@@ -981,7 +961,7 @@
// Always pass in the same volume.
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(100));
+ apm_->gain_control()->set_stream_analog_level(100));
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame_));
out_analog_level = apm_->gain_control()->stream_analog_level();
}
@@ -1011,7 +991,7 @@
ScaleFrame(frame_, 0.25);
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(out_analog_level));
+ apm_->gain_control()->set_stream_analog_level(out_analog_level));
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame_));
out_analog_level = apm_->gain_control()->stream_analog_level();
}
@@ -1027,7 +1007,7 @@
ScaleFrame(frame_, 0.25);
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(out_analog_level));
+ apm_->gain_control()->set_stream_analog_level(out_analog_level));
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame_));
out_analog_level = apm_->gain_control()->stream_analog_level();
// Check that AGC respected the manually adjusted volume.
@@ -1046,14 +1026,10 @@
TEST_F(ApmTest, NoiseSuppression) {
// Test valid suppression levels.
NoiseSuppression::Level level[] = {
- NoiseSuppression::kLow,
- NoiseSuppression::kModerate,
- NoiseSuppression::kHigh,
- NoiseSuppression::kVeryHigh
- };
+ NoiseSuppression::kLow, NoiseSuppression::kModerate,
+ NoiseSuppression::kHigh, NoiseSuppression::kVeryHigh};
for (size_t i = 0; i < arraysize(level); i++) {
- EXPECT_EQ(apm_->kNoError,
- apm_->noise_suppression()->set_level(level[i]));
+ EXPECT_EQ(apm_->kNoError, apm_->noise_suppression()->set_level(level[i]));
EXPECT_EQ(level[i], apm_->noise_suppression()->level());
}
@@ -1149,11 +1125,8 @@
// Test valid likelihoods
VoiceDetection::Likelihood likelihood[] = {
- VoiceDetection::kVeryLowLikelihood,
- VoiceDetection::kLowLikelihood,
- VoiceDetection::kModerateLikelihood,
- VoiceDetection::kHighLikelihood
- };
+ VoiceDetection::kVeryLowLikelihood, VoiceDetection::kLowLikelihood,
+ VoiceDetection::kModerateLikelihood, VoiceDetection::kHighLikelihood};
for (size_t i = 0; i < arraysize(likelihood); i++) {
EXPECT_EQ(apm_->kNoError,
apm_->voice_detection()->set_likelihood(likelihood[i]));
@@ -1182,10 +1155,7 @@
// Test that AudioFrame activity is maintained when VAD is disabled.
EXPECT_EQ(apm_->kNoError, apm_->voice_detection()->Enable(false));
AudioFrame::VADActivity activity[] = {
- AudioFrame::kVadActive,
- AudioFrame::kVadPassive,
- AudioFrame::kVadUnknown
- };
+ AudioFrame::kVadActive, AudioFrame::kVadPassive, AudioFrame::kVadUnknown};
for (size_t i = 0; i < arraysize(activity); i++) {
frame_->vad_activity_ = activity[i];
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame_));
@@ -1232,18 +1202,16 @@
// Test that ProcessStream copies input to output even with no processing.
const size_t kSamples = 80;
const int sample_rate = 8000;
- const float src[kSamples] = {
- -1.0f, 0.0f, 1.0f
- };
+ const float src[kSamples] = {-1.0f, 0.0f, 1.0f};
float dest[kSamples] = {};
auto src_channels = &src[0];
auto dest_channels = &dest[0];
apm_.reset(AudioProcessingBuilder().Create());
- EXPECT_NOERR(apm_->ProcessStream(
- &src_channels, kSamples, sample_rate, LayoutFromChannels(1),
- sample_rate, LayoutFromChannels(1), &dest_channels));
+ EXPECT_NOERR(apm_->ProcessStream(&src_channels, kSamples, sample_rate,
+ LayoutFromChannels(1), sample_rate,
+ LayoutFromChannels(1), &dest_channels));
for (size_t i = 0; i < kSamples; ++i) {
EXPECT_EQ(src[i], dest[i]);
@@ -1267,13 +1235,8 @@
EnableAllComponents();
for (size_t i = 0; i < arraysize(kProcessSampleRates); i++) {
- Init(kProcessSampleRates[i],
- kProcessSampleRates[i],
- kProcessSampleRates[i],
- 2,
- 2,
- 2,
- false);
+ Init(kProcessSampleRates[i], kProcessSampleRates[i], kProcessSampleRates[i],
+ 2, 2, 2, false);
int analog_level = 127;
ASSERT_EQ(0, feof(far_file_));
ASSERT_EQ(0, feof(near_file_));
@@ -1289,7 +1252,7 @@
ASSERT_EQ(kNoErr, apm_->set_stream_delay_ms(0));
ASSERT_EQ(kNoErr,
- apm_->gain_control()->set_stream_analog_level(analog_level));
+ apm_->gain_control()->set_stream_analog_level(analog_level));
ASSERT_EQ(kNoErr, apm_->ProcessStream(frame_));
analog_level = apm_->gain_control()->stream_analog_level();
@@ -1393,13 +1356,9 @@
output_sample_rate = msg.output_sample_rate();
}
- Init(msg.sample_rate(),
- output_sample_rate,
- reverse_sample_rate,
- msg.num_input_channels(),
- msg.num_output_channels(),
- msg.num_reverse_channels(),
- false);
+ Init(msg.sample_rate(), output_sample_rate, reverse_sample_rate,
+ msg.num_input_channels(), msg.num_output_channels(),
+ msg.num_reverse_channels(), false);
if (first_init) {
// AttachAecDump() writes an additional init message. Don't start
// recording until after the first init to avoid the extra message.
@@ -1417,9 +1376,8 @@
ASSERT_EQ(revframe_->num_channels_,
static_cast<size_t>(msg.channel_size()));
for (int i = 0; i < msg.channel_size(); ++i) {
- memcpy(revfloat_cb_->channels()[i],
- msg.channel(i).data(),
- msg.channel(i).size());
+ memcpy(revfloat_cb_->channels()[i], msg.channel(i).data(),
+ msg.channel(i).size());
}
} else {
memcpy(revframe_->mutable_data(), msg.data().data(), msg.data().size());
@@ -1447,9 +1405,8 @@
ASSERT_EQ(frame_->num_channels_,
static_cast<size_t>(msg.input_channel_size()));
for (int i = 0; i < msg.input_channel_size(); ++i) {
- memcpy(float_cb_->channels()[i],
- msg.input_channel(i).data(),
- msg.input_channel(i).size());
+ memcpy(float_cb_->channels()[i], msg.input_channel(i).data(),
+ msg.input_channel(i).size());
}
} else {
memcpy(frame_->mutable_data(), msg.input_data().data(),
@@ -1656,13 +1613,10 @@
EnableAllComponents();
- Init(test->sample_rate(),
- test->sample_rate(),
- test->sample_rate(),
+ Init(test->sample_rate(), test->sample_rate(), test->sample_rate(),
static_cast<size_t>(test->num_input_channels()),
static_cast<size_t>(test->num_output_channels()),
- static_cast<size_t>(test->num_reverse_channels()),
- true);
+ static_cast<size_t>(test->num_reverse_channels()), true);
int frame_count = 0;
int has_voice_count = 0;
@@ -1673,7 +1627,7 @@
float ns_speech_prob_average = 0.0f;
float rms_dbfs_average = 0.0f;
#if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
- int stats_index = 0;
+ int stats_index = 0;
#endif
while (ReadFrame(far_file_, revframe_) && ReadFrame(near_file_, frame_)) {
@@ -1683,7 +1637,7 @@
EXPECT_EQ(apm_->kNoError, apm_->set_stream_delay_ms(0));
EXPECT_EQ(apm_->kNoError,
- apm_->gain_control()->set_stream_analog_level(analog_level));
+ apm_->gain_control()->set_stream_analog_level(analog_level));
EXPECT_EQ(apm_->kNoError, apm_->ProcessStream(frame_));
@@ -1711,10 +1665,8 @@
rms_dbfs_average += *stats.output_rms_dbfs;
size_t frame_size = frame_->samples_per_channel_ * frame_->num_channels_;
- size_t write_count = fwrite(frame_->data(),
- sizeof(int16_t),
- frame_size,
- out_file_);
+ size_t write_count =
+ fwrite(frame_->data(), sizeof(int16_t), frame_size, out_file_);
ASSERT_EQ(frame_size, write_count);
// Reset in case of downmixing.
@@ -1787,8 +1739,7 @@
const int kMaxOutputAverageNear = kIntNear;
#endif
EXPECT_NEAR(test->has_voice_count(),
- has_voice_count - kHasVoiceCountOffset,
- kHasVoiceCountNear);
+ has_voice_count - kHasVoiceCountOffset, kHasVoiceCountNear);
EXPECT_NEAR(test->is_saturated_count(), is_saturated_count, kIntNear);
EXPECT_NEAR(test->analog_level_average(), analog_level_average, kIntNear);
@@ -1797,8 +1748,7 @@
kMaxOutputAverageNear);
#if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
const double kFloatNear = 0.0005;
- EXPECT_NEAR(test->ns_speech_probability_average(),
- ns_speech_prob_average,
+ EXPECT_NEAR(test->ns_speech_probability_average(), ns_speech_prob_average,
kFloatNear);
EXPECT_NEAR(test->rms_dbfs_average(), rms_dbfs_average, kFloatNear);
#endif
@@ -1832,9 +1782,9 @@
AudioProcessing::ChannelLayout out_layout;
};
ChannelFormat cf[] = {
- {AudioProcessing::kMonoAndKeyboard, AudioProcessing::kMono},
- {AudioProcessing::kStereoAndKeyboard, AudioProcessing::kMono},
- {AudioProcessing::kStereoAndKeyboard, AudioProcessing::kStereo},
+ {AudioProcessing::kMonoAndKeyboard, AudioProcessing::kMono},
+ {AudioProcessing::kStereoAndKeyboard, AudioProcessing::kMono},
+ {AudioProcessing::kStereoAndKeyboard, AudioProcessing::kStereo},
};
std::unique_ptr<AudioProcessing> ap(AudioProcessingBuilder().Create());
@@ -1850,14 +1800,9 @@
// Run over a few chunks.
for (int j = 0; j < 10; ++j) {
- EXPECT_NOERR(ap->ProcessStream(
- in_cb.channels(),
- in_cb.num_frames(),
- in_rate,
- cf[i].in_layout,
- out_rate,
- cf[i].out_layout,
- out_cb.channels()));
+ EXPECT_NOERR(ap->ProcessStream(in_cb.channels(), in_cb.num_frames(),
+ in_rate, cf[i].in_layout, out_rate,
+ cf[i].out_layout, out_cb.channels()));
}
}
}
@@ -1978,20 +1923,20 @@
FILE* far_file =
fopen(ResourceFilePath("far", reverse_input_rate).c_str(), "rb");
FILE* near_file = fopen(ResourceFilePath("near", input_rate).c_str(), "rb");
- FILE* out_file =
- fopen(OutputFilePath(output_file_prefix, input_rate, output_rate,
- reverse_input_rate, reverse_output_rate,
- num_input_channels, num_output_channels,
- num_reverse_input_channels,
- num_reverse_output_channels, kForward).c_str(),
- "wb");
- FILE* rev_out_file =
- fopen(OutputFilePath(output_file_prefix, input_rate, output_rate,
- reverse_input_rate, reverse_output_rate,
- num_input_channels, num_output_channels,
- num_reverse_input_channels,
- num_reverse_output_channels, kReverse).c_str(),
- "wb");
+ FILE* out_file = fopen(
+ OutputFilePath(
+ output_file_prefix, input_rate, output_rate, reverse_input_rate,
+ reverse_output_rate, num_input_channels, num_output_channels,
+ num_reverse_input_channels, num_reverse_output_channels, kForward)
+ .c_str(),
+ "wb");
+ FILE* rev_out_file = fopen(
+ OutputFilePath(
+ output_file_prefix, input_rate, output_rate, reverse_input_rate,
+ reverse_output_rate, num_input_channels, num_output_channels,
+ num_reverse_input_channels, num_reverse_output_channels, kReverse)
+ .c_str(),
+ "wb");
ASSERT_TRUE(far_file != NULL);
ASSERT_TRUE(near_file != NULL);
ASSERT_TRUE(out_file != NULL);
@@ -2024,22 +1969,17 @@
EXPECT_NOERR(ap->gain_control()->set_stream_analog_level(analog_level));
EXPECT_NOERR(ap->ProcessStream(
- fwd_cb.channels(),
- fwd_cb.num_frames(),
- input_rate,
- LayoutFromChannels(num_input_channels),
- output_rate,
- LayoutFromChannels(num_output_channels),
- out_cb.channels()));
+ fwd_cb.channels(), fwd_cb.num_frames(), input_rate,
+ LayoutFromChannels(num_input_channels), output_rate,
+ LayoutFromChannels(num_output_channels), out_cb.channels()));
// Dump forward output to file.
Interleave(out_cb.channels(), out_cb.num_frames(), out_cb.num_channels(),
float_data.get());
size_t out_length = out_cb.num_channels() * out_cb.num_frames();
- ASSERT_EQ(out_length,
- fwrite(float_data.get(), sizeof(float_data[0]),
- out_length, out_file));
+ ASSERT_EQ(out_length, fwrite(float_data.get(), sizeof(float_data[0]),
+ out_length, out_file));
// Dump reverse output to file.
Interleave(rev_out_cb.channels(), rev_out_cb.num_frames(),
@@ -2047,9 +1987,8 @@
size_t rev_out_length =
rev_out_cb.num_channels() * rev_out_cb.num_frames();
- ASSERT_EQ(rev_out_length,
- fwrite(float_data.get(), sizeof(float_data[0]), rev_out_length,
- rev_out_file));
+ ASSERT_EQ(rev_out_length, fwrite(float_data.get(), sizeof(float_data[0]),
+ rev_out_length, rev_out_file));
analog_level = ap->gain_control()->stream_analog_level();
}
@@ -2076,12 +2015,8 @@
int num_reverse_output;
};
ChannelFormat cf[] = {
- {1, 1, 1, 1},
- {1, 1, 2, 1},
- {2, 1, 1, 1},
- {2, 1, 2, 1},
- {2, 2, 1, 1},
- {2, 2, 2, 2},
+ {1, 1, 1, 1}, {1, 1, 2, 1}, {2, 1, 1, 1},
+ {2, 1, 2, 1}, {2, 2, 1, 1}, {2, 2, 2, 2},
};
for (size_t i = 0; i < arraysize(cf); ++i) {
@@ -2122,15 +2057,17 @@
OutputFilePath("out", input_rate_, output_rate_, reverse_input_rate_,
reverse_output_rate_, cf[i].num_input,
cf[i].num_output, cf[i].num_reverse_input,
- cf[i].num_reverse_output, file_direction).c_str(),
+ cf[i].num_reverse_output, file_direction)
+ .c_str(),
"rb");
// The reference files always have matching input and output channels.
- FILE* ref_file = fopen(
- OutputFilePath("ref", ref_rate, ref_rate, ref_rate, ref_rate,
- cf[i].num_output, cf[i].num_output,
- cf[i].num_reverse_output, cf[i].num_reverse_output,
- file_direction).c_str(),
- "rb");
+ FILE* ref_file =
+ fopen(OutputFilePath("ref", ref_rate, ref_rate, ref_rate, ref_rate,
+ cf[i].num_output, cf[i].num_output,
+ cf[i].num_reverse_output,
+ cf[i].num_reverse_output, file_direction)
+ .c_str(),
+ "rb");
ASSERT_TRUE(out_file != NULL);
ASSERT_TRUE(ref_file != NULL);
diff --git a/modules/audio_processing/echo_cancellation_impl.h b/modules/audio_processing/echo_cancellation_impl.h
index a80d139..1df41a7 100644
--- a/modules/audio_processing/echo_cancellation_impl.h
+++ b/modules/audio_processing/echo_cancellation_impl.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
#include <stddef.h>
+
#include <memory>
#include <string>
#include <vector>
@@ -35,7 +36,6 @@
void ProcessRenderAudio(rtc::ArrayView<const float> packed_render_audio);
int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms);
-
// Differences in clock speed on the primary and reverse streams can impact
// the AEC performance. On the client-side, this could be seen when different
// render and capture devices are used, particularly with webcams.
diff --git a/modules/audio_processing/echo_cancellation_impl_unittest.cc b/modules/audio_processing/echo_cancellation_impl_unittest.cc
index 1107564..a970a4e 100644
--- a/modules/audio_processing/echo_cancellation_impl_unittest.cc
+++ b/modules/audio_processing/echo_cancellation_impl_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/echo_cancellation_impl.h"
+
#include <memory>
#include "modules/audio_processing/aec/aec_core.h"
-#include "modules/audio_processing/echo_cancellation_impl.h"
#include "modules/audio_processing/include/audio_processing.h"
#include "rtc_base/critical_section.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/echo_control_mobile_impl.cc b/modules/audio_processing/echo_control_mobile_impl.cc
index 0495b39..69dfafe 100644
--- a/modules/audio_processing/echo_control_mobile_impl.cc
+++ b/modules/audio_processing/echo_control_mobile_impl.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/echo_control_mobile_impl.h"
#include <string.h>
+
#include <cstdint>
#include "modules/audio_processing/aecm/echo_control_mobile.h"
@@ -198,7 +199,7 @@
if (MapSetting(mode) == -1) {
return AudioProcessing::kBadParameterError;
}
- routing_mode_ = mode;
+ routing_mode_ = mode;
return Configure();
}
@@ -207,7 +208,7 @@
}
int EchoControlMobileImpl::enable_comfort_noise(bool enable) {
- comfort_noise_enabled_ = enable;
+ comfort_noise_enabled_ = enable;
return Configure();
}
diff --git a/modules/audio_processing/echo_control_mobile_impl.h b/modules/audio_processing/echo_control_mobile_impl.h
index e443797..d84a15e 100644
--- a/modules/audio_processing/echo_control_mobile_impl.h
+++ b/modules/audio_processing/echo_control_mobile_impl.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/echo_detector/circular_buffer.h b/modules/audio_processing/echo_detector/circular_buffer.h
index c52311f..db1aeae 100644
--- a/modules/audio_processing/echo_detector/circular_buffer.h
+++ b/modules/audio_processing/echo_detector/circular_buffer.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_CIRCULAR_BUFFER_H_
#include <stddef.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/modules/audio_processing/echo_detector/circular_buffer_unittest.cc b/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
index 0fa2a2b..7a234d4 100644
--- a/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
+++ b/modules/audio_processing/echo_detector/circular_buffer_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/echo_detector/circular_buffer.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc b/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
index f8efc3a..8327d23 100644
--- a/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
+++ b/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
@@ -10,6 +10,7 @@
*/
#include "modules/audio_processing/echo_detector/mean_variance_estimator.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/echo_detector/moving_max_unittest.cc b/modules/audio_processing/echo_detector/moving_max_unittest.cc
index b67b86f..9429127 100644
--- a/modules/audio_processing/echo_detector/moving_max_unittest.cc
+++ b/modules/audio_processing/echo_detector/moving_max_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/echo_detector/moving_max.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc b/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
index 7e0512e..89fb938 100644
--- a/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
+++ b/modules/audio_processing/echo_detector/normalized_covariance_estimator_unittest.cc
@@ -10,6 +10,7 @@
*/
#include "modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/gain_control_config_proxy_unittest.cc b/modules/audio_processing/gain_control_config_proxy_unittest.cc
index 931c99f..5bd341f 100644
--- a/modules/audio_processing/gain_control_config_proxy_unittest.cc
+++ b/modules/audio_processing/gain_control_config_proxy_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/gain_control_config_proxy.h"
+
#include "modules/audio_processing/include/audio_processing.h"
#include "modules/audio_processing/include/mock_audio_processing.h"
#include "rtc_base/critical_section.h"
diff --git a/modules/audio_processing/gain_control_impl.cc b/modules/audio_processing/gain_control_impl.cc
index 47cbe52..2ca522c 100644
--- a/modules/audio_processing/gain_control_impl.cc
+++ b/modules/audio_processing/gain_control_impl.cc
@@ -301,7 +301,6 @@
size_t num_proc_channels_local = 0u;
int sample_rate_hz_local = 0;
{
-
minimum_capture_level_ = minimum;
maximum_capture_level_ = maximum;
diff --git a/modules/audio_processing/gain_control_impl.h b/modules/audio_processing/gain_control_impl.h
index 36b84ee..99b43b5 100644
--- a/modules/audio_processing/gain_control_impl.h
+++ b/modules/audio_processing/gain_control_impl.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/gain_controller2_unittest.cc b/modules/audio_processing/gain_controller2_unittest.cc
index 46256d8..99749cc 100644
--- a/modules/audio_processing/gain_controller2_unittest.cc
+++ b/modules/audio_processing/gain_controller2_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/gain_controller2.h"
+
#include <algorithm>
#include "absl/memory/memory.h"
#include "api/array_view.h"
#include "modules/audio_processing/agc2/agc2_testing_common.h"
#include "modules/audio_processing/audio_buffer.h"
-#include "modules/audio_processing/gain_controller2.h"
#include "modules/audio_processing/test/audio_buffer_tools.h"
#include "modules/audio_processing/test/bitexactness_tools.h"
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/include/aec_dump.h b/modules/audio_processing/include/aec_dump.h
index b734adf..b64bf0b 100644
--- a/modules/audio_processing/include/aec_dump.h
+++ b/modules/audio_processing/include/aec_dump.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_INCLUDE_AEC_DUMP_H_
#include <stdint.h>
+
#include <string>
#include "api/audio/audio_frame.h"
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index a652dc9..4bcace2 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -20,6 +20,7 @@
#include <stddef.h> // size_t
#include <stdio.h> // FILE
#include <string.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/modules/audio_processing/low_cut_filter.cc b/modules/audio_processing/low_cut_filter.cc
index 12a6e73..1ee955d 100644
--- a/modules/audio_processing/low_cut_filter.cc
+++ b/modules/audio_processing/low_cut_filter.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/low_cut_filter.h"
#include <stdint.h>
+
#include <cstring>
#include "common_audio/signal_processing/include/signal_processing_library.h"
diff --git a/modules/audio_processing/low_cut_filter_unittest.cc b/modules/audio_processing/low_cut_filter_unittest.cc
index d7b3cb9..ea4fb67 100644
--- a/modules/audio_processing/low_cut_filter_unittest.cc
+++ b/modules/audio_processing/low_cut_filter_unittest.cc
@@ -7,11 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/low_cut_filter.h"
+
#include <vector>
#include "api/array_view.h"
#include "modules/audio_processing/audio_buffer.h"
-#include "modules/audio_processing/low_cut_filter.h"
#include "modules/audio_processing/test/audio_buffer_tools.h"
#include "modules/audio_processing/test/bitexactness_tools.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/ns/defines.h b/modules/audio_processing/ns/defines.h
index d6abfea..2935f25 100644
--- a/modules/audio_processing/ns/defines.h
+++ b/modules/audio_processing/ns/defines.h
@@ -46,7 +46,8 @@
(float)0.5 // default threshold for Spectral Flatness feature
#define SD_FEATURE_THR \
(float)0.5 // default threshold for Spectral Difference feature
-#define PROB_RANGE (float)0.20 // probability threshold for noise state in
+#define PROB_RANGE \
+ (float)0.20 // probability threshold for noise state in
// speech/noise likelihood
#define HIST_PAR_EST 1000 // histogram size for estimation of parameters
#define GAMMA_PAUSE (float)0.05 // update for conservative noise estimate
diff --git a/modules/audio_processing/residual_echo_detector_unittest.cc b/modules/audio_processing/residual_echo_detector_unittest.cc
index 6658999..84065cd 100644
--- a/modules/audio_processing/residual_echo_detector_unittest.cc
+++ b/modules/audio_processing/residual_echo_detector_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/residual_echo_detector.h"
+
#include <vector>
-#include "modules/audio_processing/residual_echo_detector.h"
#include "rtc_base/ref_counted_object.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/rms_level_unittest.cc b/modules/audio_processing/rms_level_unittest.cc
index 67489de..a1ceaad 100644
--- a/modules/audio_processing/rms_level_unittest.cc
+++ b/modules/audio_processing/rms_level_unittest.cc
@@ -9,12 +9,13 @@
*/
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
+#include "modules/audio_processing/rms_level.h"
+
#include <cmath>
#include <memory>
#include <vector>
#include "api/array_view.h"
-#include "modules/audio_processing/rms_level.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/splitting_filter_unittest.cc b/modules/audio_processing/splitting_filter_unittest.cc
index 1caee64..40f0c82 100644
--- a/modules/audio_processing/splitting_filter_unittest.cc
+++ b/modules/audio_processing/splitting_filter_unittest.cc
@@ -11,10 +11,11 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
+#include "modules/audio_processing/splitting_filter.h"
+
#include <cmath>
#include "common_audio/channel_buffer.h"
-#include "modules/audio_processing/splitting_filter.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/test/aec_dump_based_simulator.h b/modules/audio_processing/test/aec_dump_based_simulator.h
index f15aa27..1181979 100644
--- a/modules/audio_processing/test/aec_dump_based_simulator.h
+++ b/modules/audio_processing/test/aec_dump_based_simulator.h
@@ -15,7 +15,6 @@
#include <string>
#include "modules/audio_processing/test/audio_processing_simulator.h"
-
#include "rtc_base/constructor_magic.h"
#include "rtc_base/ignore_wundef.h"
diff --git a/modules/audio_processing/test/audio_buffer_tools.h b/modules/audio_processing/test/audio_buffer_tools.h
index dc53e4f..9ee34e7 100644
--- a/modules/audio_processing/test/audio_buffer_tools.h
+++ b/modules/audio_processing/test/audio_buffer_tools.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_TEST_AUDIO_BUFFER_TOOLS_H_
#include <vector>
+
#include "api/array_view.h"
#include "modules/audio_processing/audio_buffer.h"
#include "modules/audio_processing/include/audio_processing.h"
diff --git a/modules/audio_processing/test/bitexactness_tools.cc b/modules/audio_processing/test/bitexactness_tools.cc
index 7bf2b01..f245c2c 100644
--- a/modules/audio_processing/test/bitexactness_tools.cc
+++ b/modules/audio_processing/test/bitexactness_tools.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/test/bitexactness_tools.h"
#include <math.h>
+
#include <algorithm>
#include <string>
#include <vector>
diff --git a/modules/audio_processing/test/conversational_speech/generator_unittest.cc b/modules/audio_processing/test/conversational_speech/generator_unittest.cc
index cad2656..c7a459c 100644
--- a/modules/audio_processing/test/conversational_speech/generator_unittest.cc
+++ b/modules/audio_processing/test/conversational_speech/generator_unittest.cc
@@ -37,6 +37,7 @@
#define _USE_MATH_DEFINES
#include <stdio.h>
+
#include <cmath>
#include <map>
#include <memory>
@@ -60,9 +61,9 @@
namespace {
using conversational_speech::LoadTiming;
-using conversational_speech::SaveTiming;
using conversational_speech::MockWavReaderFactory;
using conversational_speech::MultiEndCall;
+using conversational_speech::SaveTiming;
using conversational_speech::Turn;
using conversational_speech::WavReaderFactory;
@@ -81,12 +82,12 @@
constexpr int kDefaultSampleRate = 48000;
const std::map<std::string, const MockWavReaderFactory::Params>
kDefaultMockWavReaderFactoryParamsMap = {
- {"t300", {kDefaultSampleRate, 1u, 14400u}}, // Mono, 0.3 seconds.
- {"t500", {kDefaultSampleRate, 1u, 24000u}}, // Mono, 0.5 seconds.
- {"t1000", {kDefaultSampleRate, 1u, 48000u}}, // Mono, 1.0 seconds.
- {"sr8000", {8000, 1u, 8000u}}, // 8kHz sample rate, mono, 1 second.
- {"sr16000", {16000, 1u, 16000u}}, // 16kHz sample rate, mono, 1 second.
- {"sr16000_stereo", {16000, 2u, 16000u}}, // Like sr16000, but stereo.
+ {"t300", {kDefaultSampleRate, 1u, 14400u}}, // Mono, 0.3 seconds.
+ {"t500", {kDefaultSampleRate, 1u, 24000u}}, // Mono, 0.5 seconds.
+ {"t1000", {kDefaultSampleRate, 1u, 48000u}}, // Mono, 1.0 seconds.
+ {"sr8000", {8000, 1u, 8000u}}, // 8kHz sample rate, mono, 1 second.
+ {"sr16000", {16000, 1u, 16000u}}, // 16kHz sample rate, mono, 1 second.
+ {"sr16000_stereo", {16000, 2u, 16000u}}, // Like sr16000, but stereo.
};
const MockWavReaderFactory::Params& kDefaultMockWavReaderFactoryParams =
kDefaultMockWavReaderFactoryParamsMap.at("t500");
@@ -105,8 +106,8 @@
std::vector<int16_t> samples(params.num_samples);
for (std::size_t i = 0; i < params.num_samples; ++i) {
// TODO(alessiob): the produced tone is not pure, improve.
- samples[i] = std::lround(32767.0f * std::sin(
- two_pi * i * frequency / params.sample_rate));
+ samples[i] = std::lround(
+ 32767.0f * std::sin(two_pi * i * frequency / params.sample_rate));
}
// Write samples.
@@ -131,8 +132,7 @@
// Create sine tracks.
for (const auto& it : sine_tracks_params) {
const std::string temp_filepath = JoinFilename(temp_directory, it.first);
- CreateSineWavFile(
- temp_filepath, it.second.params, it.second.frequency);
+ CreateSineWavFile(temp_filepath, it.second.params, it.second.frequency);
}
return temp_directory;
@@ -148,7 +148,9 @@
}
void DeleteFolderAndContents(const std::string& dir) {
- if (!DirExists(dir)) { return; }
+ if (!DirExists(dir)) {
+ return;
+ }
absl::optional<std::vector<std::string>> dir_content = ReadDirectory(dir);
EXPECT_TRUE(dir_content);
for (const auto& path : *dir_content) {
@@ -170,8 +172,8 @@
using ::testing::_;
TEST(ConversationalSpeechTest, Settings) {
- const conversational_speech::Config config(
- audiotracks_path, timing_filepath, output_path);
+ const conversational_speech::Config config(audiotracks_path, timing_filepath,
+ output_path);
// Test getters.
EXPECT_EQ(audiotracks_path, config.audiotracks_path());
@@ -181,8 +183,8 @@
TEST(ConversationalSpeechTest, TimingSaveLoad) {
// Save test timing.
- const std::string temporary_filepath = TempFilename(
- OutputPath(), "TempTimingTestFile");
+ const std::string temporary_filepath =
+ TempFilename(OutputPath(), "TempTimingTestFile");
SaveTiming(temporary_filepath, expected_timing);
// Create a std::vector<Turn> instance by loading from file.
@@ -218,50 +220,54 @@
TEST(ConversationalSpeechTest, MultiEndCallSetupDifferentSampleRates) {
const std::vector<Turn> timing = {
- {"A", "sr8000", 0, 0}, {"B", "sr16000", 0, 0},
+ {"A", "sr8000", 0, 0},
+ {"B", "sr16000", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
// There are two unique audio tracks to read.
EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(2);
- MultiEndCall multiend_call(
- timing, audiotracks_path, std::move(mock_wavreader_factory));
+ MultiEndCall multiend_call(timing, audiotracks_path,
+ std::move(mock_wavreader_factory));
EXPECT_FALSE(multiend_call.valid());
}
TEST(ConversationalSpeechTest, MultiEndCallSetupMultipleChannels) {
const std::vector<Turn> timing = {
- {"A", "sr16000_stereo", 0, 0}, {"B", "sr16000_stereo", 0, 0},
+ {"A", "sr16000_stereo", 0, 0},
+ {"B", "sr16000_stereo", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
// There is one unique audio track to read.
EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(1);
- MultiEndCall multiend_call(
- timing, audiotracks_path, std::move(mock_wavreader_factory));
+ MultiEndCall multiend_call(timing, audiotracks_path,
+ std::move(mock_wavreader_factory));
EXPECT_FALSE(multiend_call.valid());
}
TEST(ConversationalSpeechTest,
- MultiEndCallSetupDifferentSampleRatesAndMultipleNumChannels) {
+ MultiEndCallSetupDifferentSampleRatesAndMultipleNumChannels) {
const std::vector<Turn> timing = {
- {"A", "sr8000", 0, 0}, {"B", "sr16000_stereo", 0, 0},
+ {"A", "sr8000", 0, 0},
+ {"B", "sr16000_stereo", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
// There are two unique audio tracks to read.
EXPECT_CALL(*mock_wavreader_factory, Create(::testing::_)).Times(2);
- MultiEndCall multiend_call(
- timing, audiotracks_path, std::move(mock_wavreader_factory));
+ MultiEndCall multiend_call(timing, audiotracks_path,
+ std::move(mock_wavreader_factory));
EXPECT_FALSE(multiend_call.valid());
}
TEST(ConversationalSpeechTest, MultiEndCallSetupFirstOffsetNegative) {
const std::vector<Turn> timing = {
- {"A", "t500", -100, 0}, {"B", "t500", 0, 0},
+ {"A", "t500", -100, 0},
+ {"B", "t500", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -279,7 +285,8 @@
// B .....1****
constexpr std::size_t expected_duration = kDefaultSampleRate;
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"B", "t500", 0, 0},
+ {"A", "t500", 0, 0},
+ {"B", "t500", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -303,7 +310,8 @@
// B .......1****
constexpr std::size_t expected_duration = kDefaultSampleRate * 1.2;
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"B", "t500", 200, 0},
+ {"A", "t500", 0, 0},
+ {"B", "t500", 200, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -327,7 +335,8 @@
// B ....1****
constexpr std::size_t expected_duration = kDefaultSampleRate * 0.9;
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"B", "t500", -100, 0},
+ {"A", "t500", 0, 0},
+ {"B", "t500", -100, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -350,7 +359,8 @@
// A ..0****
// B .1****. The n-th turn cannot start before the (n-1)-th one.
const std::vector<Turn> timing = {
- {"A", "t500", 200, 0}, {"B", "t500", -600, 0},
+ {"A", "t500", 200, 0},
+ {"B", "t500", -600, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -368,7 +378,9 @@
// B ...1*********
constexpr std::size_t expected_duration = kDefaultSampleRate * 1.3;
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"B", "t1000", -200, 0}, {"A", "t500", -800, 0},
+ {"A", "t500", 0, 0},
+ {"B", "t1000", -200, 0},
+ {"A", "t500", -800, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -393,7 +405,9 @@
// B ......2****
// ^ Turn #1 overlaps with #0 which is from the same speaker.
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"A", "t500", -200, 0}, {"B", "t500", -200, 0},
+ {"A", "t500", 0, 0},
+ {"A", "t500", -200, 0},
+ {"B", "t500", -200, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -435,7 +449,9 @@
// C .......2****
constexpr std::size_t expected_duration = kDefaultSampleRate * 1.2;
const std::vector<Turn> timing = {
- {"A", "t1000", 0, 0}, {"B", "t500", -800, 0}, {"C", "t500", 0, 0},
+ {"A", "t1000", 0, 0},
+ {"B", "t500", -800, 0},
+ {"C", "t500", 0, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -461,7 +477,9 @@
// ^ Turn #2 overlaps both with #0 and #1 (cross-talk with 3+ speakers
// not permitted).
const std::vector<Turn> timing = {
- {"A", "t1000", 0, 0}, {"B", "t500", -800, 0}, {"C", "t500", -300, 0},
+ {"A", "t1000", 0, 0},
+ {"B", "t500", -800, 0},
+ {"C", "t500", -300, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -480,7 +498,9 @@
// C .......3****
constexpr std::size_t expected_duration = kDefaultSampleRate * 1.2;
const std::vector<Turn> timing = {
- {"A", "t1000", 0, 0}, {"B", "t500", -900, 0}, {"C", "t500", 100, 0},
+ {"A", "t1000", 0, 0},
+ {"B", "t500", -900, 0},
+ {"C", "t500", 100, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -503,7 +523,8 @@
// A 0****
// B 1****
const std::vector<Turn> timing = {
- {"A", "t500", 0, 0}, {"B", "t500", -500, 0},
+ {"A", "t500", 0, 0},
+ {"B", "t500", -500, 0},
};
auto mock_wavreader_factory = CreateMockWavReaderFactory();
@@ -579,9 +600,8 @@
const int sample_rates[] = {8000, 11025, 16000, 22050, 32000, 44100, 48000};
for (int sample_rate : sample_rates) {
- const std::string temp_filename =
- OutputPath() + "TempSineWavFile_" +
- std::to_string(sample_rate) + ".wav";
+ const std::string temp_filename = OutputPath() + "TempSineWavFile_" +
+ std::to_string(sample_rate) + ".wav";
// Write wav file.
const std::size_t num_samples = duration_seconds * sample_rate;
@@ -590,10 +610,9 @@
// Load wav file and check if params match.
WavReaderFactory wav_reader_factory;
- MockWavReaderFactory::Params expeted_params = {
- sample_rate, 1u, num_samples};
- CheckAudioTrackParams(
- wav_reader_factory, temp_filename, expeted_params);
+ MockWavReaderFactory::Params expeted_params = {sample_rate, 1u,
+ num_samples};
+ CheckAudioTrackParams(wav_reader_factory, temp_filename, expeted_params);
// Clean up.
RemoveFile(temp_filename);
@@ -618,21 +637,21 @@
{"t5000_440.wav", {{sample_rate, 1u, sample_rate * 5}, 440.0}},
{"t5000_880.wav", {{sample_rate, 1u, sample_rate * 5}, 880.0}},
};
- const std::string audiotracks_path = CreateTemporarySineAudioTracks(
- sine_tracks_params);
+ const std::string audiotracks_path =
+ CreateTemporarySineAudioTracks(sine_tracks_params);
// Set up the multi-end call.
- auto wavreader_factory = std::unique_ptr<WavReaderFactory>(
- new WavReaderFactory());
- MultiEndCall multiend_call(
- expected_timing, audiotracks_path, std::move(wavreader_factory));
+ auto wavreader_factory =
+ std::unique_ptr<WavReaderFactory>(new WavReaderFactory());
+ MultiEndCall multiend_call(expected_timing, audiotracks_path,
+ std::move(wavreader_factory));
// Simulate the call.
std::string output_path = JoinFilename(audiotracks_path, "output");
CreateDir(output_path);
RTC_LOG(LS_VERBOSE) << "simulator output path: " << output_path;
- auto generated_audiotrak_pairs = conversational_speech::Simulate(
- multiend_call, output_path);
+ auto generated_audiotrak_pairs =
+ conversational_speech::Simulate(multiend_call, output_path);
EXPECT_EQ(2u, generated_audiotrak_pairs->size());
// Check the output.
@@ -641,10 +660,10 @@
sample_rate, 1u, sample_rate * expected_duration_seconds};
for (const auto& it : *generated_audiotrak_pairs) {
RTC_LOG(LS_VERBOSE) << "checking far/near-end for <" << it.first << ">";
- CheckAudioTrackParams(
- wav_reader_factory, it.second.near_end, expeted_params);
- CheckAudioTrackParams(
- wav_reader_factory, it.second.far_end, expeted_params);
+ CheckAudioTrackParams(wav_reader_factory, it.second.near_end,
+ expeted_params);
+ CheckAudioTrackParams(wav_reader_factory, it.second.far_end,
+ expeted_params);
}
// Clean.
diff --git a/modules/audio_processing/test/conversational_speech/multiend_call.h b/modules/audio_processing/test/conversational_speech/multiend_call.h
index 09cb00c..5b6300f 100644
--- a/modules/audio_processing/test/conversational_speech/multiend_call.h
+++ b/modules/audio_processing/test/conversational_speech/multiend_call.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL_H_
#include <stddef.h>
+
#include <map>
#include <memory>
#include <set>
diff --git a/modules/audio_processing/test/fake_recording_device_unittest.cc b/modules/audio_processing/test/fake_recording_device_unittest.cc
index a14da82..da62beb 100644
--- a/modules/audio_processing/test/fake_recording_device_unittest.cc
+++ b/modules/audio_processing/test/fake_recording_device_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/test/fake_recording_device.h"
+
#include <cmath>
#include <memory>
#include <string>
@@ -15,7 +17,6 @@
#include "absl/memory/memory.h"
#include "api/array_view.h"
-#include "modules/audio_processing/test/fake_recording_device.h"
#include "rtc_base/strings/string_builder.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/test/protobuf_utils.cc b/modules/audio_processing/test/protobuf_utils.cc
index c47f8ea..f3c97ee 100644
--- a/modules/audio_processing/test/protobuf_utils.cc
+++ b/modules/audio_processing/test/protobuf_utils.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/test/protobuf_utils.h"
+
#include "rtc_base/system/arch.h"
namespace webrtc {
diff --git a/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc b/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
index a553785..9906eca 100644
--- a/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
+++ b/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
@@ -6,13 +6,14 @@
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
+#include "common_audio/vad/include/vad.h"
+
#include <array>
#include <fstream>
#include <memory>
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
-#include "common_audio/vad/include/vad.h"
#include "common_audio/wav_file.h"
#include "rtc_base/logging.h"
diff --git a/modules/audio_processing/test/test_utils.cc b/modules/audio_processing/test/test_utils.cc
index 9f1a469..c02bc76 100644
--- a/modules/audio_processing/test/test_utils.cc
+++ b/modules/audio_processing/test/test_utils.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/audio_processing/test/test_utils.h"
+
#include <utility>
-#include "modules/audio_processing/test/test_utils.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/arch.h"
diff --git a/modules/audio_processing/test/test_utils.h b/modules/audio_processing/test/test_utils.h
index 3637431..0dd4a40 100644
--- a/modules/audio_processing/test/test_utils.h
+++ b/modules/audio_processing/test/test_utils.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#include <math.h>
+
#include <iterator>
#include <limits>
#include <memory>
diff --git a/modules/audio_processing/test/wav_based_simulator.cc b/modules/audio_processing/test/wav_based_simulator.cc
index 1160ba8..4b46590 100644
--- a/modules/audio_processing/test/wav_based_simulator.cc
+++ b/modules/audio_processing/test/wav_based_simulator.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/test/wav_based_simulator.h"
#include <stdio.h>
+
#include <iostream>
#include "modules/audio_processing/test/test_utils.h"
diff --git a/modules/audio_processing/test/wav_based_simulator.h b/modules/audio_processing/test/wav_based_simulator.h
index 3dfd256..991f1db 100644
--- a/modules/audio_processing/test/wav_based_simulator.h
+++ b/modules/audio_processing/test/wav_based_simulator.h
@@ -14,7 +14,6 @@
#include <vector>
#include "modules/audio_processing/test/audio_processing_simulator.h"
-
#include "rtc_base/constructor_magic.h"
namespace webrtc {
diff --git a/modules/audio_processing/transient/file_utils_unittest.cc b/modules/audio_processing/transient/file_utils_unittest.cc
index 0bded02..1bcf6f9 100644
--- a/modules/audio_processing/transient/file_utils_unittest.cc
+++ b/modules/audio_processing/transient/file_utils_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/transient/file_utils.h"
#include <string.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/modules/audio_processing/transient/transient_detector.cc b/modules/audio_processing/transient/transient_detector.cc
index b328a0e..f03a2ea 100644
--- a/modules/audio_processing/transient/transient_detector.cc
+++ b/modules/audio_processing/transient/transient_detector.cc
@@ -12,6 +12,7 @@
#include <float.h>
#include <string.h>
+
#include <algorithm>
#include <cmath>
@@ -161,10 +162,9 @@
return 1.f;
}
RTC_DCHECK_NE(0, reference_energy_);
- float result =
- 1.f / (1.f + std::exp(kReferenceNonLinearity *
- (kEnergyRatioThreshold -
- reference_energy / reference_energy_)));
+ float result = 1.f / (1.f + std::exp(kReferenceNonLinearity *
+ (kEnergyRatioThreshold -
+ reference_energy / reference_energy_)));
reference_energy_ =
kMemory * reference_energy_ + (1.f - kMemory) * reference_energy;
diff --git a/modules/audio_processing/transient/transient_detector.h b/modules/audio_processing/transient/transient_detector.h
index 23b88f8..5ede2e8 100644
--- a/modules/audio_processing/transient/transient_detector.h
+++ b/modules/audio_processing/transient/transient_detector.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_DETECTOR_H_
#include <stddef.h>
+
#include <deque>
#include <memory>
diff --git a/modules/audio_processing/transient/transient_suppression_test.cc b/modules/audio_processing/transient/transient_suppression_test.cc
index 57bddb6..85db391 100644
--- a/modules/audio_processing/transient/transient_suppression_test.cc
+++ b/modules/audio_processing/transient/transient_suppression_test.cc
@@ -8,8 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/audio_processing/transient/transient_suppressor.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -19,6 +17,7 @@
#include "common_audio/include/audio_util.h"
#include "modules/audio_processing/agc/agc.h"
+#include "modules/audio_processing/transient/transient_suppressor.h"
#include "rtc_base/flags.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/modules/audio_processing/transient/transient_suppressor.cc b/modules/audio_processing/transient/transient_suppressor.cc
index 58d0df0..2463efa 100644
--- a/modules/audio_processing/transient/transient_suppressor.cc
+++ b/modules/audio_processing/transient/transient_suppressor.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/transient/transient_suppressor.h"
#include <string.h>
+
#include <cmath>
#include <complex>
#include <deque>
@@ -351,8 +352,7 @@
// If a restoration takes place, the |magnitudes_| are updated to the new value.
void TransientSuppressor::HardRestoration(float* spectral_mean) {
const float detector_result =
- 1.f -
- std::pow(1.f - detector_smoothed_, using_reference_ ? 200.f : 50.f);
+ 1.f - std::pow(1.f - detector_smoothed_, using_reference_ ? 200.f : 50.f);
// To restore, we get the peaks in the spectrum. If higher than the previous
// spectral mean we adjust them.
for (size_t i = 0; i < complex_analysis_length_; ++i) {
diff --git a/modules/audio_processing/transient/transient_suppressor.h b/modules/audio_processing/transient/transient_suppressor.h
index ae51966..2322b8f 100644
--- a/modules/audio_processing/transient/transient_suppressor.h
+++ b/modules/audio_processing/transient/transient_suppressor.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "rtc_base/gtest_prod_util.h"
diff --git a/modules/audio_processing/transient/wpd_tree.h b/modules/audio_processing/transient/wpd_tree.h
index b62135d..c54220f7 100644
--- a/modules/audio_processing/transient/wpd_tree.h
+++ b/modules/audio_processing/transient/wpd_tree.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
#include <stddef.h>
+
#include <memory>
#include "modules/audio_processing/transient/wpd_node.h"
diff --git a/modules/audio_processing/utility/block_mean_calculator_unittest.cc b/modules/audio_processing/utility/block_mean_calculator_unittest.cc
index 1f4ebf1..e829f69 100644
--- a/modules/audio_processing/utility/block_mean_calculator_unittest.cc
+++ b/modules/audio_processing/utility/block_mean_calculator_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/utility/block_mean_calculator.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/audio_processing/utility/delay_estimator.cc b/modules/audio_processing/utility/delay_estimator.cc
index a15b914..fe750f5 100644
--- a/modules/audio_processing/utility/delay_estimator.cc
+++ b/modules/audio_processing/utility/delay_estimator.cc
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <string.h>
+
#include <algorithm>
#include "rtc_base/checks.h"
diff --git a/modules/audio_processing/utility/delay_estimator_unittest.cc b/modules/audio_processing/utility/delay_estimator_unittest.cc
index 324bc37..d3463aa 100644
--- a/modules/audio_processing/utility/delay_estimator_unittest.cc
+++ b/modules/audio_processing/utility/delay_estimator_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/audio_processing/utility/delay_estimator.h"
+
#include "modules/audio_processing/utility/delay_estimator_internal.h"
#include "modules/audio_processing/utility/delay_estimator_wrapper.h"
#include "test/gtest.h"
diff --git a/modules/audio_processing/utility/ooura_fft_mips.cc b/modules/audio_processing/utility/ooura_fft_mips.cc
index 9fe577d..42b9d3a 100644
--- a/modules/audio_processing/utility/ooura_fft_mips.cc
+++ b/modules/audio_processing/utility/ooura_fft_mips.cc
@@ -9,7 +9,6 @@
*/
#include "modules/audio_processing/utility/ooura_fft.h"
-
#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
namespace webrtc {
diff --git a/modules/audio_processing/utility/ooura_fft_neon.cc b/modules/audio_processing/utility/ooura_fft_neon.cc
index 401387a..95b5f09 100644
--- a/modules/audio_processing/utility/ooura_fft_neon.cc
+++ b/modules/audio_processing/utility/ooura_fft_neon.cc
@@ -14,10 +14,9 @@
* Based on the sse2 version.
*/
-#include "modules/audio_processing/utility/ooura_fft.h"
-
#include <arm_neon.h>
+#include "modules/audio_processing/utility/ooura_fft.h"
#include "modules/audio_processing/utility/ooura_fft_tables_common.h"
#include "modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h"
diff --git a/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h b/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
index b6e4a07..10aebac 100644
--- a/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
+++ b/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h
@@ -86,7 +86,10 @@
0.956940353f, -0.956940353f,
};
ALIGN16_BEG const float ALIGN16_END cftmdl_wk1r[4] = {
- 0.707106769f, 0.707106769f, 0.707106769f, -0.707106769f,
+ 0.707106769f,
+ 0.707106769f,
+ 0.707106769f,
+ -0.707106769f,
};
#endif
diff --git a/modules/audio_processing/vad/pole_zero_filter.cc b/modules/audio_processing/vad/pole_zero_filter.cc
index 4156d7e..e7a6113 100644
--- a/modules/audio_processing/vad/pole_zero_filter.cc
+++ b/modules/audio_processing/vad/pole_zero_filter.cc
@@ -11,6 +11,7 @@
#include "modules/audio_processing/vad/pole_zero_filter.h"
#include <string.h>
+
#include <algorithm>
namespace webrtc {
diff --git a/modules/audio_processing/vad/vad_audio_proc.h b/modules/audio_processing/vad/vad_audio_proc.h
index 9be3467..4a71ce3 100644
--- a/modules/audio_processing/vad/vad_audio_proc.h
+++ b/modules/audio_processing/vad/vad_audio_proc.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "modules/audio_processing/vad/common.h" // AudioFeatures, kSampleR...
diff --git a/modules/audio_processing/vad/voice_activity_detector.h b/modules/audio_processing/vad/voice_activity_detector.h
index d140fe2..a19883d 100644
--- a/modules/audio_processing/vad/voice_activity_detector.h
+++ b/modules/audio_processing/vad/voice_activity_detector.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/audio_processing/voice_detection_impl.h b/modules/audio_processing/voice_detection_impl.h
index 6800566..4007f67 100644
--- a/modules/audio_processing/voice_detection_impl.h
+++ b/modules/audio_processing/voice_detection_impl.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_
#include <stddef.h>
+
#include <memory>
#include "modules/audio_processing/include/audio_processing.h"
diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.h b/modules/bitrate_controller/send_side_bandwidth_estimation.h
index 6f120b3..7e7f1a5 100644
--- a/modules/bitrate_controller/send_side_bandwidth_estimation.h
+++ b/modules/bitrate_controller/send_side_bandwidth_estimation.h
@@ -14,6 +14,7 @@
#define MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_
#include <stdint.h>
+
#include <deque>
#include <utility>
#include <vector>
diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
index 0b0185c..fa389de 100644
--- a/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
+++ b/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/bitrate_controller/send_side_bandwidth_estimation.h"
+
#include "logging/rtc_event_log/events/rtc_event.h"
#include "logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h"
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
diff --git a/modules/congestion_controller/bbr/bandwidth_sampler.cc b/modules/congestion_controller/bbr/bandwidth_sampler.cc
index 7978e4a..f61e140 100644
--- a/modules/congestion_controller/bbr/bandwidth_sampler.cc
+++ b/modules/congestion_controller/bbr/bandwidth_sampler.cc
@@ -9,9 +9,10 @@
*/
// Based on the Quic implementation in Chromium.
+#include "modules/congestion_controller/bbr/bandwidth_sampler.h"
+
#include <algorithm>
-#include "modules/congestion_controller/bbr/bandwidth_sampler.h"
#include "rtc_base/logging.h"
namespace webrtc {
diff --git a/modules/congestion_controller/bbr/bandwidth_sampler_unittest.cc b/modules/congestion_controller/bbr/bandwidth_sampler_unittest.cc
index 7677cd0..3bd205a 100644
--- a/modules/congestion_controller/bbr/bandwidth_sampler_unittest.cc
+++ b/modules/congestion_controller/bbr/bandwidth_sampler_unittest.cc
@@ -9,9 +9,10 @@
*/
// Based on the Quic implementation in Chromium.
+#include "modules/congestion_controller/bbr/bandwidth_sampler.h"
+
#include <stddef.h>
-#include "modules/congestion_controller/bbr/bandwidth_sampler.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/congestion_controller/bbr/bbr_factory.cc b/modules/congestion_controller/bbr/bbr_factory.cc
index bf0419b..43fc86d 100644
--- a/modules/congestion_controller/bbr/bbr_factory.cc
+++ b/modules/congestion_controller/bbr/bbr_factory.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/bbr/bbr_factory.h"
+
#include <memory>
#include "absl/memory/memory.h"
diff --git a/modules/congestion_controller/bbr/bbr_network_controller.h b/modules/congestion_controller/bbr/bbr_network_controller.h
index e99452a..6114970 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller.h
+++ b/modules/congestion_controller/bbr/bbr_network_controller.h
@@ -19,14 +19,13 @@
#include <string>
#include <vector>
+#include "absl/types/optional.h"
#include "api/transport/network_control.h"
#include "api/transport/network_types.h"
#include "modules/congestion_controller/bbr/bandwidth_sampler.h"
#include "modules/congestion_controller/bbr/loss_rate_filter.h"
#include "modules/congestion_controller/bbr/rtt_stats.h"
#include "modules/congestion_controller/bbr/windowed_filter.h"
-
-#include "absl/types/optional.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/experiments/field_trial_units.h"
#include "rtc_base/random.h"
diff --git a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
index 1a2c24f..2a8a224 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/bbr/bbr_network_controller.h"
+
#include <algorithm>
#include <memory>
#include "modules/congestion_controller/bbr/bbr_factory.h"
-#include "modules/congestion_controller/bbr/bbr_network_controller.h"
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/scenario/scenario.h"
diff --git a/modules/congestion_controller/bbr/packet_number_indexed_queue.h b/modules/congestion_controller/bbr/packet_number_indexed_queue.h
index 35f6dde..b072191 100644
--- a/modules/congestion_controller/bbr/packet_number_indexed_queue.h
+++ b/modules/congestion_controller/bbr/packet_number_indexed_queue.h
@@ -15,6 +15,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <deque>
#include <type_traits>
#include <utility>
diff --git a/modules/congestion_controller/bbr/rtt_stats_unittest.cc b/modules/congestion_controller/bbr/rtt_stats_unittest.cc
index 44be087..54b1425 100644
--- a/modules/congestion_controller/bbr/rtt_stats_unittest.cc
+++ b/modules/congestion_controller/bbr/rtt_stats_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/bbr/rtt_stats.h"
#include <stdlib.h>
+
#include <cmath>
#include <vector>
diff --git a/modules/congestion_controller/bbr/windowed_filter_unittest.cc b/modules/congestion_controller/bbr/windowed_filter_unittest.cc
index 02b797b..61510d0 100644
--- a/modules/congestion_controller/bbr/windowed_filter_unittest.cc
+++ b/modules/congestion_controller/bbr/windowed_filter_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/bbr/windowed_filter.h"
#include <stdint.h>
+
#include <string>
#include <type_traits>
diff --git a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc
index 9129516..dcfb3d7 100644
--- a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc
+++ b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
#include <stddef.h>
+
#include <algorithm>
#include <utility>
diff --git a/modules/congestion_controller/goog_cc/bitrate_estimator.cc b/modules/congestion_controller/goog_cc/bitrate_estimator.cc
index 68e924e..1d801bf 100644
--- a/modules/congestion_controller/goog_cc/bitrate_estimator.cc
+++ b/modules/congestion_controller/goog_cc/bitrate_estimator.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/goog_cc/bitrate_estimator.h"
#include <stdio.h>
+
#include <algorithm>
#include <cmath>
#include <string>
diff --git a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller.cc b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller.cc
index 4e6bed6..969c0f0 100644
--- a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller.cc
+++ b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/goog_cc/congestion_window_pushback_controller.h"
+
#include <inttypes.h>
#include <stdio.h>
+
#include <algorithm>
#include <string>
-#include "modules/congestion_controller/goog_cc/congestion_window_pushback_controller.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/rate_control_settings.h"
diff --git a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
index bd9f7e1..a13aa96 100644
--- a/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/congestion_window_pushback_controller_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/goog_cc/congestion_window_pushback_controller.h"
+
#include "api/transport/field_trial_based_config.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.h b/modules/congestion_controller/goog_cc/delay_based_bwe.h
index c24295d..4501b11 100644
--- a/modules/congestion_controller/goog_cc/delay_based_bwe.h
+++ b/modules/congestion_controller/goog_cc/delay_based_bwe.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc
index bc0be2b..3ad6db1 100644
--- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc
+++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc
@@ -27,8 +27,7 @@
namespace test {
-void TestBitrateObserver::OnReceiveBitrateChanged(
- uint32_t bitrate) {
+void TestBitrateObserver::OnReceiveBitrateChanged(uint32_t bitrate) {
latest_bitrate_ = bitrate;
updated_ = true;
}
diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h
index e6275d6..a3b4c35 100644
--- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h
+++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
index ddc5ca3..91eadd7 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
@@ -12,6 +12,7 @@
#include <inttypes.h>
#include <stdio.h>
+
#include <algorithm>
#include <cstdint>
#include <memory>
@@ -595,7 +596,6 @@
return update;
}
-
void GoogCcNetworkController::MaybeTriggerOnNetworkChanged(
NetworkControlUpdate* update,
Timestamp at_time) {
@@ -605,7 +605,6 @@
bandwidth_estimation_->CurrentEstimate(&estimated_bitrate_bps, &fraction_loss,
&rtt_ms);
-
BWE_TEST_LOGGING_PLOT(1, "fraction_loss_%", at_time.ms(),
(fraction_loss * 100) / 256);
BWE_TEST_LOGGING_PLOT(1, "rtt_ms", at_time.ms(), rtt_ms);
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
index 5b24d14..0f23462 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
@@ -12,6 +12,7 @@
#define MODULES_CONGESTION_CONTROLLER_GOOG_CC_GOOG_CC_NETWORK_CONTROL_H_
#include <stdint.h>
+
#include <deque>
#include <memory>
#include <vector>
@@ -137,7 +138,6 @@
absl::optional<DataSize> current_data_window_;
-
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GoogCcNetworkController);
};
diff --git a/modules/congestion_controller/goog_cc/median_slope_estimator_unittest.cc b/modules/congestion_controller/goog_cc/median_slope_estimator_unittest.cc
index 3eb8c1f..a0df9fd 100644
--- a/modules/congestion_controller/goog_cc/median_slope_estimator_unittest.cc
+++ b/modules/congestion_controller/goog_cc/median_slope_estimator_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/goog_cc/median_slope_estimator.h"
+
#include "rtc_base/random.h"
#include "test/gtest.h"
diff --git a/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc b/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc
index 49b171d..7cbc061 100644
--- a/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc
+++ b/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc
@@ -54,7 +54,6 @@
} // namespace
-
ProbeBitrateEstimator::ProbeBitrateEstimator(RtcEventLog* event_log)
: event_log_(event_log) {}
diff --git a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
index e1335c1..e64f414 100644
--- a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
@@ -7,6 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/goog_cc/probe_controller.h"
+
#include <memory>
#include "api/transport/field_trial_based_config.h"
@@ -14,7 +16,6 @@
#include "api/units/data_rate.h"
#include "api/units/timestamp.h"
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
-#include "modules/congestion_controller/goog_cc/probe_controller.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/clock.h"
#include "test/field_trial.h"
diff --git a/modules/congestion_controller/goog_cc/trendline_estimator.h b/modules/congestion_controller/goog_cc/trendline_estimator.h
index 065ad17..4bd4c71 100644
--- a/modules/congestion_controller/goog_cc/trendline_estimator.h
+++ b/modules/congestion_controller/goog_cc/trendline_estimator.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <deque>
#include <utility>
diff --git a/modules/congestion_controller/goog_cc/trendline_estimator_unittest.cc b/modules/congestion_controller/goog_cc/trendline_estimator_unittest.cc
index d2e6cf0..8390910 100644
--- a/modules/congestion_controller/goog_cc/trendline_estimator_unittest.cc
+++ b/modules/congestion_controller/goog_cc/trendline_estimator_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/goog_cc/trendline_estimator.h"
+
#include "rtc_base/random.h"
#include "test/gtest.h"
@@ -22,8 +23,8 @@
constexpr size_t kPacketCount = 2 * kWindowSize + 1;
class TrendlineEstimatorForTest : public TrendlineEstimator {
public:
- using TrendlineEstimator::TrendlineEstimator;
using TrendlineEstimator::modified_trend;
+ using TrendlineEstimator::TrendlineEstimator;
};
void TestEstimator(double slope, double jitter_stddev, double tolerance) {
TrendlineEstimatorForTest estimator(kWindowSize, kSmoothing, kGain, nullptr);
diff --git a/modules/congestion_controller/pcc/bitrate_controller.cc b/modules/congestion_controller/pcc/bitrate_controller.cc
index 55d18d4..2d2269f 100644
--- a/modules/congestion_controller/pcc/bitrate_controller.cc
+++ b/modules/congestion_controller/pcc/bitrate_controller.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/pcc/bitrate_controller.h"
+
#include <algorithm>
#include <cmath>
#include <cstdlib>
@@ -15,7 +17,6 @@
#include <vector>
#include "absl/memory/memory.h"
-#include "modules/congestion_controller/pcc/bitrate_controller.h"
namespace webrtc {
namespace pcc {
diff --git a/modules/congestion_controller/pcc/bitrate_controller.h b/modules/congestion_controller/pcc/bitrate_controller.h
index a7e6bf3..fadeea1 100644
--- a/modules/congestion_controller/pcc/bitrate_controller.h
+++ b/modules/congestion_controller/pcc/bitrate_controller.h
@@ -12,6 +12,7 @@
#define MODULES_CONGESTION_CONTROLLER_PCC_BITRATE_CONTROLLER_H_
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
index 3f80e21..73d0f75 100644
--- a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
+++ b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/pcc/bitrate_controller.h"
+
#include <utility>
#include "absl/memory/memory.h"
-#include "modules/congestion_controller/pcc/bitrate_controller.h"
#include "modules/congestion_controller/pcc/monitor_interval.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/congestion_controller/pcc/monitor_interval.cc b/modules/congestion_controller/pcc/monitor_interval.cc
index 3a1948e..c8efd5b 100644
--- a/modules/congestion_controller/pcc/monitor_interval.cc
+++ b/modules/congestion_controller/pcc/monitor_interval.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/pcc/monitor_interval.h"
#include <stddef.h>
+
#include <cmath>
#include "rtc_base/logging.h"
diff --git a/modules/congestion_controller/pcc/pcc_factory.cc b/modules/congestion_controller/pcc/pcc_factory.cc
index 13c48bf..fb92859 100644
--- a/modules/congestion_controller/pcc/pcc_factory.cc
+++ b/modules/congestion_controller/pcc/pcc_factory.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/pcc/pcc_factory.h"
+
#include <memory>
#include "absl/memory/memory.h"
diff --git a/modules/congestion_controller/pcc/pcc_network_controller.cc b/modules/congestion_controller/pcc/pcc_network_controller.cc
index c6fac49..034328e 100644
--- a/modules/congestion_controller/pcc/pcc_network_controller.cc
+++ b/modules/congestion_controller/pcc/pcc_network_controller.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/pcc/pcc_network_controller.h"
+
#include <algorithm>
#include "absl/types/optional.h"
#include "api/units/data_size.h"
-#include "modules/congestion_controller/pcc/pcc_network_controller.h"
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/congestion_controller/pcc/pcc_network_controller.h b/modules/congestion_controller/pcc/pcc_network_controller.h
index c70684a..e5f65dd 100644
--- a/modules/congestion_controller/pcc/pcc_network_controller.h
+++ b/modules/congestion_controller/pcc/pcc_network_controller.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <deque>
#include <vector>
diff --git a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
index ae6ff7c..54c9830 100644
--- a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
+++ b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
@@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/pcc/pcc_network_controller.h"
+
#include <memory>
#include "modules/congestion_controller/pcc/pcc_factory.h"
-#include "modules/congestion_controller/pcc/pcc_network_controller.h"
-#include "test/scenario/scenario.h"
-
#include "test/gmock.h"
#include "test/gtest.h"
+#include "test/scenario/scenario.h"
using ::testing::AllOf;
using ::testing::Field;
diff --git a/modules/congestion_controller/pcc/rtt_tracker.cc b/modules/congestion_controller/pcc/rtt_tracker.cc
index 533a573..0814912 100644
--- a/modules/congestion_controller/pcc/rtt_tracker.cc
+++ b/modules/congestion_controller/pcc/rtt_tracker.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <algorithm>
-
#include "modules/congestion_controller/pcc/rtt_tracker.h"
+#include <algorithm>
+
namespace webrtc {
namespace pcc {
diff --git a/modules/congestion_controller/pcc/rtt_tracker_unittest.cc b/modules/congestion_controller/pcc/rtt_tracker_unittest.cc
index 3b90122..dd667b8 100644
--- a/modules/congestion_controller/pcc/rtt_tracker_unittest.cc
+++ b/modules/congestion_controller/pcc/rtt_tracker_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/pcc/rtt_tracker.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/congestion_controller/pcc/utility_function_unittest.cc b/modules/congestion_controller/pcc/utility_function_unittest.cc
index 76927a1..0459fb8 100644
--- a/modules/congestion_controller/pcc/utility_function_unittest.cc
+++ b/modules/congestion_controller/pcc/utility_function_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/pcc/utility_function.h"
+
#include <stddef.h>
+
#include <cmath>
#include <type_traits>
#include <vector>
@@ -18,7 +21,6 @@
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
-#include "modules/congestion_controller/pcc/utility_function.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/congestion_controller/receive_side_congestion_controller_unittest.cc b/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
index d6d7390..a9827b2 100644
--- a/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
+++ b/modules/congestion_controller/receive_side_congestion_controller_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/include/receive_side_congestion_controller.h"
+
#include "modules/pacing/packet_router.h"
#include "system_wrappers/include/clock.h"
#include "test/gmock.h"
diff --git a/modules/congestion_controller/rtp/send_time_history_unittest.cc b/modules/congestion_controller/rtp/send_time_history_unittest.cc
index ecd5366..604685c 100644
--- a/modules/congestion_controller/rtp/send_time_history_unittest.cc
+++ b/modules/congestion_controller/rtp/send_time_history_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/rtp/send_time_history.h"
+
#include <algorithm>
#include <limits>
#include <random>
#include <vector>
#include "api/transport/network_types.h"
-#include "modules/congestion_controller/rtp/send_time_history.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "system_wrappers/include/clock.h"
#include "test/gtest.h"
diff --git a/modules/congestion_controller/rtp/transport_feedback_adapter.cc b/modules/congestion_controller/rtp/transport_feedback_adapter.cc
index 219f426..e77e0e7 100644
--- a/modules/congestion_controller/rtp/transport_feedback_adapter.cc
+++ b/modules/congestion_controller/rtp/transport_feedback_adapter.cc
@@ -11,6 +11,7 @@
#include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
#include <stdlib.h>
+
#include <algorithm>
#include <cmath>
#include <utility>
diff --git a/modules/congestion_controller/rtp/transport_feedback_adapter_unittest.cc b/modules/congestion_controller/rtp/transport_feedback_adapter_unittest.cc
index 81c62ca..3fdc21f 100644
--- a/modules/congestion_controller/rtp/transport_feedback_adapter_unittest.cc
+++ b/modules/congestion_controller/rtp/transport_feedback_adapter_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
+
#include <limits>
#include <memory>
#include <vector>
#include "modules/congestion_controller/rtp/congestion_controller_unittests_helper.h"
-#include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "rtc_base/checks.h"
diff --git a/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc b/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc
index cf2d03d..e15a2cd 100644
--- a/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc
+++ b/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h"
#include <stdint.h>
+
#include <utility>
#include "modules/desktop_capture/desktop_geometry.h"
diff --git a/modules/desktop_capture/cropped_desktop_frame.cc b/modules/desktop_capture/cropped_desktop_frame.cc
index 311f254..1ab0355 100644
--- a/modules/desktop_capture/cropped_desktop_frame.cc
+++ b/modules/desktop_capture/cropped_desktop_frame.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/desktop_capture/cropped_desktop_frame.h"
+
#include <memory>
#include <utility>
-#include "modules/desktop_capture/cropped_desktop_frame.h"
#include "modules/desktop_capture/desktop_region.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
diff --git a/modules/desktop_capture/cropped_desktop_frame_unittest.cc b/modules/desktop_capture/cropped_desktop_frame_unittest.cc
index 92207e4..e50f1d7 100644
--- a/modules/desktop_capture/cropped_desktop_frame_unittest.cc
+++ b/modules/desktop_capture/cropped_desktop_frame_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/desktop_capture/cropped_desktop_frame.h"
+
#include <memory>
#include <utility>
#include "absl/memory/memory.h"
-#include "modules/desktop_capture/cropped_desktop_frame.h"
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/shared_desktop_frame.h"
#include "test/gtest.h"
diff --git a/modules/desktop_capture/cropping_window_capturer.cc b/modules/desktop_capture/cropping_window_capturer.cc
index a03ae0c..bd1ba46 100644
--- a/modules/desktop_capture/cropping_window_capturer.cc
+++ b/modules/desktop_capture/cropping_window_capturer.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/cropping_window_capturer.h"
#include <stddef.h>
+
#include <utility>
#include "modules/desktop_capture/cropped_desktop_frame.h"
diff --git a/modules/desktop_capture/cropping_window_capturer_win.cc b/modules/desktop_capture/cropping_window_capturer_win.cc
index 8d7e9a2..af61dea 100644
--- a/modules/desktop_capture/cropping_window_capturer_win.cc
+++ b/modules/desktop_capture/cropping_window_capturer_win.cc
@@ -9,7 +9,6 @@
*/
#include "modules/desktop_capture/cropping_window_capturer.h"
-
#include "modules/desktop_capture/win/screen_capture_utils.h"
#include "modules/desktop_capture/win/window_capture_utils.h"
#include "rtc_base/logging.h"
diff --git a/modules/desktop_capture/desktop_and_cursor_composer.cc b/modules/desktop_capture/desktop_and_cursor_composer.cc
index 649b791..369d2ac 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer.cc
+++ b/modules/desktop_capture/desktop_and_cursor_composer.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <utility>
#include "absl/memory/memory.h"
diff --git a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
index ac4fd0a..ad8f38c 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
+++ b/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/desktop_capture/desktop_and_cursor_composer.h"
+
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include <utility>
-#include "modules/desktop_capture/desktop_and_cursor_composer.h"
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/mouse_cursor.h"
@@ -33,13 +35,19 @@
const int kTestCursorSize = 3;
const uint32_t kTestCursorData[kTestCursorSize][kTestCursorSize] = {
{
- 0xffffffff, 0x99990000, 0xaa222222,
+ 0xffffffff,
+ 0x99990000,
+ 0xaa222222,
},
{
- 0x88008800, 0xaa0000aa, 0xaa333333,
+ 0x88008800,
+ 0xaa0000aa,
+ 0xaa333333,
},
{
- 0x00000000, 0xaa0000aa, 0xaa333333,
+ 0x00000000,
+ 0xaa0000aa,
+ 0xaa333333,
},
};
diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc
index b8d60a7..b636611 100644
--- a/modules/desktop_capture/desktop_capturer.cc
+++ b/modules/desktop_capture/desktop_capturer.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <cstring>
-
#include "modules/desktop_capture/desktop_capturer.h"
#include <stdlib.h>
#include <string.h>
+
+#include <cstring>
#include <utility>
#include "modules/desktop_capture/desktop_capture_options.h"
diff --git a/modules/desktop_capture/desktop_capturer_differ_wrapper.cc b/modules/desktop_capture/desktop_capturer_differ_wrapper.cc
index 1b90fd5..4e80f30 100644
--- a/modules/desktop_capture/desktop_capturer_differ_wrapper.cc
+++ b/modules/desktop_capture/desktop_capturer_differ_wrapper.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <utility>
#include "modules/desktop_capture/desktop_geometry.h"
diff --git a/modules/desktop_capture/desktop_frame.cc b/modules/desktop_capture/desktop_frame.cc
index 70af145..5b33340 100644
--- a/modules/desktop_capture/desktop_frame.cc
+++ b/modules/desktop_capture/desktop_frame.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/desktop_frame.h"
#include <string.h>
+
#include <utility>
#include "absl/memory/memory.h"
diff --git a/modules/desktop_capture/desktop_frame.h b/modules/desktop_capture/desktop_frame.h
index 5658b1c..f2d3d65 100644
--- a/modules/desktop_capture/desktop_frame.h
+++ b/modules/desktop_capture/desktop_frame.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/desktop_capture/desktop_frame_generator.cc b/modules/desktop_capture/desktop_frame_generator.cc
index 947b389..64ba86c 100644
--- a/modules/desktop_capture/desktop_frame_generator.cc
+++ b/modules/desktop_capture/desktop_frame_generator.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include "modules/desktop_capture/rgba_color.h"
diff --git a/modules/desktop_capture/desktop_frame_win.h b/modules/desktop_capture/desktop_frame_win.h
index e8861d5..73e8648 100644
--- a/modules/desktop_capture/desktop_frame_win.h
+++ b/modules/desktop_capture/desktop_frame_win.h
@@ -11,10 +11,10 @@
#ifndef MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
#define MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
-#include <memory>
-
#include <windows.h>
+#include <memory>
+
#include "modules/desktop_capture/desktop_frame.h"
#include "rtc_base/constructor_magic.h"
diff --git a/modules/desktop_capture/desktop_region.cc b/modules/desktop_capture/desktop_region.cc
index 897b929..befbcc6 100644
--- a/modules/desktop_capture/desktop_region.cc
+++ b/modules/desktop_capture/desktop_region.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/desktop_region.h"
#include <assert.h>
+
#include <algorithm>
#include <utility>
diff --git a/modules/desktop_capture/desktop_region.h b/modules/desktop_capture/desktop_region.h
index 0eb3928..cc0b78d 100644
--- a/modules/desktop_capture/desktop_region.h
+++ b/modules/desktop_capture/desktop_region.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_DESKTOP_REGION_H_
#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/modules/desktop_capture/desktop_region_unittest.cc b/modules/desktop_capture/desktop_region_unittest.cc
index 3998292..b8bd78e 100644
--- a/modules/desktop_capture/desktop_region_unittest.cc
+++ b/modules/desktop_capture/desktop_region_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/desktop_region.h"
#include <stdlib.h>
+
#include <algorithm>
#include <cstdint>
diff --git a/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc b/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
index 3b21fdf..206791c 100644
--- a/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
+++ b/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/fallback_desktop_capturer_wrapper.h"
#include <stddef.h>
+
#include <utility>
#include "rtc_base/checks.h"
diff --git a/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc b/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
index 36fa69d..de66386 100644
--- a/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
+++ b/modules/desktop_capture/fallback_desktop_capturer_wrapper_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/fallback_desktop_capturer_wrapper.h"
#include <stddef.h>
+
#include <memory>
#include <utility>
#include <vector>
diff --git a/modules/desktop_capture/linux/base_capturer_pipewire.cc b/modules/desktop_capture/linux/base_capturer_pipewire.cc
index f79d0a1..46a4aea 100644
--- a/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -12,7 +12,6 @@
#include <gio/gunixfdlist.h>
#include <glib-object.h>
-
#include <spa/param/format-utils.h>
#include <spa/param/props.h>
#include <spa/param/video/raw-utils.h>
diff --git a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
index 772ec8b..9a2f5ff 100644
--- a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
+++ b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
@@ -15,6 +15,7 @@
#include <X11/extensions/xfixeswire.h>
#include <stddef.h>
#include <stdint.h>
+
#include <algorithm>
#include <memory>
diff --git a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
index 37c0b87..9603341 100644
--- a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
+++ b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_LINUX_MOUSE_CURSOR_MONITOR_X11_H_
#include <X11/X.h>
+
#include <memory>
#include "api/scoped_refptr.h"
diff --git a/modules/desktop_capture/linux/screen_capturer_x11.cc b/modules/desktop_capture/linux/screen_capturer_x11.cc
index dc81393..128f81f 100644
--- a/modules/desktop_capture/linux/screen_capturer_x11.cc
+++ b/modules/desktop_capture/linux/screen_capturer_x11.cc
@@ -16,6 +16,7 @@
#include <X11/extensions/damagewire.h>
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include <utility>
diff --git a/modules/desktop_capture/linux/screen_capturer_x11.h b/modules/desktop_capture/linux/screen_capturer_x11.h
index b3b6604..242c488 100644
--- a/modules/desktop_capture/linux/screen_capturer_x11.h
+++ b/modules/desktop_capture/linux/screen_capturer_x11.h
@@ -15,6 +15,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xfixes.h>
+
#include <memory>
#include "modules/desktop_capture/desktop_capture_options.h"
diff --git a/modules/desktop_capture/linux/shared_x_display.h b/modules/desktop_capture/linux/shared_x_display.h
index 8f3bb41..98b6101 100644
--- a/modules/desktop_capture/linux/shared_x_display.h
+++ b/modules/desktop_capture/linux/shared_x_display.h
@@ -12,9 +12,8 @@
#define MODULES_DESKTOP_CAPTURE_LINUX_SHARED_X_DISPLAY_H_
#include <map>
-#include <vector>
-
#include <string>
+#include <vector>
#include "api/ref_counted_base.h"
#include "api/scoped_refptr.h"
diff --git a/modules/desktop_capture/linux/window_capturer_x11.cc b/modules/desktop_capture/linux/window_capturer_x11.cc
index 674c891..94f9f92 100644
--- a/modules/desktop_capture/linux/window_capturer_x11.cc
+++ b/modules/desktop_capture/linux/window_capturer_x11.cc
@@ -14,6 +14,7 @@
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/composite.h>
#include <string.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/modules/desktop_capture/linux/window_capturer_x11.h b/modules/desktop_capture/linux/window_capturer_x11.h
index 48b2554..f689dd6 100644
--- a/modules/desktop_capture/linux/window_capturer_x11.h
+++ b/modules/desktop_capture/linux/window_capturer_x11.h
@@ -13,6 +13,7 @@
#include <X11/X.h>
#include <X11/Xlib.h>
+
#include <memory>
#include <string>
diff --git a/modules/desktop_capture/linux/window_finder_x11.cc b/modules/desktop_capture/linux/window_finder_x11.cc
index bb8770f..6f0517c 100644
--- a/modules/desktop_capture/linux/window_finder_x11.cc
+++ b/modules/desktop_capture/linux/window_finder_x11.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/linux/window_finder_x11.h"
#include <X11/X.h>
+
#include <memory>
#include "absl/memory/memory.h"
diff --git a/modules/desktop_capture/linux/window_list_utils.cc b/modules/desktop_capture/linux/window_list_utils.cc
index e71f28a..4f05fc6 100644
--- a/modules/desktop_capture/linux/window_list_utils.cc
+++ b/modules/desktop_capture/linux/window_list_utils.cc
@@ -13,6 +13,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <string.h>
+
#include <algorithm>
#include "modules/desktop_capture/linux/x_error_trap.h"
diff --git a/modules/desktop_capture/linux/x_server_pixel_buffer.h b/modules/desktop_capture/linux/x_server_pixel_buffer.h
index 98790e3..06dd1a1 100644
--- a/modules/desktop_capture/linux/x_server_pixel_buffer.h
+++ b/modules/desktop_capture/linux/x_server_pixel_buffer.h
@@ -13,12 +13,12 @@
#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X_SERVER_PIXEL_BUFFER_H_
#define MODULES_DESKTOP_CAPTURE_LINUX_X_SERVER_PIXEL_BUFFER_H_
-#include <memory>
-#include <vector>
-
#include <X11/Xutil.h>
#include <X11/extensions/XShm.h>
+#include <memory>
+#include <vector>
+
#include "modules/desktop_capture/desktop_geometry.h"
#include "rtc_base/constructor_magic.h"
diff --git a/modules/desktop_capture/mac/desktop_configuration.h b/modules/desktop_capture/mac/desktop_configuration.h
index 5d96aa9..53a9081 100644
--- a/modules/desktop_capture/mac/desktop_configuration.h
+++ b/modules/desktop_capture/mac/desktop_configuration.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_MAC_DESKTOP_CONFIGURATION_H_
#include <ApplicationServices/ApplicationServices.h>
+
#include <vector>
#include "modules/desktop_capture/desktop_geometry.h"
diff --git a/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc b/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc
index a85c275..afa4473 100644
--- a/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc
+++ b/modules/desktop_capture/mac/full_screen_chrome_window_detector.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
#include <libproc.h>
+
#include <string>
#include "modules/desktop_capture/mac/window_list_utils.h"
diff --git a/modules/desktop_capture/mock_desktop_capturer_callback.h b/modules/desktop_capture/mock_desktop_capturer_callback.h
index bf1d503..659239a 100644
--- a/modules/desktop_capture/mock_desktop_capturer_callback.h
+++ b/modules/desktop_capture/mock_desktop_capturer_callback.h
@@ -10,10 +10,9 @@
#ifndef MODULES_DESKTOP_CAPTURE_MOCK_DESKTOP_CAPTURER_CALLBACK_H_
#define MODULES_DESKTOP_CAPTURE_MOCK_DESKTOP_CAPTURER_CALLBACK_H_
-#include "modules/desktop_capture/desktop_capturer.h"
-
#include <memory>
+#include "modules/desktop_capture/desktop_capturer.h"
#include "test/gmock.h"
namespace webrtc {
diff --git a/modules/desktop_capture/mouse_cursor_monitor_null.cc b/modules/desktop_capture/mouse_cursor_monitor_null.cc
index 233819a..ab1bc2f 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_null.cc
+++ b/modules/desktop_capture/mouse_cursor_monitor_null.cc
@@ -8,13 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/desktop_capture/mouse_cursor_monitor.h"
-
#include <stddef.h>
#include <memory>
#include "modules/desktop_capture/desktop_capture_types.h"
+#include "modules/desktop_capture/mouse_cursor_monitor.h"
namespace webrtc {
diff --git a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
index c42ab35..93ac0da 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
+++ b/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
@@ -8,15 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/desktop_capture/mouse_cursor_monitor.h"
+
#include <assert.h>
#include <stddef.h>
+
#include <memory>
#include "modules/desktop_capture/desktop_capture_options.h"
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/mouse_cursor.h"
-#include "modules/desktop_capture/mouse_cursor_monitor.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/modules/desktop_capture/mouse_cursor_monitor_win.cc b/modules/desktop_capture/mouse_cursor_monitor_win.cc
index bc03b95..2691d6f 100644
--- a/modules/desktop_capture/mouse_cursor_monitor_win.cc
+++ b/modules/desktop_capture/mouse_cursor_monitor_win.cc
@@ -8,8 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/desktop_capture/mouse_cursor_monitor.h"
-
#include <assert.h>
#include <string.h>
@@ -19,6 +17,7 @@
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/desktop_geometry.h"
#include "modules/desktop_capture/mouse_cursor.h"
+#include "modules/desktop_capture/mouse_cursor_monitor.h"
#include "modules/desktop_capture/win/cursor.h"
#include "modules/desktop_capture/win/screen_capture_utils.h"
#include "modules/desktop_capture/win/window_capture_utils.h"
diff --git a/modules/desktop_capture/rgba_color.cc b/modules/desktop_capture/rgba_color.cc
index 4bef3cdf..362928a 100644
--- a/modules/desktop_capture/rgba_color.cc
+++ b/modules/desktop_capture/rgba_color.cc
@@ -9,6 +9,7 @@
*/
#include "modules/desktop_capture/rgba_color.h"
+
#include "rtc_base/system/arch.h"
namespace webrtc {
diff --git a/modules/desktop_capture/screen_drawer_linux.cc b/modules/desktop_capture/screen_drawer_linux.cc
index bb5b86f..47a50dc 100644
--- a/modules/desktop_capture/screen_drawer_linux.cc
+++ b/modules/desktop_capture/screen_drawer_linux.cc
@@ -11,6 +11,7 @@
#include <X11/X.h>
#include <X11/Xlib.h>
#include <string.h>
+
#include <memory>
#include "absl/memory/memory.h"
diff --git a/modules/desktop_capture/screen_drawer_unittest.cc b/modules/desktop_capture/screen_drawer_unittest.cc
index 0bb8376..e51b0aa 100644
--- a/modules/desktop_capture/screen_drawer_unittest.cc
+++ b/modules/desktop_capture/screen_drawer_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/screen_drawer.h"
#include <stdint.h>
+
#include <atomic>
#include "absl/memory/memory.h"
diff --git a/modules/desktop_capture/win/cursor_unittest.cc b/modules/desktop_capture/win/cursor_unittest.cc
index ff7b6bf..a1ae6d8 100644
--- a/modules/desktop_capture/win/cursor_unittest.cc
+++ b/modules/desktop_capture/win/cursor_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/desktop_capture/win/cursor.h"
+
#include <memory>
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/desktop_geometry.h"
#include "modules/desktop_capture/mouse_cursor.h"
-#include "modules/desktop_capture/win/cursor.h"
#include "modules/desktop_capture/win/cursor_unittest_resources.h"
#include "modules/desktop_capture/win/scoped_gdi_object.h"
#include "test/gmock.h"
diff --git a/modules/desktop_capture/win/desktop.h b/modules/desktop_capture/win/desktop.h
index deb83cf..46cedae 100644
--- a/modules/desktop_capture/win/desktop.h
+++ b/modules/desktop_capture/win/desktop.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_WIN_DESKTOP_H_
#include <windows.h>
+
#include <string>
#include "rtc_base/constructor_magic.h"
diff --git a/modules/desktop_capture/win/dxgi_context.cc b/modules/desktop_capture/win/dxgi_context.cc
index 6a679cb..c18b238 100644
--- a/modules/desktop_capture/win/dxgi_context.cc
+++ b/modules/desktop_capture/win/dxgi_context.cc
@@ -9,6 +9,7 @@
*/
#include "modules/desktop_capture/win/dxgi_context.h"
+
#include "modules/desktop_capture/win/dxgi_duplicator_controller.h"
namespace webrtc {
diff --git a/modules/desktop_capture/win/dxgi_context.h b/modules/desktop_capture/win/dxgi_context.h
index 0faf5cd..c96773b 100644
--- a/modules/desktop_capture/win/dxgi_context.h
+++ b/modules/desktop_capture/win/dxgi_context.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_
#include <vector>
+
#include "modules/desktop_capture/desktop_region.h"
namespace webrtc {
diff --git a/modules/desktop_capture/win/dxgi_output_duplicator.cc b/modules/desktop_capture/win/dxgi_output_duplicator.cc
index 70172c2..db7ba25 100644
--- a/modules/desktop_capture/win/dxgi_output_duplicator.cc
+++ b/modules/desktop_capture/win/dxgi_output_duplicator.cc
@@ -10,10 +10,9 @@
#include "modules/desktop_capture/win/dxgi_output_duplicator.h"
-#include <string.h>
-
#include <dxgi.h>
#include <dxgiformat.h>
+#include <string.h>
#include <unknwn.h>
#include <windows.h>
diff --git a/modules/desktop_capture/win/scoped_thread_desktop.h b/modules/desktop_capture/win/scoped_thread_desktop.h
index 83ce454..deabefa 100644
--- a/modules/desktop_capture/win/scoped_thread_desktop.h
+++ b/modules/desktop_capture/win/scoped_thread_desktop.h
@@ -11,10 +11,10 @@
#ifndef MODULES_DESKTOP_CAPTURE_WIN_SCOPED_THREAD_DESKTOP_H_
#define MODULES_DESKTOP_CAPTURE_WIN_SCOPED_THREAD_DESKTOP_H_
-#include <memory>
-
#include <windows.h>
+#include <memory>
+
#include "rtc_base/constructor_magic.h"
namespace webrtc {
diff --git a/modules/desktop_capture/win/screen_capturer_win_directx_unittest.cc b/modules/desktop_capture/win/screen_capturer_win_directx_unittest.cc
index 5874cb8..c9f46f7 100644
--- a/modules/desktop_capture/win/screen_capturer_win_directx_unittest.cc
+++ b/modules/desktop_capture/win/screen_capturer_win_directx_unittest.cc
@@ -22,7 +22,9 @@
// devices in its output, since the device name is missing.
TEST(ScreenCaptureUtilsTest, GetScreenListFromDeviceNamesAndGetIndex) {
const std::vector<std::string> device_names = {
- "\\\\.\\DISPLAY0", "\\\\.\\DISPLAY1", "\\\\.\\DISPLAY2",
+ "\\\\.\\DISPLAY0",
+ "\\\\.\\DISPLAY1",
+ "\\\\.\\DISPLAY2",
};
DesktopCapturer::SourceList screens;
ASSERT_TRUE(ScreenCapturerWinDirectx::GetScreenListFromDeviceNames(
diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.h b/modules/desktop_capture/win/screen_capturer_win_gdi.h
index a9c0fa9..e006c79 100644
--- a/modules/desktop_capture/win/screen_capturer_win_gdi.h
+++ b/modules/desktop_capture/win/screen_capturer_win_gdi.h
@@ -11,10 +11,10 @@
#ifndef MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_
#define MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_
-#include <memory>
-
#include <windows.h>
+#include <memory>
+
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/screen_capture_frame_queue.h"
#include "modules/desktop_capture/shared_desktop_frame.h"
diff --git a/modules/desktop_capture/win/screen_capturer_win_magnifier.h b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
index b14beeb..19202a7 100644
--- a/modules/desktop_capture/win/screen_capturer_win_magnifier.h
+++ b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
@@ -11,12 +11,12 @@
#ifndef MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
#define MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
-#include <memory>
-
#include <magnification.h>
#include <wincodec.h>
#include <windows.h>
+#include <memory>
+
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/screen_capture_frame_queue.h"
#include "modules/desktop_capture/screen_capturer_helper.h"
diff --git a/modules/desktop_capture/window_finder_unittest.cc b/modules/desktop_capture/window_finder_unittest.cc
index 4e01628..4fa30e1 100644
--- a/modules/desktop_capture/window_finder_unittest.cc
+++ b/modules/desktop_capture/window_finder_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/desktop_capture/window_finder.h"
#include <stdint.h>
+
#include <memory>
#include "api/scoped_refptr.h"
diff --git a/modules/include/module_common_types.cc b/modules/include/module_common_types.cc
index b785e46..86f7533 100644
--- a/modules/include/module_common_types.cc
+++ b/modules/include/module_common_types.cc
@@ -11,6 +11,7 @@
#include "modules/include/module_common_types.h"
#include <string.h>
+
#include <cstdint>
#include <utility>
diff --git a/modules/include/module_common_types.h b/modules/include/module_common_types.h
index 7cbc16c..052b2d6 100644
--- a/modules/include/module_common_types.h
+++ b/modules/include/module_common_types.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/rtp_headers.h"
diff --git a/modules/pacing/bitrate_prober.h b/modules/pacing/bitrate_prober.h
index 84b2c12..0a9f961 100644
--- a/modules/pacing/bitrate_prober.h
+++ b/modules/pacing/bitrate_prober.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <queue>
#include "api/transport/field_trial_based_config.h"
diff --git a/modules/pacing/bitrate_prober_unittest.cc b/modules/pacing/bitrate_prober_unittest.cc
index 380d345..c907cdd 100644
--- a/modules/pacing/bitrate_prober_unittest.cc
+++ b/modules/pacing/bitrate_prober_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/pacing/bitrate_prober.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/pacing/paced_sender.h b/modules/pacing/paced_sender.h
index 0cdb068..3bc628d 100644
--- a/modules/pacing/paced_sender.h
+++ b/modules/pacing/paced_sender.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <atomic>
#include <memory>
diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc
index d630980..f282d01 100644
--- a/modules/pacing/paced_sender_unittest.cc
+++ b/modules/pacing/paced_sender_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/pacing/paced_sender.h"
+
#include <list>
#include <memory>
#include <string>
#include "absl/memory/memory.h"
-#include "modules/pacing/paced_sender.h"
#include "modules/pacing/packet_router.h"
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"
diff --git a/modules/pacing/packet_router.h b/modules/pacing/packet_router.h
index a03dc4c..79d3fa9 100644
--- a/modules/pacing/packet_router.h
+++ b/modules/pacing/packet_router.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <memory>
#include <unordered_map>
diff --git a/modules/pacing/packet_router_unittest.cc b/modules/pacing/packet_router_unittest.cc
index de2f342..5add5f7 100644
--- a/modules/pacing/packet_router_unittest.cc
+++ b/modules/pacing/packet_router_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/pacing/packet_router.h"
+
#include <cstddef>
#include <cstdint>
#include <utility>
#include "absl/memory/memory.h"
#include "api/units/time_delta.h"
-#include "modules/pacing/packet_router.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
diff --git a/modules/pacing/round_robin_packet_queue.h b/modules/pacing/round_robin_packet_queue.h
index 812ae87..4bab4fa 100644
--- a/modules/pacing/round_robin_packet_queue.h
+++ b/modules/pacing/round_robin_packet_queue.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <map>
#include <memory>
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc
index ffe118a..1e5d292 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -11,6 +11,7 @@
#include "modules/remote_bitrate_estimator/aimd_rate_control.h"
#include <inttypes.h>
+
#include <algorithm>
#include <cassert>
#include <cmath>
@@ -106,7 +107,7 @@
ParseFieldTrial(
{&capacity_deviation_ratio_threshold_, &cross_traffic_factor_,
&capacity_limit_deviation_factor_},
- key_value_config->Lookup("WebRTC-Bwe-AimdRateControl-NetworkState"));
+ key_value_config->Lookup("WebRTC-Bwe-AimdRateControl-NetworkState"));
}
AimdRateControl::~AimdRateControl() {}
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc b/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc
index 4a0de0d..11ed4b0 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc
@@ -7,10 +7,11 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/remote_bitrate_estimator/aimd_rate_control.h"
+
#include <memory>
#include "api/transport/field_trial_based_config.h"
-#include "modules/remote_bitrate_estimator/aimd_rate_control.h"
#include "system_wrappers/include/clock.h"
#include "test/field_trial.h"
#include "test/gtest.h"
diff --git a/modules/remote_bitrate_estimator/bwe_defines.cc b/modules/remote_bitrate_estimator/bwe_defines.cc
index e2b14b6..1a67faa 100644
--- a/modules/remote_bitrate_estimator/bwe_defines.cc
+++ b/modules/remote_bitrate_estimator/bwe_defines.cc
@@ -9,6 +9,7 @@
*/
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
+
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/inter_arrival_unittest.cc b/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
index daf6f6e..72a772e 100644
--- a/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
+++ b/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/remote_bitrate_estimator/inter_arrival.h"
+
#include <memory>
-#include "modules/remote_bitrate_estimator/inter_arrival.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/overuse_detector.cc b/modules/remote_bitrate_estimator/overuse_detector.cc
index 6698c55..44cbe50 100644
--- a/modules/remote_bitrate_estimator/overuse_detector.cc
+++ b/modules/remote_bitrate_estimator/overuse_detector.cc
@@ -12,6 +12,7 @@
#include <math.h>
#include <stdio.h>
+
#include <algorithm>
#include <string>
diff --git a/modules/remote_bitrate_estimator/overuse_detector_unittest.cc b/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
index 91f9609..8420af9 100644
--- a/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
+++ b/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
@@ -8,15 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/remote_bitrate_estimator/overuse_detector.h"
+
#include <stdio.h>
#include <string.h>
+
#include <algorithm>
#include <cstdlib>
#include <memory>
#include "api/transport/field_trial_based_config.h"
#include "modules/remote_bitrate_estimator/inter_arrival.h"
-#include "modules/remote_bitrate_estimator/overuse_detector.h"
#include "modules/remote_bitrate_estimator/overuse_estimator.h"
#include "rtc_base/random.h"
#include "test/field_trial.h"
diff --git a/modules/remote_bitrate_estimator/overuse_estimator.cc b/modules/remote_bitrate_estimator/overuse_estimator.cc
index 206ceba..e97e06b 100644
--- a/modules/remote_bitrate_estimator/overuse_estimator.cc
+++ b/modules/remote_bitrate_estimator/overuse_estimator.cc
@@ -13,6 +13,7 @@
#include <assert.h>
#include <math.h>
#include <string.h>
+
#include <algorithm>
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
diff --git a/modules/remote_bitrate_estimator/overuse_estimator.h b/modules/remote_bitrate_estimator/overuse_estimator.h
index f52e063..d5f675e 100644
--- a/modules/remote_bitrate_estimator/overuse_estimator.h
+++ b/modules/remote_bitrate_estimator/overuse_estimator.h
@@ -11,6 +11,7 @@
#define MODULES_REMOTE_BITRATE_ESTIMATOR_OVERUSE_ESTIMATOR_H_
#include <stdint.h>
+
#include <deque>
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
index 02225a5..9fd4974 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <map>
#include <memory>
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
index aabf122..32419dd 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
@@ -11,6 +11,7 @@
#include "modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
#include <assert.h>
+
#include <cstdint>
#include <utility>
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
index 80129ce..a28109c 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <memory>
#include <vector>
diff --git a/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc b/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
index 4be1289..6962723 100644
--- a/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
+++ b/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/remote_bitrate_estimator/remote_estimator_proxy.h"
+
#include "api/transport/field_trial_based_config.h"
#include "modules/pacing/packet_router.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
diff --git a/modules/rtp_rtcp/include/flexfec_receiver.h b/modules/rtp_rtcp/include/flexfec_receiver.h
index e1844a4..6df984f 100644
--- a/modules/rtp_rtcp/include/flexfec_receiver.h
+++ b/modules/rtp_rtcp/include/flexfec_receiver.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_INCLUDE_FLEXFEC_RECEIVER_H_
#include <stdint.h>
+
#include <memory>
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
diff --git a/modules/rtp_rtcp/include/rtp_header_extension_map.h b/modules/rtp_rtcp/include/rtp_header_extension_map.h
index 07b31a3..5bca4a8 100644
--- a/modules/rtp_rtcp/include/rtp_header_extension_map.h
+++ b/modules/rtp_rtcp/include/rtp_header_extension_map.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_INCLUDE_RTP_HEADER_EXTENSION_MAP_H_
#include <stdint.h>
+
#include <string>
#include "api/array_view.h"
diff --git a/modules/rtp_rtcp/include/rtp_rtcp_defines.cc b/modules/rtp_rtcp/include/rtp_rtcp_defines.cc
index 19dafb3..7f8efca 100644
--- a/modules/rtp_rtcp/include/rtp_rtcp_defines.cc
+++ b/modules/rtp_rtcp/include/rtp_rtcp_defines.cc
@@ -9,14 +9,15 @@
*/
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "modules/rtp_rtcp/source/rtp_packet.h"
#include <ctype.h>
#include <string.h>
+
#include <type_traits>
#include "absl/algorithm/container.h"
#include "api/array_view.h"
+#include "modules/rtp_rtcp/source/rtp_packet.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/modules/rtp_rtcp/include/rtp_rtcp_defines.h
index e986c95..2b46764 100644
--- a/modules/rtp_rtcp/include/rtp_rtcp_defines.h
+++ b/modules/rtp_rtcp/include/rtp_rtcp_defines.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_
#include <stddef.h>
+
#include <list>
#include <vector>
@@ -445,7 +446,7 @@
fec.payload_bytes;
}
- int64_t first_packet_time_ms; // Time when first packet is sent/received.
+ int64_t first_packet_time_ms; // Time when first packet is sent/received.
// The timestamp at which the last packet was received, i.e. the time of the
// local clock when it was received - not the RTP timestamp of that packet.
// https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-lastpacketreceivedtimestamp
diff --git a/modules/rtp_rtcp/source/byte_io.h b/modules/rtp_rtcp/source/byte_io.h
index 955bce7..a98eb30 100644
--- a/modules/rtp_rtcp/source/byte_io.h
+++ b/modules/rtp_rtcp/source/byte_io.h
@@ -35,6 +35,7 @@
// it easy for the compiler to completely inline the reading/writing.
#include <stdint.h>
+
#include <limits>
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/byte_io_unittest.cc b/modules/rtp_rtcp/source/byte_io_unittest.cc
index 20b6636..e4dea81 100644
--- a/modules/rtp_rtcp/source/byte_io_unittest.cc
+++ b/modules/rtp_rtcp/source/byte_io_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/byte_io.h"
+
#include <limits>
-#include "modules/rtp_rtcp/source/byte_io.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/contributing_sources_unittest.cc b/modules/rtp_rtcp/source/contributing_sources_unittest.cc
index acf8a90..fa8b97b 100644
--- a/modules/rtp_rtcp/source/contributing_sources_unittest.cc
+++ b/modules/rtp_rtcp/source/contributing_sources_unittest.cc
@@ -11,7 +11,6 @@
#include "modules/rtp_rtcp/source/contributing_sources.h"
#include "rtc_base/time_utils.h"
-
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/dtmf_queue.h b/modules/rtp_rtcp/source/dtmf_queue.h
index 28116bc..adb93aa 100644
--- a/modules/rtp_rtcp/source/dtmf_queue.h
+++ b/modules/rtp_rtcp/source/dtmf_queue.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_
#include <stdint.h>
+
#include <list>
#include "rtc_base/critical_section.h"
diff --git a/modules/rtp_rtcp/source/fec_private_tables_bursty_unittest.cc b/modules/rtp_rtcp/source/fec_private_tables_bursty_unittest.cc
index fd116eb..c62f7d5 100644
--- a/modules/rtp_rtcp/source/fec_private_tables_bursty_unittest.cc
+++ b/modules/rtp_rtcp/source/fec_private_tables_bursty_unittest.cc
@@ -9,9 +9,9 @@
*/
#include "modules/rtp_rtcp/source/fec_private_tables_bursty.h"
+
#include "modules/rtp_rtcp/source/fec_private_tables_random.h"
#include "modules/rtp_rtcp/source/forward_error_correction_internal.h"
-
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc b/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc
index 3d19eda..81d0cb3 100644
--- a/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc
+++ b/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/flexfec_header_reader_writer.h"
+
#include <string.h>
#include <memory>
@@ -15,7 +17,6 @@
#include "api/scoped_refptr.h"
#include "modules/rtp_rtcp/source/byte_io.h"
-#include "modules/rtp_rtcp/source/flexfec_header_reader_writer.h"
#include "modules/rtp_rtcp/source/forward_error_correction.h"
#include "modules/rtp_rtcp/source/forward_error_correction_internal.h"
#include "rtc_base/checks.h"
diff --git a/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc b/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
index 805bc64..3d77d7b 100644
--- a/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/include/flexfec_receiver.h"
+
#include <algorithm>
#include <memory>
-#include "modules/rtp_rtcp/include/flexfec_receiver.h"
#include "modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h"
#include "modules/rtp_rtcp/source/fec_test_helper.h"
#include "modules/rtp_rtcp/source/forward_error_correction.h"
diff --git a/modules/rtp_rtcp/source/flexfec_sender.cc b/modules/rtp_rtcp/source/flexfec_sender.cc
index d7b8eca..038cef7 100644
--- a/modules/rtp_rtcp/source/flexfec_sender.cc
+++ b/modules/rtp_rtcp/source/flexfec_sender.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/include/flexfec_sender.h"
#include <string.h>
+
#include <list>
#include <utility>
diff --git a/modules/rtp_rtcp/source/flexfec_sender_unittest.cc b/modules/rtp_rtcp/source/flexfec_sender_unittest.cc
index c561dbb..c7291b0 100644
--- a/modules/rtp_rtcp/source/flexfec_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/flexfec_sender_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/include/flexfec_sender.h"
+
#include <vector>
#include "api/rtp_parameters.h"
-#include "modules/rtp_rtcp/include/flexfec_sender.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/fec_test_helper.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
diff --git a/modules/rtp_rtcp/source/forward_error_correction.cc b/modules/rtp_rtcp/source/forward_error_correction.cc
index b7c0809..413c708 100644
--- a/modules/rtp_rtcp/source/forward_error_correction.cc
+++ b/modules/rtp_rtcp/source/forward_error_correction.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/forward_error_correction.h"
#include <string.h>
+
#include <algorithm>
#include <utility>
diff --git a/modules/rtp_rtcp/source/forward_error_correction.h b/modules/rtp_rtcp/source/forward_error_correction.h
index b442273..ad2eef1 100644
--- a/modules/rtp_rtcp/source/forward_error_correction.h
+++ b/modules/rtp_rtcp/source/forward_error_correction.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <memory>
#include <vector>
diff --git a/modules/rtp_rtcp/source/forward_error_correction_internal.cc b/modules/rtp_rtcp/source/forward_error_correction_internal.cc
index 9b02026..2a056a6 100644
--- a/modules/rtp_rtcp/source/forward_error_correction_internal.cc
+++ b/modules/rtp_rtcp/source/forward_error_correction_internal.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/forward_error_correction_internal.h"
#include <string.h>
+
#include <algorithm>
#include "modules/rtp_rtcp/source/fec_private_tables_bursty.h"
diff --git a/modules/rtp_rtcp/source/packet_loss_stats.h b/modules/rtp_rtcp/source/packet_loss_stats.h
index 7c4f658..60d2029 100644
--- a/modules/rtp_rtcp/source/packet_loss_stats.h
+++ b/modules/rtp_rtcp/source/packet_loss_stats.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_SOURCE_PACKET_LOSS_STATS_H_
#include <stdint.h>
+
#include <set>
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/packet_loss_stats_unittest.cc b/modules/rtp_rtcp/source/packet_loss_stats_unittest.cc
index 3731250..673b223 100644
--- a/modules/rtp_rtcp/source/packet_loss_stats_unittest.cc
+++ b/modules/rtp_rtcp/source/packet_loss_stats_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/rtp_rtcp/source/packet_loss_stats.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/playout_delay_oracle.cc b/modules/rtp_rtcp/source/playout_delay_oracle.cc
index e3e13fd..f234759 100644
--- a/modules/rtp_rtcp/source/playout_delay_oracle.cc
+++ b/modules/rtp_rtcp/source/playout_delay_oracle.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <algorithm>
-
#include "modules/rtp_rtcp/source/playout_delay_oracle.h"
+#include <algorithm>
+
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.h b/modules/rtp_rtcp/source/receive_statistics_impl.h
index 3ab1160..d4bcc45 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -11,14 +11,13 @@
#ifndef MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_
#define MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_
-#include "modules/rtp_rtcp/include/receive_statistics.h"
-
#include <algorithm>
#include <map>
#include <vector>
#include "absl/types/optional.h"
#include "modules/include/module_common_types_public.h"
+#include "modules/rtp_rtcp/include/receive_statistics.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/rate_statistics.h"
#include "rtc_base/thread_annotations.h"
diff --git a/modules/rtp_rtcp/source/receive_statistics_unittest.cc b/modules/rtp_rtcp/source/receive_statistics_unittest.cc
index 7840b97..f899503 100644
--- a/modules/rtp_rtcp/source/receive_statistics_unittest.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/include/receive_statistics.h"
+
#include <memory>
#include <vector>
-#include "modules/rtp_rtcp/include/receive_statistics.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "rtc_base/random.h"
#include "system_wrappers/include/clock.h"
diff --git a/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc b/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc
index 6347758..9f42f57 100644
--- a/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc
+++ b/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
+
#include "system_wrappers/include/clock.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtcp_nack_stats_unittest.cc b/modules/rtp_rtcp/source/rtcp_nack_stats_unittest.cc
index 1c30173..60858e1 100644
--- a/modules/rtp_rtcp/source/rtcp_nack_stats_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_nack_stats_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/rtp_rtcp/source/rtcp_nack_stats.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/app.cc b/modules/rtp_rtcp/source/rtcp_packet/app.cc
index eadd4d9..86cde91 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/app.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/app.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtcp_packet/app.h"
#include <string.h>
+
#include <cstdint>
#include "modules/rtp_rtcp/source/byte_io.h"
diff --git a/modules/rtp_rtcp/source/rtcp_packet/bye.cc b/modules/rtp_rtcp/source/rtcp_packet/bye.cc
index 23ac35f..6553b89 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/bye.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/bye.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtcp_packet/bye.h"
#include <string.h>
+
#include <cstdint>
#include <utility>
diff --git a/modules/rtp_rtcp/source/rtcp_packet/nack_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/nack_unittest.cc
index c94513f..aabae0d 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/nack_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/nack_unittest.cc
@@ -21,9 +21,9 @@
using ::testing::ElementsAre;
using ::testing::ElementsAreArray;
using ::testing::Invoke;
+using ::testing::make_tuple;
using ::testing::MockFunction;
using ::testing::UnorderedElementsAreArray;
-using ::testing::make_tuple;
using ::webrtc::rtcp::Nack;
constexpr uint32_t kSenderSsrc = 0x12345678;
diff --git a/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h b/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h
index 7470d1d..bd66b8d 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h
+++ b/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "modules/rtp_rtcp/source/rtcp_packet.h"
diff --git a/modules/rtp_rtcp/source/rtcp_packet/sdes.cc b/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
index 0ef4329..b2d0ff9 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtcp_packet/sdes.h"
#include <string.h>
+
#include <utility>
#include "modules/rtp_rtcp/source/byte_io.h"
diff --git a/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
index 83f28b0..3f99b03 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
@@ -22,8 +22,8 @@
namespace webrtc {
namespace {
-using ::testing::ElementsAreArray;
using rtcp::TransportFeedback;
+using ::testing::ElementsAreArray;
static const int kHeaderSize = 20;
static const int kStatusChunkSize = 2;
diff --git a/modules/rtp_rtcp/source/rtcp_packet_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
index 788028d..dccd135 100644
--- a/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/rtp_rtcp/source/rtcp_packet.h"
+
#include "modules/rtp_rtcp/source/rtcp_packet/receiver_report.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index c966470..6fa2cdf 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtcp_receiver.h"
+
#include <memory>
#include "api/array_view.h"
@@ -33,7 +35,6 @@
#include "modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
#include "modules/rtp_rtcp/source/rtcp_packet/tmmbr.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
-#include "modules/rtp_rtcp/source/rtcp_receiver.h"
#include "modules/rtp_rtcp/source/time_util.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/fake_clock.h"
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index 19f1e26..af5cd27 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -10,9 +10,9 @@
#include "modules/rtp_rtcp/source/rtcp_sender.h"
-#include <string.h> // memcpy
-#include <algorithm> // std::min
+#include <string.h> // memcpy
+#include <algorithm> // std::min
#include <utility>
#include "absl/memory/memory.h"
diff --git a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
index 0ddfb94..01101c0 100644
--- a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtcp_sender.h"
+
#include <memory>
#include "absl/base/macros.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtcp_packet/bye.h"
#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
-#include "modules/rtp_rtcp/source/rtcp_sender.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_impl.h"
#include "modules/rtp_rtcp/source/time_util.h"
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver.cc b/modules/rtp_rtcp/source/rtcp_transceiver.cc
index cca3205..a378b36 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_transceiver.cc
@@ -75,26 +75,21 @@
void RtcpTransceiver::SetReadyToSend(bool ready) {
RTC_CHECK(rtcp_transceiver_);
RtcpTransceiverImpl* ptr = rtcp_transceiver_.get();
- task_queue_->PostTask([ptr, ready] {
- ptr->SetReadyToSend(ready);
- });
+ task_queue_->PostTask([ptr, ready] { ptr->SetReadyToSend(ready); });
}
void RtcpTransceiver::ReceivePacket(rtc::CopyOnWriteBuffer packet) {
RTC_CHECK(rtcp_transceiver_);
RtcpTransceiverImpl* ptr = rtcp_transceiver_.get();
int64_t now_us = rtc::TimeMicros();
- task_queue_->PostTask([ptr, packet, now_us] {
- ptr->ReceivePacket(packet, now_us);
- });
+ task_queue_->PostTask(
+ [ptr, packet, now_us] { ptr->ReceivePacket(packet, now_us); });
}
void RtcpTransceiver::SendCompoundPacket() {
RTC_CHECK(rtcp_transceiver_);
RtcpTransceiverImpl* ptr = rtcp_transceiver_.get();
- task_queue_->PostTask([ptr] {
- ptr->SendCompoundPacket();
- });
+ task_queue_->PostTask([ptr] { ptr->SendCompoundPacket(); });
}
void RtcpTransceiver::SetRemb(int64_t bitrate_bps,
@@ -102,9 +97,7 @@
RTC_CHECK(rtcp_transceiver_);
// TODO(danilchap): Replace with lambda with move capture when available.
struct SetRembClosure {
- void operator()() {
- ptr->SetRemb(bitrate_bps, std::move(ssrcs));
- }
+ void operator()() { ptr->SetRemb(bitrate_bps, std::move(ssrcs)); }
RtcpTransceiverImpl* ptr;
int64_t bitrate_bps;
@@ -117,9 +110,7 @@
void RtcpTransceiver::UnsetRemb() {
RTC_CHECK(rtcp_transceiver_);
RtcpTransceiverImpl* ptr = rtcp_transceiver_.get();
- task_queue_->PostTask([ptr] {
- ptr->UnsetRemb();
- });
+ task_queue_->PostTask([ptr] { ptr->UnsetRemb(); });
}
uint32_t RtcpTransceiver::SSRC() const {
@@ -130,9 +121,7 @@
const rtcp::TransportFeedback& packet) {
RTC_CHECK(rtcp_transceiver_);
struct Closure {
- void operator()() {
- ptr->SendRawPacket(raw_packet);
- }
+ void operator()() { ptr->SendRawPacket(raw_packet); }
RtcpTransceiverImpl* ptr;
rtc::Buffer raw_packet;
};
@@ -145,9 +134,7 @@
RTC_CHECK(rtcp_transceiver_);
// TODO(danilchap): Replace with lambda with move capture when available.
struct Closure {
- void operator()() {
- ptr->SendNack(ssrc, std::move(sequence_numbers));
- }
+ void operator()() { ptr->SendNack(ssrc, std::move(sequence_numbers)); }
RtcpTransceiverImpl* ptr;
uint32_t ssrc;
@@ -167,9 +154,7 @@
RTC_CHECK(rtcp_transceiver_);
// TODO(danilchap): Replace with lambda with move capture when available.
struct Closure {
- void operator()() {
- ptr->SendFullIntraRequest(ssrcs);
- }
+ void operator()() { ptr->SendFullIntraRequest(ssrcs); }
RtcpTransceiverImpl* ptr;
std::vector<uint32_t> ssrcs;
diff --git a/modules/rtp_rtcp/source/rtp_format.h b/modules/rtp_rtcp/source/rtp_format.h
index b28e9a6..1d9c142 100644
--- a/modules/rtp_rtcp/source/rtp_format.h
+++ b/modules/rtp_rtcp/source/rtp_format.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H_
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.cc b/modules/rtp_rtcp/source/rtp_format_h264.cc
index 28cc2fb..f979d9f 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.cc
+++ b/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtp_format_h264.h"
#include <string.h>
+
#include <cstddef>
#include <cstdint>
#include <iterator>
@@ -75,8 +76,7 @@
PayloadSizeLimits limits,
H264PacketizationMode packetization_mode,
const RTPFragmentationHeader& fragmentation)
- : limits_(limits),
- num_packets_left_(0) {
+ : limits_(limits), num_packets_left_(0) {
// Guard against uninitialized memory in packetization_mode.
RTC_CHECK(packetization_mode == H264PacketizationMode::NonInterleaved ||
packetization_mode == H264PacketizationMode::SingleNalUnit);
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.h b/modules/rtp_rtcp/source/rtp_format_h264.h
index 3a51359..7102fc7 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.h
+++ b/modules/rtp_rtcp/source/rtp_format_h264.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <deque>
#include <memory>
#include <queue>
diff --git a/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
index 484dbcb..d3ba982 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_format_h264.h"
+
#include <memory>
#include <vector>
@@ -16,7 +18,6 @@
#include "modules/include/module_common_types.h"
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "modules/rtp_rtcp/source/byte_io.h"
-#include "modules/rtp_rtcp/source/rtp_format_h264.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_unittest.cc b/modules/rtp_rtcp/source/rtp_format_unittest.cc
index d07c65c..53264c6 100644
--- a/modules/rtp_rtcp/source/rtp_format_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_unittest.cc
@@ -20,11 +20,11 @@
namespace webrtc {
namespace {
-using ::testing::ElementsAre;
-using ::testing::Le;
-using ::testing::Gt;
using ::testing::Each;
+using ::testing::ElementsAre;
+using ::testing::Gt;
using ::testing::IsEmpty;
+using ::testing::Le;
using ::testing::Not;
using ::testing::SizeIs;
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic.cc b/modules/rtp_rtcp/source/rtp_format_video_generic.cc
index a45597d..3c0fe03 100644
--- a/modules/rtp_rtcp/source/rtp_format_video_generic.cc
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
+
#include <assert.h>
#include <string.h>
#include "absl/types/optional.h"
-#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic.h b/modules/rtp_rtcp/source/rtp_format_video_generic.h
index 4e21c96..43d4bcf 100644
--- a/modules/rtp_rtcp/source/rtp_format_video_generic.h
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic.h
@@ -11,6 +11,7 @@
#define MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_
#include <stdint.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic_unittest.cc b/modules/rtp_rtcp/source/rtp_format_video_generic_unittest.cc
index d43af77..9ba0573 100644
--- a/modules/rtp_rtcp/source/rtp_format_video_generic_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
+
#include <algorithm>
#include <limits>
#include <memory>
@@ -17,7 +19,6 @@
#include "modules/include/module_common_types.h"
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "modules/rtp_rtcp/source/byte_io.h"
-#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "test/gmock.h"
#include "test/gtest.h"
@@ -25,11 +26,11 @@
namespace webrtc {
namespace {
+using ::testing::Contains;
using ::testing::Each;
using ::testing::ElementsAreArray;
using ::testing::Le;
using ::testing::SizeIs;
-using ::testing::Contains;
constexpr RtpPacketizer::PayloadSizeLimits kNoSizeLimits;
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8.cc b/modules/rtp_rtcp/source/rtp_format_vp8.cc
index dc56b31..bf7b969 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h> // memcpy
+
#include <vector>
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8.h b/modules/rtp_rtcp/source/rtp_format_vp8.h
index 0e0fa52..6e9cbb4 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.h
@@ -26,6 +26,7 @@
#define MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VP8_H_
#include <stddef.h>
+
#include <cstdint>
#include <vector>
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index 769b0b7..7128ae3 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_format_vp8.h"
+
#include <memory>
-#include "modules/rtp_rtcp/source/rtp_format_vp8.h"
#include "modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "test/gmock.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_vp9.h b/modules/rtp_rtcp/source/rtp_format_vp9.h
index 2918b06..3c4ae76 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp9.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp9.h
@@ -23,6 +23,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc b/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
index 2a7cb15..77fe690 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_format_vp9.h"
+
#include <memory>
#include <vector>
-#include "modules/rtp_rtcp/source/rtp_format_vp9.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h b/modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h
index 47a2a74..9e79455 100644
--- a/modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h
+++ b/modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.cc b/modules/rtp_rtcp/source/rtp_header_extensions.cc
index 834a063..d9ba258 100644
--- a/modules/rtp_rtcp/source/rtp_header_extensions.cc
+++ b/modules/rtp_rtcp/source/rtp_header_extensions.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include <string.h>
+
#include <cmath>
#include <limits>
diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.h b/modules/rtp_rtcp/source/rtp_header_extensions.h
index 5cf6c4f..927c9c3 100644
--- a/modules/rtp_rtcp/source/rtp_header_extensions.h
+++ b/modules/rtp_rtcp/source/rtp_header_extensions.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "api/array_view.h"
@@ -163,9 +164,7 @@
static bool Parse(rtc::ArrayView<const uint8_t> data,
PlayoutDelay* playout_delay);
- static size_t ValueSize(const PlayoutDelay&) {
- return kValueSizeBytes;
- }
+ static size_t ValueSize(const PlayoutDelay&) { return kValueSizeBytes; }
static bool Write(rtc::ArrayView<uint8_t> data,
const PlayoutDelay& playout_delay);
};
@@ -180,9 +179,7 @@
static bool Parse(rtc::ArrayView<const uint8_t> data,
VideoContentType* content_type);
- static size_t ValueSize(VideoContentType) {
- return kValueSizeBytes;
- }
+ static size_t ValueSize(VideoContentType) { return kValueSizeBytes; }
static bool Write(rtc::ArrayView<uint8_t> data,
VideoContentType content_type);
};
diff --git a/modules/rtp_rtcp/source/rtp_packet_received.cc b/modules/rtp_rtcp/source/rtp_packet_received.cc
index 05f6370..56aea8e 100644
--- a/modules/rtp_rtcp/source/rtp_packet_received.cc
+++ b/modules/rtp_rtcp/source/rtp_packet_received.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include <stddef.h>
+
#include <cstdint>
#include <vector>
diff --git a/modules/rtp_rtcp/source/rtp_packet_received.h b/modules/rtp_rtcp/source/rtp_packet_received.h
index 566b116..f5d3176 100644
--- a/modules/rtp_rtcp/source/rtp_packet_received.h
+++ b/modules/rtp_rtcp/source/rtp_packet_received.h
@@ -11,6 +11,7 @@
#define MODULES_RTP_RTCP_SOURCE_RTP_PACKET_RECEIVED_H_
#include <stdint.h>
+
#include <vector>
#include "api/array_view.h"
diff --git a/modules/rtp_rtcp/source/rtp_packet_to_send.h b/modules/rtp_rtcp/source/rtp_packet_to_send.h
index 1cbe7de..b222e40 100644
--- a/modules/rtp_rtcp/source/rtp_packet_to_send.h
+++ b/modules/rtp_rtcp/source/rtp_packet_to_send.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/modules/rtp_rtcp/source/rtp_packet_unittest.cc b/modules/rtp_rtcp/source/rtp_packet_unittest.cc
index 8121e81..9148c67 100644
--- a/modules/rtp_rtcp/source/rtp_packet_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_packet_unittest.cc
@@ -7,12 +7,11 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/rtp_rtcp/source/rtp_packet_received.h"
-#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
-
#include "common_video/test/utilities.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
+#include "modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/random.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index aaf1822..aa50227 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtp_rtcp_impl.h"
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <set>
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index e22126c..ec62aeb 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <set>
#include <string>
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index 2f059c4..31f9b24 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_rtcp_impl.h"
+
#include <map>
#include <memory>
#include <set>
@@ -21,7 +23,6 @@
#include "modules/rtp_rtcp/source/rtcp_packet.h"
#include "modules/rtp_rtcp/source/rtcp_packet/nack.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_impl.h"
#include "modules/rtp_rtcp/source/rtp_sender_video.h"
#include "rtc_base/rate_limiter.h"
#include "test/gmock.h"
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio.cc b/modules/rtp_rtcp/source/rtp_sender_audio.cc
index 9e5e71c..f3e742a 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_audio.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/rtp_sender_audio.h"
#include <string.h>
+
#include <memory>
#include <utility>
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
index 2228994..dea2a38 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_sender_audio.h"
+
#include <vector>
#include "api/transport/field_trial_based_config.h"
@@ -16,7 +18,6 @@
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_sender.h"
-#include "modules/rtp_rtcp/source/rtp_sender_audio.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 02462b4..495ffee 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_sender.h"
+
#include <memory>
#include <vector>
@@ -29,7 +31,6 @@
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
-#include "modules/rtp_rtcp/source/rtp_sender.h"
#include "modules/rtp_rtcp/source/rtp_sender_video.h"
#include "modules/rtp_rtcp/source/rtp_utility.h"
#include "rtc_base/arraysize.h"
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc
index 750dcf5..632088b 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -448,8 +448,9 @@
int32_t retransmission_settings;
bool set_video_rotation;
bool set_color_space = false;
- bool set_frame_marking = video_header->codec == kVideoCodecH264 &&
- video_header->frame_marking.temporal_id != kNoTemporalIdx;
+ bool set_frame_marking =
+ video_header->codec == kVideoCodecH264 &&
+ video_header->frame_marking.temporal_id != kNoTemporalIdx;
const absl::optional<PlayoutDelay> playout_delay =
playout_delay_oracle_->PlayoutDelayToSend(video_header->playout_delay);
diff --git a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
index 2589ad2..f19c110 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/rtp_sender_video.h"
+
#include <string>
#include <vector>
@@ -22,7 +24,6 @@
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_sender.h"
-#include "modules/rtp_rtcp/source/rtp_sender_video.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/rate_limiter.h"
#include "test/gmock.h"
diff --git a/modules/rtp_rtcp/source/rtp_sequence_number_map.h b/modules/rtp_rtcp/source/rtp_sequence_number_map.h
index 68fcc63..56979a3 100644
--- a/modules/rtp_rtcp/source/rtp_sequence_number_map.h
+++ b/modules/rtp_rtcp/source/rtp_sequence_number_map.h
@@ -13,7 +13,6 @@
#include <cstddef>
#include <cstdint>
-
#include <deque>
#include "absl/types/optional.h"
diff --git a/modules/rtp_rtcp/source/rtp_utility.cc b/modules/rtp_rtcp/source/rtp_utility.cc
index 6c2629c..21d3595 100644
--- a/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/modules/rtp_rtcp/source/rtp_utility.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <stddef.h>
+
#include <string>
#include "api/array_view.h"
@@ -245,8 +246,8 @@
header->extension.video_timing = {0u, 0u, 0u, 0u, 0u, 0u, false};
header->extension.has_frame_marking = false;
- header->extension.frame_marking = {false, false, false, false, false,
- kNoTemporalIdx, 0, 0};
+ header->extension.frame_marking = {false, false, false, false,
+ false, kNoTemporalIdx, 0, 0};
if (X) {
/* RTP header extension, RFC 3550.
@@ -498,7 +499,7 @@
}
case kRtpExtensionFrameMarking: {
if (!FrameMarkingExtension::Parse(rtc::MakeArrayView(ptr, len + 1),
- &header->extension.frame_marking)) {
+ &header->extension.frame_marking)) {
RTC_LOG(LS_WARNING) << "Incorrect frame marking len: " << len;
return;
}
diff --git a/modules/rtp_rtcp/source/rtp_utility.h b/modules/rtp_rtcp/source/rtp_utility.h
index b1bc352..cdda9ef 100644
--- a/modules/rtp_rtcp/source/rtp_utility.h
+++ b/modules/rtp_rtcp/source/rtp_utility.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_
#include <stdint.h>
+
#include <algorithm>
#include "absl/strings/string_view.h"
diff --git a/modules/rtp_rtcp/source/tmmbr_help.cc b/modules/rtp_rtcp/source/tmmbr_help.cc
index 9404ca4..569ed4d 100644
--- a/modules/rtp_rtcp/source/tmmbr_help.cc
+++ b/modules/rtp_rtcp/source/tmmbr_help.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/tmmbr_help.h"
#include <stddef.h>
+
#include <limits>
#include "absl/algorithm/container.h"
diff --git a/modules/rtp_rtcp/source/tmmbr_help.h b/modules/rtp_rtcp/source/tmmbr_help.h
index bf86f65..8c26b22 100644
--- a/modules/rtp_rtcp/source/tmmbr_help.h
+++ b/modules/rtp_rtcp/source/tmmbr_help.h
@@ -12,6 +12,7 @@
#define MODULES_RTP_RTCP_SOURCE_TMMBR_HELP_H_
#include <stdint.h>
+
#include <vector>
#include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
diff --git a/modules/rtp_rtcp/source/ulpfec_generator.cc b/modules/rtp_rtcp/source/ulpfec_generator.cc
index 56dae29..ec9088c 100644
--- a/modules/rtp_rtcp/source/ulpfec_generator.cc
+++ b/modules/rtp_rtcp/source/ulpfec_generator.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/ulpfec_generator.h"
#include <string.h>
+
#include <cstdint>
#include <memory>
#include <utility>
diff --git a/modules/rtp_rtcp/source/ulpfec_generator.h b/modules/rtp_rtcp/source/ulpfec_generator.h
index 74a1d80..7b18c6e 100644
--- a/modules/rtp_rtcp/source/ulpfec_generator.h
+++ b/modules/rtp_rtcp/source/ulpfec_generator.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <memory>
#include <vector>
diff --git a/modules/rtp_rtcp/source/ulpfec_generator_unittest.cc b/modules/rtp_rtcp/source/ulpfec_generator_unittest.cc
index 10099cf..6880f79 100644
--- a/modules/rtp_rtcp/source/ulpfec_generator_unittest.cc
+++ b/modules/rtp_rtcp/source/ulpfec_generator_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/ulpfec_generator.h"
+
#include <list>
#include <memory>
#include <utility>
@@ -16,7 +18,6 @@
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/fec_test_helper.h"
#include "modules/rtp_rtcp/source/forward_error_correction.h"
-#include "modules/rtp_rtcp/source/ulpfec_generator.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc b/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc
index 2ad1239..725f9a5 100644
--- a/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc
+++ b/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h"
+
#include <string.h>
#include <memory>
@@ -17,7 +19,6 @@
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/forward_error_correction.h"
#include "modules/rtp_rtcp/source/forward_error_correction_internal.h"
-#include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h"
#include "rtc_base/checks.h"
#include "rtc_base/random.h"
#include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc
index 8bda50c..a5d6368 100644
--- a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc
+++ b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc
@@ -11,6 +11,7 @@
#include "modules/rtp_rtcp/source/ulpfec_receiver_impl.h"
#include <string.h>
+
#include <memory>
#include <utility>
diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_impl.h b/modules/rtp_rtcp/source/ulpfec_receiver_impl.h
index fca80c4..51502cd 100644
--- a/modules/rtp_rtcp/source/ulpfec_receiver_impl.h
+++ b/modules/rtp_rtcp/source/ulpfec_receiver_impl.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc b/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
index dd33d6b..cd1798b 100644
--- a/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/rtp_rtcp/include/ulpfec_receiver.h"
+
#include <string.h>
#include <list>
#include <memory>
#include "modules/rtp_rtcp/include/rtp_header_parser.h"
-#include "modules/rtp_rtcp/include/ulpfec_receiver.h"
#include "modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h"
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "modules/rtp_rtcp/source/byte_io.h"
diff --git a/modules/third_party/portaudio/pa_ringbuffer.h b/modules/third_party/portaudio/pa_ringbuffer.h
index 3ad8216..de5722c 100644
--- a/modules/third_party/portaudio/pa_ringbuffer.h
+++ b/modules/third_party/portaudio/pa_ringbuffer.h
@@ -85,16 +85,15 @@
#endif /* __cplusplus */
typedef struct PaUtilRingBuffer {
- PaRingBufferSize
- bufferSize; /**< Number of elements in FIFO. Power of 2. Set by
- PaUtil_InitRingBuffer. */
- PaRingBufferSize writeIndex; /**< Index of next writable element. Set by
- PaUtil_AdvanceRingBufferWriteIndex. */
- PaRingBufferSize readIndex; /**< Index of next readable element. Set by
- PaUtil_AdvanceRingBufferReadIndex. */
- PaRingBufferSize bigMask; /**< Used for wrapping indices with extra bit to
- distinguish full/empty. */
- PaRingBufferSize smallMask; /**< Used for fitting indices to buffer. */
+ PaRingBufferSize bufferSize; /**< Number of elements in FIFO. Power of 2. Set
+ by PaUtil_InitRingBuffer. */
+ PaRingBufferSize writeIndex; /**< Index of next writable element. Set by
+ PaUtil_AdvanceRingBufferWriteIndex. */
+ PaRingBufferSize readIndex; /**< Index of next readable element. Set by
+ PaUtil_AdvanceRingBufferReadIndex. */
+ PaRingBufferSize bigMask; /**< Used for wrapping indices with extra bit to
+ distinguish full/empty. */
+ PaRingBufferSize smallMask; /**< Used for fitting indices to buffer. */
PaRingBufferSize elementSizeBytes; /**< Number of bytes per element. */
char* buffer; /**< Pointer to the buffer containing the actual data. */
} PaUtilRingBuffer;
diff --git a/modules/utility/include/helpers_android.h b/modules/utility/include/helpers_android.h
index 763a0c3..a9e8a60 100644
--- a/modules/utility/include/helpers_android.h
+++ b/modules/utility/include/helpers_android.h
@@ -12,6 +12,7 @@
#define MODULES_UTILITY_INCLUDE_HELPERS_ANDROID_H_
#include <jni.h>
+
#include <string>
#include "rtc_base/system/arch.h"
diff --git a/modules/utility/source/jvm_android.cc b/modules/utility/source/jvm_android.cc
index a1e966f..8e24daa 100644
--- a/modules/utility/source/jvm_android.cc
+++ b/modules/utility/source/jvm_android.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/utility/include/jvm_android.h"
+
#include <android/log.h>
#include <memory>
-#include "modules/utility/include/jvm_android.h"
-
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/platform_thread.h"
diff --git a/modules/utility/source/process_thread_impl.h b/modules/utility/source/process_thread_impl.h
index 0b44340..8cac574 100644
--- a/modules/utility/source/process_thread_impl.h
+++ b/modules/utility/source/process_thread_impl.h
@@ -12,6 +12,7 @@
#define MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_
#include <stdint.h>
+
#include <list>
#include <memory>
#include <queue>
diff --git a/modules/utility/source/process_thread_impl_unittest.cc b/modules/utility/source/process_thread_impl_unittest.cc
index aa71243..bc893cf 100644
--- a/modules/utility/source/process_thread_impl_unittest.cc
+++ b/modules/utility/source/process_thread_impl_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/utility/source/process_thread_impl.h"
+
#include <memory>
#include <utility>
#include "api/task_queue/queued_task.h"
#include "modules/include/module.h"
-#include "modules/utility/source/process_thread_impl.h"
#include "rtc_base/location.h"
#include "rtc_base/time_utils.h"
#include "test/gmock.h"
diff --git a/modules/video_capture/device_info_impl.cc b/modules/video_capture/device_info_impl.cc
index f9079a6..91a7232 100644
--- a/modules/video_capture/device_info_impl.cc
+++ b/modules/video_capture/device_info_impl.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_capture/device_info_impl.h"
+
#include <assert.h>
#include <stdlib.h>
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
-#include "modules/video_capture/device_info_impl.h"
#include "rtc_base/logging.h"
#ifndef abs
@@ -157,7 +158,7 @@
currentbestDiffFrameRate)) // Current frame rate is
// lower than requested.
// This is better.
- ) {
+ ) {
if ((currentbestDiffFrameRate ==
diffFrameRate) // Same frame rate as previous or frame rate
// allready good enough
diff --git a/modules/video_capture/device_info_impl.h b/modules/video_capture/device_info_impl.h
index f59b8d0..37a457c 100644
--- a/modules/video_capture/device_info_impl.h
+++ b/modules/video_capture/device_info_impl.h
@@ -12,6 +12,7 @@
#define MODULES_VIDEO_CAPTURE_MAIN_SOURCE_DEVICE_INFO_IMPL_H_
#include <stdint.h>
+
#include <vector>
#include "api/video/video_rotation.h"
diff --git a/modules/video_capture/linux/device_info_linux.cc b/modules/video_capture/linux/device_info_linux.cc
index 39f72b0..bac5d40 100644
--- a/modules/video_capture/linux/device_info_linux.cc
+++ b/modules/video_capture/linux/device_info_linux.cc
@@ -19,6 +19,7 @@
#include <unistd.h>
// v4l includes
#include <linux/videodev2.h>
+
#include <vector>
#include "modules/video_capture/video_capture.h"
diff --git a/modules/video_capture/linux/video_capture_linux.cc b/modules/video_capture/linux/video_capture_linux.cc
index cfa4739..3086523 100644
--- a/modules/video_capture/linux/video_capture_linux.cc
+++ b/modules/video_capture/linux/video_capture_linux.cc
@@ -20,6 +20,7 @@
#include <sys/select.h>
#include <time.h>
#include <unistd.h>
+
#include <new>
#include <string>
diff --git a/modules/video_capture/linux/video_capture_linux.h b/modules/video_capture/linux/video_capture_linux.h
index 317b011..ac9409e 100644
--- a/modules/video_capture/linux/video_capture_linux.h
+++ b/modules/video_capture/linux/video_capture_linux.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "modules/video_capture/video_capture_defines.h"
diff --git a/modules/video_capture/test/video_capture_unittest.cc b/modules/video_capture/test/video_capture_unittest.cc
index 8b97076..4a726db 100644
--- a/modules/video_capture/test/video_capture_unittest.cc
+++ b/modules/video_capture/test/video_capture_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_capture/video_capture.h"
+
#include <stdio.h>
#include <map>
@@ -20,7 +22,6 @@
#include "api/video/video_frame.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/utility/include/process_thread.h"
-#include "modules/video_capture/video_capture.h"
#include "modules/video_capture/video_capture_factory.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/time_utils.h"
diff --git a/modules/video_capture/video_capture_impl.cc b/modules/video_capture/video_capture_impl.cc
index cd99e2b..9d53a91 100644
--- a/modules/video_capture/video_capture_impl.cc
+++ b/modules/video_capture/video_capture_impl.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_capture/video_capture_impl.h"
+
#include <stdlib.h>
#include <string.h>
@@ -15,7 +17,6 @@
#include "api/video/video_frame_buffer.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_capture/video_capture_config.h"
-#include "modules/video_capture/video_capture_impl.h"
#include "rtc_base/logging.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/time_utils.h"
diff --git a/modules/video_capture/windows/device_info_ds.cc b/modules/video_capture/windows/device_info_ds.cc
index 0f5ba2b..fddb1b8 100644
--- a/modules/video_capture/windows/device_info_ds.cc
+++ b/modules/video_capture/windows/device_info_ds.cc
@@ -10,13 +10,13 @@
#include "modules/video_capture/windows/device_info_ds.h"
+#include <dvdmedia.h>
+
#include "modules/video_capture/video_capture_config.h"
#include "modules/video_capture/windows/help_functions_ds.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_utils.h"
-#include <dvdmedia.h>
-
namespace webrtc {
namespace videocapturemodule {
diff --git a/modules/video_capture/windows/device_info_ds.h b/modules/video_capture/windows/device_info_ds.h
index bcb1eab..d782eb5 100644
--- a/modules/video_capture/windows/device_info_ds.h
+++ b/modules/video_capture/windows/device_info_ds.h
@@ -11,11 +11,11 @@
#ifndef MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_DEVICE_INFO_DS_H_
#define MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_DEVICE_INFO_DS_H_
+#include <dshow.h>
+
#include "modules/video_capture/device_info_impl.h"
#include "modules/video_capture/video_capture_impl.h"
-#include <dshow.h>
-
namespace webrtc {
namespace videocapturemodule {
struct VideoCaptureCapabilityWindows : public VideoCaptureCapability {
diff --git a/modules/video_capture/windows/help_functions_ds.cc b/modules/video_capture/windows/help_functions_ds.cc
index b1bc7af..ad4c064 100644
--- a/modules/video_capture/windows/help_functions_ds.cc
+++ b/modules/video_capture/windows/help_functions_ds.cc
@@ -12,12 +12,11 @@
// that DEFINE_GUID() entries will be defined in this
// object file.
-#include "modules/video_capture/windows/help_functions_ds.h"
-
-#include "rtc_base/logging.h"
-
#include <cguid.h>
+#include "modules/video_capture/windows/help_functions_ds.h"
+#include "rtc_base/logging.h"
+
namespace webrtc {
namespace videocapturemodule {
// This returns minimum :), which will give max frame rate...
diff --git a/modules/video_capture/windows/sink_filter_ds.cc b/modules/video_capture/windows/sink_filter_ds.cc
index 15d3750..5e8960c 100644
--- a/modules/video_capture/windows/sink_filter_ds.cc
+++ b/modules/video_capture/windows/sink_filter_ds.cc
@@ -10,17 +10,17 @@
#include "modules/video_capture/windows/sink_filter_ds.h"
+#include <dvdmedia.h> // VIDEOINFOHEADER2
+#include <initguid.h>
+
+#include <algorithm>
+
#include "rtc_base/arraysize.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/platform_thread.h"
#include "rtc_base/string_utils.h"
-#include <dvdmedia.h> // VIDEOINFOHEADER2
-#include <initguid.h>
-
-#include <algorithm>
-
DEFINE_GUID(CLSID_SINKFILTER,
0x88cdbbdc,
0xa73b,
diff --git a/modules/video_capture/windows/video_capture_ds.cc b/modules/video_capture/windows/video_capture_ds.cc
index b9d0385..615a1b5 100644
--- a/modules/video_capture/windows/video_capture_ds.cc
+++ b/modules/video_capture/windows/video_capture_ds.cc
@@ -10,13 +10,13 @@
#include "modules/video_capture/windows/video_capture_ds.h"
+#include <dvdmedia.h> // VIDEOINFOHEADER2
+
#include "modules/video_capture/video_capture_config.h"
#include "modules/video_capture/windows/help_functions_ds.h"
#include "modules/video_capture/windows/sink_filter_ds.h"
#include "rtc_base/logging.h"
-#include <dvdmedia.h> // VIDEOINFOHEADER2
-
namespace webrtc {
namespace videocapturemodule {
VideoCaptureDS::VideoCaptureDS()
diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index d12de31..6205429 100644
--- a/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -57,8 +57,9 @@
} // namespace
-int H264DecoderImpl::AVGetBuffer2(
- AVCodecContext* context, AVFrame* av_frame, int flags) {
+int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
+ AVFrame* av_frame,
+ int flags) {
// Set in |InitDecode|.
H264DecoderImpl* decoder = static_cast<H264DecoderImpl*>(context->opaque);
// DCHECK values set in |InitDecode|.
@@ -164,8 +165,7 @@
int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
int32_t number_of_cores) {
ReportInit();
- if (codec_settings &&
- codec_settings->codecType != kVideoCodecH264) {
+ if (codec_settings && codec_settings->codecType != kVideoCodecH264) {
ReportError();
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
}
@@ -368,8 +368,7 @@
if (has_reported_init_)
return;
RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.H264DecoderImpl.Event",
- kH264DecoderEventInit,
- kH264DecoderEventMax);
+ kH264DecoderEventInit, kH264DecoderEventMax);
has_reported_init_ = true;
}
@@ -377,8 +376,7 @@
if (has_reported_error_)
return;
RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.H264DecoderImpl.Event",
- kH264DecoderEventError,
- kH264DecoderEventMax);
+ kH264DecoderEventError, kH264DecoderEventMax);
has_reported_error_ = true;
}
diff --git a/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index 7a1af14..7564e85 100644
--- a/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -19,11 +19,6 @@
#include <limits>
#include <string>
-#include "third_party/openh264/src/codec/api/svc/codec_api.h"
-#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
-#include "third_party/openh264/src/codec/api/svc/codec_def.h"
-#include "third_party/openh264/src/codec/api/svc/codec_ver.h"
-
#include "absl/strings/match.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
@@ -34,6 +29,10 @@
#include "system_wrappers/include/metrics.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/scale.h"
+#include "third_party/openh264/src/codec/api/svc/codec_api.h"
+#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
+#include "third_party/openh264/src/codec/api/svc/codec_def.h"
+#include "third_party/openh264/src/codec/api/svc/codec_ver.h"
namespace webrtc {
diff --git a/modules/video_coding/codecs/h264/h264_encoder_impl.h b/modules/video_coding/codecs/h264/h264_encoder_impl.h
index 6c0f0bc..ba99636 100644
--- a/modules/video_coding/codecs/h264/h264_encoder_impl.h
+++ b/modules/video_coding/codecs/h264/h264_encoder_impl.h
@@ -29,7 +29,6 @@
#include "common_video/h264/h264_bitstream_parser.h"
#include "modules/video_coding/codecs/h264/include/h264.h"
#include "modules/video_coding/utility/quality_scaler.h"
-
#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
class ISVCEncoder;
diff --git a/modules/video_coding/codecs/h264/include/h264_globals.h b/modules/video_coding/codecs/h264/include/h264_globals.h
index 321a6b7..073d8f9 100644
--- a/modules/video_coding/codecs/h264/include/h264_globals.h
+++ b/modules/video_coding/codecs/h264/include/h264_globals.h
@@ -15,9 +15,8 @@
#define MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_GLOBALS_H_
#include <string>
+
#include "modules/video_coding/codecs/interface/common_constants.h"
-
-
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc b/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
index 4af0ebb..d65cc4f 100644
--- a/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
+++ b/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/modules/video_coding/codecs/multiplex/augmented_video_frame_buffer.cc b/modules/video_coding/codecs/multiplex/augmented_video_frame_buffer.cc
index 49d1c04..b48996c 100644
--- a/modules/video_coding/codecs/multiplex/augmented_video_frame_buffer.cc
+++ b/modules/video_coding/codecs/multiplex/augmented_video_frame_buffer.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h"
#include <stdint.h>
+
#include <utility>
#include "api/video/video_frame_buffer.h"
diff --git a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
index fa1d2b9..cd39e72 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
+++ b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
@@ -127,10 +127,9 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int32_t MultiplexDecoderAdapter::Decode(
- const EncodedImage& input_image,
- bool missing_frames,
- int64_t render_time_ms) {
+int32_t MultiplexDecoderAdapter::Decode(const EncodedImage& input_image,
+ bool missing_frames,
+ int64_t render_time_ms) {
MultiplexImage image = MultiplexEncodedImagePacker::Unpack(input_image);
if (supports_augmenting_data_) {
diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
index 1700538..554da92 100644
--- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
+++ b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <stddef.h>
+
#include <cstdint>
#include <memory>
#include <utility>
diff --git a/modules/video_coding/codecs/test/android_codec_factory_helper.cc b/modules/video_coding/codecs/test/android_codec_factory_helper.cc
index 3ebc6b7..1227b1f 100644
--- a/modules/video_coding/codecs/test/android_codec_factory_helper.cc
+++ b/modules/video_coding/codecs/test/android_codec_factory_helper.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/test/android_codec_factory_helper.h"
+
#include <pthread.h>
#include <memory>
-#include "modules/video_coding/codecs/test/android_codec_factory_helper.h"
#include "rtc_base/checks.h"
#include "rtc_base/ignore_wundef.h"
#include "sdk/android/native_api/base/init.h"
diff --git a/modules/video_coding/codecs/test/video_codec_unittest.cc b/modules/video_coding/codecs/test/video_codec_unittest.cc
index bb83903..6ebbb7c 100644
--- a/modules/video_coding/codecs/test/video_codec_unittest.cc
+++ b/modules/video_coding/codecs/test/video_codec_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/test/video_codec_unittest.h"
+
#include <utility>
#include "api/video_codecs/video_encoder.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "modules/video_coding/codecs/test/video_codec_unittest.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "test/video_codec_settings.h"
diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc
index f93d539..42081a0 100644
--- a/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/modules/video_coding/codecs/test/videoprocessor.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/codecs/test/videoprocessor.h"
#include <string.h>
+
#include <algorithm>
#include <cstddef>
#include <limits>
diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h
index 64f9c5c..6ac0d65 100644
--- a/modules/video_coding/codecs/test/videoprocessor.h
+++ b/modules/video_coding/codecs/test/videoprocessor.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <memory>
#include <utility>
diff --git a/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/modules/video_coding/codecs/test/videoprocessor_unittest.cc
index d2b71a7..59a64a7 100644
--- a/modules/video_coding/codecs/test/videoprocessor_unittest.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/test/videoprocessor.h"
+
#include <memory>
#include "absl/memory/memory.h"
@@ -18,7 +20,6 @@
#include "api/video/i420_buffer.h"
#include "media/base/media_constants.h"
#include "modules/video_coding/codecs/test/videocodec_test_stats_impl.h"
-#include "modules/video_coding/codecs/test/videoprocessor.h"
#include "rtc_base/task_queue_for_test.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers.h b/modules/video_coding/codecs/vp8/default_temporal_layers.h
index 9f86d40..29cfcf0 100644
--- a/modules/video_coding/codecs/vp8/default_temporal_layers.h
+++ b/modules/video_coding/codecs/vp8/default_temporal_layers.h
@@ -14,6 +14,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <limits>
#include <map>
#include <memory>
diff --git a/modules/video_coding/codecs/vp8/libvpx_interface.cc b/modules/video_coding/codecs/vp8/libvpx_interface.cc
index 6b39053..fd2e80a 100644
--- a/modules/video_coding/codecs/vp8/libvpx_interface.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_interface.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/codecs/vp8/libvpx_interface.h"
+
#include "absl/memory/memory.h"
#include "rtc_base/checks.h"
diff --git a/modules/video_coding/codecs/vp8/libvpx_interface.h b/modules/video_coding/codecs/vp8/libvpx_interface.h
index 1eebeec..fe40ded 100644
--- a/modules/video_coding/codecs/vp8/libvpx_interface.h
+++ b/modules/video_coding/codecs/vp8/libvpx_interface.h
@@ -12,6 +12,7 @@
#define MODULES_VIDEO_CODING_CODECS_VP8_LIBVPX_INTERFACE_H_
#include <stdint.h>
+
#include <memory>
#include "vpx/vp8cx.h"
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
index d4d9e34..6f6d026 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h"
+
#include <stdio.h>
#include <string.h>
+
#include <algorithm>
#include <string>
@@ -21,7 +24,6 @@
#include "api/video/video_frame_buffer.h"
#include "api/video/video_rotation.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
-#include "modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/exp_filter.h"
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
index 49cf4cb..bfe174b 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
@@ -27,7 +27,6 @@
#include "modules/video_coding/utility/framerate_controller.h"
#include "rtc_base/experiments/cpu_speed_experiment.h"
#include "rtc_base/experiments/rate_control_settings.h"
-
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
diff --git a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
index 1f85cb6..a2384b5 100644
--- a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
+++ b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/vp8/screenshare_layers.h"
+
#include <stdlib.h>
#include <string.h>
+
#include <cstdint>
#include <memory>
#include <vector>
@@ -18,7 +21,6 @@
#include "api/video_codecs/vp8_frame_config.h"
#include "modules/video_coding/codecs/interface/common_constants.h"
#include "modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h"
-#include "modules/video_coding/codecs/vp8/screenshare_layers.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "rtc_base/checks.h"
#include "rtc_base/fake_clock.h"
diff --git a/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
index 15ecce5..f798c5b 100644
--- a/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
+++ b/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/codecs/vp8/include/temporal_layers_checker.h"
+
#include "absl/memory/memory.h"
#include "modules/video_coding/codecs/interface/common_constants.h"
#include "modules/video_coding/codecs/vp8/default_temporal_layers.h"
diff --git a/modules/video_coding/codecs/vp9/svc_config.h b/modules/video_coding/codecs/vp9/svc_config.h
index d24d295..6e9ae9b 100644
--- a/modules/video_coding/codecs/vp9/svc_config.h
+++ b/modules/video_coding/codecs/vp9/svc_config.h
@@ -11,6 +11,7 @@
#define MODULES_VIDEO_CODING_CODECS_VP9_SVC_CONFIG_H_
#include <stddef.h>
+
#include <vector>
#include "common_types.h" // NOLINT(build/include)
diff --git a/modules/video_coding/codecs/vp9/svc_config_unittest.cc b/modules/video_coding/codecs/vp9/svc_config_unittest.cc
index 489f1b0..bda6a55 100644
--- a/modules/video_coding/codecs/vp9/svc_config_unittest.cc
+++ b/modules/video_coding/codecs/vp9/svc_config_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/vp9/svc_config.h"
+
#include <cstddef>
#include <vector>
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
-#include "modules/video_coding/codecs/vp9/svc_config.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/video_coding/codecs/vp9/svc_rate_allocator.h b/modules/video_coding/codecs/vp9/svc_rate_allocator.h
index fc4c67f..79bb56b 100644
--- a/modules/video_coding/codecs/vp9/svc_rate_allocator.h
+++ b/modules/video_coding/codecs/vp9/svc_rate_allocator.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/video/video_bitrate_allocation.h"
diff --git a/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc b/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
index fba7f9f..71392a9 100644
--- a/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
+++ b/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
+
#include <algorithm>
#include "modules/video_coding/codecs/vp9/svc_config.h"
-#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
#include "rtc_base/checks.h"
#include "test/gtest.h"
diff --git a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
index 4ed25ab..fe9a974 100644
--- a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
+++ b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
@@ -13,13 +13,12 @@
#include "modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_decoder.h"
-#include "vpx/vpx_frame_buffer.h"
-
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/ref_counted_object.h"
+#include "vpx/vpx_codec.h"
+#include "vpx/vpx_decoder.h"
+#include "vpx/vpx_frame_buffer.h"
namespace webrtc {
diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc
index e8e40ee..852341c 100644
--- a/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -17,11 +17,6 @@
#include <limits>
#include <vector>
-#include "vpx/vp8cx.h"
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_decoder.h"
-#include "vpx/vpx_encoder.h"
-
#include "absl/memory/memory.h"
#include "api/video/color_space.h"
#include "api/video/i010_buffer.h"
@@ -36,6 +31,10 @@
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/field_trial.h"
+#include "vpx/vp8cx.h"
+#include "vpx/vp8dx.h"
+#include "vpx/vpx_decoder.h"
+#include "vpx/vpx_encoder.h"
namespace webrtc {
diff --git a/modules/video_coding/codecs/vp9/vp9_impl.h b/modules/video_coding/codecs/vp9/vp9_impl.h
index 0918582..e128d18 100644
--- a/modules/video_coding/codecs/vp9/vp9_impl.h
+++ b/modules/video_coding/codecs/vp9/vp9_impl.h
@@ -19,14 +19,12 @@
#include <string>
#include <vector>
-#include "modules/video_coding/codecs/vp9/include/vp9.h"
-
#include "api/fec_controller_override.h"
#include "api/video_codecs/video_encoder.h"
#include "media/base/vp9_profile.h"
+#include "modules/video_coding/codecs/vp9/include/vp9.h"
#include "modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h"
#include "modules/video_coding/utility/framerate_controller.h"
-
#include "vpx/vp8cx.h"
#include "vpx/vpx_decoder.h"
#include "vpx/vpx_encoder.h"
diff --git a/modules/video_coding/decoder_database.cc b/modules/video_coding/decoder_database.cc
index c113239..c203721 100644
--- a/modules/video_coding/decoder_database.cc
+++ b/modules/video_coding/decoder_database.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/decoder_database.h"
+
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/video_coding/decoding_state_unittest.cc b/modules/video_coding/decoding_state_unittest.cc
index 1ecb9b2..bef7f81 100644
--- a/modules/video_coding/decoding_state_unittest.cc
+++ b/modules/video_coding/decoding_state_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/decoding_state.h"
+
#include "modules/rtp_rtcp/source/rtp_video_header.h"
#include "modules/video_coding/codecs/interface/common_constants.h"
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
diff --git a/modules/video_coding/fec_controller_default.cc b/modules/video_coding/fec_controller_default.cc
index 70d6234..97919f5 100644
--- a/modules/video_coding/fec_controller_default.cc
+++ b/modules/video_coding/fec_controller_default.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/fec_controller_default.h" // NOLINT
+
#include <stdlib.h>
+
#include <algorithm>
#include <string>
#include "modules/include/module_fec_types.h"
-#include "modules/video_coding/fec_controller_default.h" // NOLINT
#include "rtc_base/logging.h"
#include "system_wrappers/include/field_trial.h"
diff --git a/modules/video_coding/fec_controller_default.h b/modules/video_coding/fec_controller_default.h
index 5a116c8..02c0ec0 100644
--- a/modules/video_coding/fec_controller_default.h
+++ b/modules/video_coding/fec_controller_default.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/video_coding/fec_controller_unittest.cc b/modules/video_coding/fec_controller_unittest.cc
index 5a9ec4b..fda3d30 100644
--- a/modules/video_coding/fec_controller_unittest.cc
+++ b/modules/video_coding/fec_controller_unittest.cc
@@ -8,10 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/fec_controller.h"
+
#include <stdint.h>
+
#include <vector>
-#include "api/fec_controller.h"
#include "modules/include/module_fec_types.h"
#include "modules/video_coding/fec_controller_default.h"
#include "system_wrappers/include/clock.h"
diff --git a/modules/video_coding/frame_buffer.cc b/modules/video_coding/frame_buffer.cc
index 9bd6c8a..f5c5d3e 100644
--- a/modules/video_coding/frame_buffer.cc
+++ b/modules/video_coding/frame_buffer.cc
@@ -77,10 +77,9 @@
}
// Insert packet
-VCMFrameBufferEnum VCMFrameBuffer::InsertPacket(
- const VCMPacket& packet,
- int64_t timeInMs,
- const FrameData& frame_data) {
+VCMFrameBufferEnum VCMFrameBuffer::InsertPacket(const VCMPacket& packet,
+ int64_t timeInMs,
+ const FrameData& frame_data) {
TRACE_EVENT0("webrtc", "VCMFrameBuffer::InsertPacket");
assert(!(NULL == packet.dataPtr && packet.sizeBytes > 0));
if (packet.dataPtr != NULL) {
diff --git a/modules/video_coding/frame_buffer.h b/modules/video_coding/frame_buffer.h
index 3e5a7ff..d74749c 100644
--- a/modules/video_coding/frame_buffer.h
+++ b/modules/video_coding/frame_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc
index 3182579..1cc2ed5 100644
--- a/modules/video_coding/frame_buffer2_unittest.cc
+++ b/modules/video_coding/frame_buffer2_unittest.cc
@@ -135,9 +135,7 @@
: trial_("WebRTC-AddRttToPlayoutDelay/Enabled/"),
clock_(0),
timing_(&clock_),
- buffer_(new FrameBuffer(&clock_,
- &timing_,
- &stats_callback_)),
+ buffer_(new FrameBuffer(&clock_, &timing_, &stats_callback_)),
rand_(0x34678213),
tear_down_(false),
extract_thread_(&ExtractLoop, this, "Extract Thread") {}
diff --git a/modules/video_coding/frame_object.cc b/modules/video_coding/frame_object.cc
index 5a485da..9156c3e 100644
--- a/modules/video_coding/frame_object.cc
+++ b/modules/video_coding/frame_object.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/frame_object.h"
#include <string.h>
+
#include <utility>
#include "api/video/encoded_image.h"
diff --git a/modules/video_coding/generic_decoder.cc b/modules/video_coding/generic_decoder.cc
index 0f928d2..75c5ac1 100644
--- a/modules/video_coding/generic_decoder.cc
+++ b/modules/video_coding/generic_decoder.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/generic_decoder.h"
#include <stddef.h>
+
#include <algorithm>
#include "api/video/video_timing.h"
@@ -119,7 +120,6 @@
1;
}
-
timing_frame_info.capture_time_ms = capture_time_ms - sender_delta_ms;
timing_frame_info.encode_start_ms =
frameInfo->timing.encode_start_ms - sender_delta_ms;
diff --git a/modules/video_coding/h264_sprop_parameter_sets.cc b/modules/video_coding/h264_sprop_parameter_sets.cc
index 9ee0e66..a64f888 100644
--- a/modules/video_coding/h264_sprop_parameter_sets.cc
+++ b/modules/video_coding/h264_sprop_parameter_sets.cc
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/modules/video_coding/h264_sps_pps_tracker_unittest.cc b/modules/video_coding/h264_sps_pps_tracker_unittest.cc
index bb442eb..86c9c2d 100644
--- a/modules/video_coding/h264_sps_pps_tracker_unittest.cc
+++ b/modules/video_coding/h264_sps_pps_tracker_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/h264_sps_pps_tracker.h"
#include <string.h>
+
#include <vector>
#include "absl/types/variant.h"
diff --git a/modules/video_coding/histogram_unittest.cc b/modules/video_coding/histogram_unittest.cc
index 773bcc1..3690a39 100644
--- a/modules/video_coding/histogram_unittest.cc
+++ b/modules/video_coding/histogram_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/histogram.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/video_coding/jitter_buffer_common.h b/modules/video_coding/jitter_buffer_common.h
index 1a7f08a..6ccfe39 100644
--- a/modules/video_coding/jitter_buffer_common.h
+++ b/modules/video_coding/jitter_buffer_common.h
@@ -42,9 +42,9 @@
kTimeStampError = -2,
kSizeError = -1,
kNoError = 0,
- kIncomplete = 1, // Frame incomplete.
- kCompleteSession = 3, // at least one layer in the frame complete.
- kDuplicatePacket = 5 // We're receiving a duplicate packet.
+ kIncomplete = 1, // Frame incomplete.
+ kCompleteSession = 3, // at least one layer in the frame complete.
+ kDuplicatePacket = 5 // We're receiving a duplicate packet.
};
enum VCMFrameBufferStateEnum {
diff --git a/modules/video_coding/jitter_buffer_unittest.cc b/modules/video_coding/jitter_buffer_unittest.cc
index 315e5f9..acfee8c 100644
--- a/modules/video_coding/jitter_buffer_unittest.cc
+++ b/modules/video_coding/jitter_buffer_unittest.cc
@@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <string>
+#include "modules/video_coding/jitter_buffer.h"
#include <list>
#include <memory>
+#include <string>
#include <vector>
#include "absl/memory/memory.h"
#include "common_video/h264/h264_common.h"
#include "modules/video_coding/frame_buffer.h"
-#include "modules/video_coding/jitter_buffer.h"
#include "modules/video_coding/media_opt_util.h"
#include "modules/video_coding/packet.h"
#include "modules/video_coding/test/stream_generator.h"
@@ -224,9 +224,7 @@
class TestJitterBufferNack : public TestRunningJitterBuffer {
protected:
TestJitterBufferNack() {}
- virtual void SetUp() {
- TestRunningJitterBuffer::SetUp();
- }
+ virtual void SetUp() { TestRunningJitterBuffer::SetUp(); }
virtual void TearDown() { TestRunningJitterBuffer::TearDown(); }
};
diff --git a/modules/video_coding/jitter_estimator.cc b/modules/video_coding/jitter_estimator.cc
index 7f54aad..cd50583 100644
--- a/modules/video_coding/jitter_estimator.cc
+++ b/modules/video_coding/jitter_estimator.cc
@@ -13,6 +13,7 @@
#include <assert.h>
#include <math.h>
#include <string.h>
+
#include <algorithm>
#include <cstdint>
diff --git a/modules/video_coding/jitter_estimator_tests.cc b/modules/video_coding/jitter_estimator_tests.cc
index edf7f10..de9d5d4 100644
--- a/modules/video_coding/jitter_estimator_tests.cc
+++ b/modules/video_coding/jitter_estimator_tests.cc
@@ -8,6 +8,7 @@
*/
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/modules/video_coding/media_opt_util.cc b/modules/video_coding/media_opt_util.cc
index a46417b..7b870f2 100644
--- a/modules/video_coding/media_opt_util.cc
+++ b/modules/video_coding/media_opt_util.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <math.h>
+
#include <algorithm>
#include "modules/video_coding/fec_rate_table.h"
diff --git a/modules/video_coding/nack_module.cc b/modules/video_coding/nack_module.cc
index 9ae74c7..45f0563 100644
--- a/modules/video_coding/nack_module.cc
+++ b/modules/video_coding/nack_module.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/nack_module.h"
+
#include <algorithm>
#include <limits>
-#include "modules/video_coding/nack_module.h"
-
#include "modules/utility/include/process_thread.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/modules/video_coding/nack_module.h b/modules/video_coding/nack_module.h
index 16891d7..fba55b1 100644
--- a/modules/video_coding/nack_module.h
+++ b/modules/video_coding/nack_module.h
@@ -12,6 +12,7 @@
#define MODULES_VIDEO_CODING_NACK_MODULE_H_
#include <stdint.h>
+
#include <map>
#include <set>
#include <vector>
diff --git a/modules/video_coding/nack_module_unittest.cc b/modules/video_coding/nack_module_unittest.cc
index 8aad232..2028092 100644
--- a/modules/video_coding/nack_module_unittest.cc
+++ b/modules/video_coding/nack_module_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/nack_module.h"
+
#include <cstdint>
#include <cstring>
#include <memory>
-#include "modules/video_coding/nack_module.h"
#include "system_wrappers/include/clock.h"
#include "test/field_trial.h"
#include "test/gtest.h"
diff --git a/modules/video_coding/packet_buffer.cc b/modules/video_coding/packet_buffer.cc
index e6469b1..0d7a828 100644
--- a/modules/video_coding/packet_buffer.cc
+++ b/modules/video_coding/packet_buffer.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/packet_buffer.h"
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <utility>
@@ -399,9 +400,9 @@
// in the packet sequence numbers up until this point.
const uint8_t h264tid =
data_buffer_[start_index].video_header.frame_marking.temporal_id;
- if (h264tid == kNoTemporalIdx && !is_h264_keyframe
- && missing_packets_.upper_bound(start_seq_num)
- != missing_packets_.begin()) {
+ if (h264tid == kNoTemporalIdx && !is_h264_keyframe &&
+ missing_packets_.upper_bound(start_seq_num) !=
+ missing_packets_.begin()) {
uint16_t stop_index = (index + 1) % size_;
while (start_index != stop_index) {
sequence_buffer_[start_index].frame_created = false;
diff --git a/modules/video_coding/receiver.cc b/modules/video_coding/receiver.cc
index 42ea532..4c753a5 100644
--- a/modules/video_coding/receiver.cc
+++ b/modules/video_coding/receiver.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/receiver.h"
#include <assert.h>
+
#include <cstdint>
#include <cstdlib>
#include <utility>
diff --git a/modules/video_coding/receiver_unittest.cc b/modules/video_coding/receiver_unittest.cc
index ade26ca..bf77ba4 100644
--- a/modules/video_coding/receiver_unittest.cc
+++ b/modules/video_coding/receiver_unittest.cc
@@ -7,7 +7,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/receiver.h"
+
#include <string.h>
+
#include <cstdint>
#include <memory>
#include <queue>
@@ -16,7 +19,6 @@
#include "modules/video_coding/encoded_frame.h"
#include "modules/video_coding/jitter_buffer_common.h"
#include "modules/video_coding/packet.h"
-#include "modules/video_coding/receiver.h"
#include "modules/video_coding/test/stream_generator.h"
#include "modules/video_coding/timing.h"
#include "rtc_base/checks.h"
diff --git a/modules/video_coding/rtp_frame_reference_finder.cc b/modules/video_coding/rtp_frame_reference_finder.cc
index af474d5..62f8d7d 100644
--- a/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/modules/video_coding/rtp_frame_reference_finder.cc
@@ -732,8 +732,8 @@
return kHandOff;
}
- auto layer_info_it = layer_info_.find(
- tid == 0 ? unwrapped_tl0 - 1 : unwrapped_tl0);
+ auto layer_info_it =
+ layer_info_.find(tid == 0 ? unwrapped_tl0 - 1 : unwrapped_tl0);
// Stash if we have no base layer frame yet.
if (layer_info_it == layer_info_.end())
@@ -741,8 +741,9 @@
// Base layer frame. Copy layer info from previous base layer frame.
if (tid == 0) {
- layer_info_it = layer_info_.insert(
- std::make_pair(unwrapped_tl0, layer_info_it->second)).first;
+ layer_info_it =
+ layer_info_.insert(std::make_pair(unwrapped_tl0, layer_info_it->second))
+ .first;
frame->num_references = 1;
frame->references[0] = layer_info_it->second[0];
UpdateDataH264(frame, unwrapped_tl0, tid);
@@ -852,8 +853,8 @@
// Remove any current packets from |not_yet_received_seq_num_|.
uint16_t last_seq_num_padded = seq_num_it->second.second;
- for (uint16_t n = frame->first_seq_num();
- AheadOrAt(last_seq_num_padded, n); ++n) {
+ for (uint16_t n = frame->first_seq_num(); AheadOrAt(last_seq_num_padded, n);
+ ++n) {
not_yet_received_seq_num_.erase(n);
}
}
diff --git a/modules/video_coding/rtp_frame_reference_finder.h b/modules/video_coding/rtp_frame_reference_finder.h
index 4021ab0..e6f7aa8 100644
--- a/modules/video_coding/rtp_frame_reference_finder.h
+++ b/modules/video_coding/rtp_frame_reference_finder.h
@@ -141,8 +141,7 @@
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Update "last-picture-id-with-padding" sequence number for H264.
- void UpdateLastPictureIdWithPaddingH264()
- RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ void UpdateLastPictureIdWithPaddingH264() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Update H264 layer info state used to determine frame references.
void UpdateLayerInfoH264(RtpFrameObject* frame,
@@ -153,8 +152,7 @@
// Update H264 state for decodeable frames.
void UpdateDataH264(RtpFrameObject* frame,
int64_t unwrapped_tl0,
- uint8_t temporal_idx)
- RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ uint8_t temporal_idx) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
// For every group of pictures, hold two sequence numbers. The first being
// the sequence number of the last packet of the last completed frame, and
@@ -181,8 +179,8 @@
// Sequence numbers of frames earlier than the last received frame that
// have not yet been fully received.
- std::set<uint16_t, DescendingSeqNumComp<uint16_t>>
- not_yet_received_seq_num_ RTC_GUARDED_BY(crit_);
+ std::set<uint16_t, DescendingSeqNumComp<uint16_t>> not_yet_received_seq_num_
+ RTC_GUARDED_BY(crit_);
// Frames that have been fully received but didn't have all the information
// needed to determine their references.
diff --git a/modules/video_coding/session_info.cc b/modules/video_coding/session_info.cc
index 3d4af62..9cc1d4a 100644
--- a/modules/video_coding/session_info.cc
+++ b/modules/video_coding/session_info.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <string.h>
+
#include <vector>
#include "absl/types/variant.h"
diff --git a/modules/video_coding/session_info.h b/modules/video_coding/session_info.h
index 02c4236..06a348e 100644
--- a/modules/video_coding/session_info.h
+++ b/modules/video_coding/session_info.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <vector>
diff --git a/modules/video_coding/session_info_unittest.cc b/modules/video_coding/session_info_unittest.cc
index eea1722..07b43df 100644
--- a/modules/video_coding/session_info_unittest.cc
+++ b/modules/video_coding/session_info_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/session_info.h"
+
#include <string.h>
#include "modules/include/module_common_types.h"
#include "modules/video_coding/packet.h"
-#include "modules/video_coding/session_info.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/video_coding/test/stream_generator.cc b/modules/video_coding/test/stream_generator.cc
index 11b426d..7b3a4b9 100644
--- a/modules/video_coding/test/stream_generator.cc
+++ b/modules/video_coding/test/stream_generator.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/test/stream_generator.h"
#include <string.h>
+
#include <list>
#include "modules/include/module_common_types.h"
diff --git a/modules/video_coding/test/stream_generator.h b/modules/video_coding/test/stream_generator.h
index e030dc4..ef3dcc1 100644
--- a/modules/video_coding/test/stream_generator.h
+++ b/modules/video_coding/test/stream_generator.h
@@ -11,6 +11,7 @@
#define MODULES_VIDEO_CODING_TEST_STREAM_GENERATOR_H_
#include <stdint.h>
+
#include <list>
#include "modules/video_coding/packet.h"
diff --git a/modules/video_coding/timestamp_map.cc b/modules/video_coding/timestamp_map.cc
index 4ddb173..d932937 100644
--- a/modules/video_coding/timestamp_map.cc
+++ b/modules/video_coding/timestamp_map.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/timestamp_map.h"
+
#include <stdlib.h>
#include "modules/include/module_common_types_public.h"
-#include "modules/video_coding/timestamp_map.h"
namespace webrtc {
diff --git a/modules/video_coding/timing.cc b/modules/video_coding/timing.cc
index 8da2b85..c62c848 100644
--- a/modules/video_coding/timing.cc
+++ b/modules/video_coding/timing.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/timing.h"
#include <assert.h>
+
#include <algorithm>
#include "rtc_base/time/timestamp_extrapolator.h"
diff --git a/modules/video_coding/timing_unittest.cc b/modules/video_coding/timing_unittest.cc
index 40e8c97..ee86605 100644
--- a/modules/video_coding/timing_unittest.cc
+++ b/modules/video_coding/timing_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/timing.h"
+
#include "system_wrappers/include/clock.h"
#include "test/gtest.h"
diff --git a/modules/video_coding/utility/decoded_frames_history.h b/modules/video_coding/utility/decoded_frames_history.h
index 07c21e6..7cbe1f5 100644
--- a/modules/video_coding/utility/decoded_frames_history.h
+++ b/modules/video_coding/utility/decoded_frames_history.h
@@ -12,6 +12,7 @@
#define MODULES_VIDEO_CODING_UTILITY_DECODED_FRAMES_HISTORY_H_
#include <stdint.h>
+
#include <bitset>
#include <vector>
diff --git a/modules/video_coding/utility/decoded_frames_history_unittest.cc b/modules/video_coding/utility/decoded_frames_history_unittest.cc
index b3bcf48..ccf393d 100644
--- a/modules/video_coding/utility/decoded_frames_history_unittest.cc
+++ b/modules/video_coding/utility/decoded_frames_history_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_coding/utility/decoded_frames_history.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/video_coding/utility/default_video_bitrate_allocator.cc b/modules/video_coding/utility/default_video_bitrate_allocator.cc
index 3cf8d55..6d3ca53 100644
--- a/modules/video_coding/utility/default_video_bitrate_allocator.cc
+++ b/modules/video_coding/utility/default_video_bitrate_allocator.cc
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <algorithm>
namespace webrtc {
diff --git a/modules/video_coding/utility/default_video_bitrate_allocator_unittest.cc b/modules/video_coding/utility/default_video_bitrate_allocator_unittest.cc
index 78fcdaa..4a4ad73 100644
--- a/modules/video_coding/utility/default_video_bitrate_allocator_unittest.cc
+++ b/modules/video_coding/utility/default_video_bitrate_allocator_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_coding/utility/default_video_bitrate_allocator.h"
+
#include <limits>
#include <memory>
-#include "modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/modules/video_coding/utility/framerate_controller.cc b/modules/video_coding/utility/framerate_controller.cc
index c42ba31..7abc67e 100644
--- a/modules/video_coding/utility/framerate_controller.cc
+++ b/modules/video_coding/utility/framerate_controller.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/utility/framerate_controller.h"
#include <stddef.h>
+
#include <cstdint>
namespace webrtc {
diff --git a/modules/video_coding/utility/ivf_file_writer.h b/modules/video_coding/utility/ivf_file_writer.h
index 77acbc8..7d0d6aa 100644
--- a/modules/video_coding/utility/ivf_file_writer.h
+++ b/modules/video_coding/utility/ivf_file_writer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "api/video/encoded_image.h"
diff --git a/modules/video_coding/utility/ivf_file_writer_unittest.cc b/modules/video_coding/utility/ivf_file_writer_unittest.cc
index 30c5901..49e0459 100644
--- a/modules/video_coding/utility/ivf_file_writer_unittest.cc
+++ b/modules/video_coding/utility/ivf_file_writer_unittest.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/utility/ivf_file_writer.h"
#include <string.h>
+
#include <memory>
#include <string>
diff --git a/modules/video_coding/utility/quality_scaler.h b/modules/video_coding/utility/quality_scaler.h
index 367db0e..32e522b 100644
--- a/modules/video_coding/utility/quality_scaler.h
+++ b/modules/video_coding/utility/quality_scaler.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/modules/video_coding/utility/simulcast_rate_allocator.cc b/modules/video_coding/utility/simulcast_rate_allocator.cc
index dc61798..8cc5813 100644
--- a/modules/video_coding/utility/simulcast_rate_allocator.cc
+++ b/modules/video_coding/utility/simulcast_rate_allocator.cc
@@ -11,6 +11,7 @@
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
#include <stdio.h>
+
#include <algorithm>
#include <cstdint>
#include <numeric>
diff --git a/modules/video_coding/utility/simulcast_rate_allocator.h b/modules/video_coding/utility/simulcast_rate_allocator.h
index c5242a5..1d865a9 100644
--- a/modules/video_coding/utility/simulcast_rate_allocator.h
+++ b/modules/video_coding/utility/simulcast_rate_allocator.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "api/video/video_bitrate_allocation.h"
diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.cc b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
index 79bbdf2..404e6f6 100644
--- a/modules/video_coding/utility/simulcast_test_fixture_impl.cc
+++ b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
@@ -270,7 +270,8 @@
encoder_ = encoder_factory->CreateVideoEncoder(video_format);
decoder_ = decoder_factory->CreateVideoDecoder(video_format);
SetUpCodec((codec_type_ == kVideoCodecVP8 || codec_type_ == kVideoCodecH264)
- ? kDefaultTemporalLayerProfile : kNoTemporalLayerProfile);
+ ? kDefaultTemporalLayerProfile
+ : kNoTemporalLayerProfile);
}
SimulcastTestFixtureImpl::~SimulcastTestFixtureImpl() {
diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.h b/modules/video_coding/utility/simulcast_test_fixture_impl.h
index b710e2c..3b55898 100644
--- a/modules/video_coding/utility/simulcast_test_fixture_impl.h
+++ b/modules/video_coding/utility/simulcast_test_fixture_impl.h
@@ -28,10 +28,9 @@
class SimulcastTestFixtureImpl final : public SimulcastTestFixture {
public:
- SimulcastTestFixtureImpl(
- std::unique_ptr<VideoEncoderFactory> encoder_factory,
- std::unique_ptr<VideoDecoderFactory> decoder_factory,
- SdpVideoFormat video_format);
+ SimulcastTestFixtureImpl(std::unique_ptr<VideoEncoderFactory> encoder_factory,
+ std::unique_ptr<VideoDecoderFactory> decoder_factory,
+ SdpVideoFormat video_format);
~SimulcastTestFixtureImpl() final;
// Implements SimulcastTestFixture.
diff --git a/modules/video_coding/utility/simulcast_utility.cc b/modules/video_coding/utility/simulcast_utility.cc
index 3c74a65..ee2ea51 100644
--- a/modules/video_coding/utility/simulcast_utility.cc
+++ b/modules/video_coding/utility/simulcast_utility.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <algorithm>
+#include "modules/video_coding/utility/simulcast_utility.h"
+#include <algorithm>
#include <cmath>
-#include "modules/video_coding/utility/simulcast_utility.h"
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/modules/video_coding/video_codec_initializer.cc b/modules/video_coding/video_codec_initializer.cc
index 486d1cd..b05f0a7 100644
--- a/modules/video_coding/video_codec_initializer.cc
+++ b/modules/video_coding/video_codec_initializer.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <algorithm>
#include "absl/types/optional.h"
diff --git a/modules/video_coding/video_codec_initializer_unittest.cc b/modules/video_coding/video_codec_initializer_unittest.cc
index 36db33a..25ef3e7 100644
--- a/modules/video_coding/video_codec_initializer_unittest.cc
+++ b/modules/video_coding/video_codec_initializer_unittest.cc
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/modules/video_coding/video_coding_impl.h b/modules/video_coding/video_coding_impl.h
index 2784a84..fb71e11 100644
--- a/modules/video_coding/video_coding_impl.h
+++ b/modules/video_coding/video_coding_impl.h
@@ -11,8 +11,6 @@
#ifndef MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
#define MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
-#include "modules/video_coding/include/video_coding.h"
-
#include <memory>
#include <string>
#include <vector>
@@ -21,6 +19,7 @@
#include "modules/video_coding/decoder_database.h"
#include "modules/video_coding/frame_buffer.h"
#include "modules/video_coding/generic_decoder.h"
+#include "modules/video_coding/include/video_coding.h"
#include "modules/video_coding/jitter_buffer.h"
#include "modules/video_coding/receiver.h"
#include "modules/video_coding/timing.h"
diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc
index 2ef06ff..444a5b9 100644
--- a/modules/video_coding/video_receiver.cc
+++ b/modules/video_coding/video_receiver.cc
@@ -9,6 +9,7 @@
*/
#include <stddef.h>
+
#include <cstdint>
#include <vector>
diff --git a/modules/video_processing/test/denoiser_test.cc b/modules/video_processing/test/denoiser_test.cc
index 550e96f..4707eb5 100644
--- a/modules/video_processing/test/denoiser_test.cc
+++ b/modules/video_processing/test/denoiser_test.cc
@@ -11,6 +11,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <memory>
#include <string>
diff --git a/modules/video_processing/util/denoiser_filter.cc b/modules/video_processing/util/denoiser_filter.cc
index 916afcd..d6b5094 100644
--- a/modules/video_processing/util/denoiser_filter.cc
+++ b/modules/video_processing/util/denoiser_filter.cc
@@ -9,6 +9,7 @@
*/
#include "modules/video_processing/util/denoiser_filter.h"
+
#include "modules/video_processing/util/denoiser_filter_c.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/arch.h"
diff --git a/modules/video_processing/util/denoiser_filter.h b/modules/video_processing/util/denoiser_filter.h
index 3ee05e9..0db5047 100644
--- a/modules/video_processing/util/denoiser_filter.h
+++ b/modules/video_processing/util/denoiser_filter.h
@@ -12,6 +12,7 @@
#define MODULES_VIDEO_PROCESSING_UTIL_DENOISER_FILTER_H_
#include <stdint.h>
+
#include <memory>
namespace webrtc {
diff --git a/modules/video_processing/util/denoiser_filter_c.cc b/modules/video_processing/util/denoiser_filter_c.cc
index 3968e92..b1831a6 100644
--- a/modules/video_processing/util/denoiser_filter_c.cc
+++ b/modules/video_processing/util/denoiser_filter_c.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "modules/video_processing/util/denoiser_filter_c.h"
+
#include <stdlib.h>
#include <string.h>
-#include "modules/video_processing/util/denoiser_filter_c.h"
-
namespace webrtc {
void DenoiserFilterC::CopyMem16x16(const uint8_t* src,
diff --git a/modules/video_processing/util/denoiser_filter_neon.cc b/modules/video_processing/util/denoiser_filter_neon.cc
index de41fb6..4eabe02 100644
--- a/modules/video_processing/util/denoiser_filter_neon.cc
+++ b/modules/video_processing/util/denoiser_filter_neon.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <arm_neon.h>
-
#include "modules/video_processing/util/denoiser_filter_neon.h"
+#include <arm_neon.h>
+
namespace webrtc {
const int kSumDiffThresholdHighNeon = 600;
diff --git a/p2p/base/async_stun_tcp_socket_unittest.cc b/p2p/base/async_stun_tcp_socket_unittest.cc
index 5634534..4f693a5 100644
--- a/p2p/base/async_stun_tcp_socket_unittest.cc
+++ b/p2p/base/async_stun_tcp_socket_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/async_stun_tcp_socket.h"
+
#include <stdint.h>
#include <string.h>
+
#include <list>
#include <memory>
#include <string>
-#include "p2p/base/async_stun_tcp_socket.h"
#include "rtc_base/async_socket.h"
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
diff --git a/p2p/base/basic_packet_socket_factory.cc b/p2p/base/basic_packet_socket_factory.cc
index 2390e8a..1e3f585 100644
--- a/p2p/base/basic_packet_socket_factory.cc
+++ b/p2p/base/basic_packet_socket_factory.cc
@@ -11,6 +11,7 @@
#include "p2p/base/basic_packet_socket_factory.h"
#include <stddef.h>
+
#include <string>
#include "p2p/base/async_stun_tcp_socket.h"
diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc
index 8a8fca2..c12e7a8 100644
--- a/p2p/base/dtls_transport.cc
+++ b/p2p/base/dtls_transport.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/dtls_transport.h"
+
#include <algorithm>
#include <memory>
#include <utility>
-#include "p2p/base/dtls_transport.h"
-
#include "absl/memory/memory.h"
#include "logging/rtc_event_log/events/rtc_event_dtls_transport_state.h"
#include "logging/rtc_event_log/events/rtc_event_dtls_writable_state.h"
diff --git a/p2p/base/dtls_transport_unittest.cc b/p2p/base/dtls_transport_unittest.cc
index 3c1cd2f..1da486c 100644
--- a/p2p/base/dtls_transport_unittest.cc
+++ b/p2p/base/dtls_transport_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/dtls_transport.h"
+
#include <algorithm>
#include <memory>
#include <set>
#include <utility>
#include "absl/memory/memory.h"
-#include "p2p/base/dtls_transport.h"
#include "p2p/base/fake_ice_transport.h"
#include "p2p/base/packet_transport_internal.h"
#include "rtc_base/checks.h"
diff --git a/p2p/base/ice_credentials_iterator_unittest.cc b/p2p/base/ice_credentials_iterator_unittest.cc
index 92b65f3..470efe3 100644
--- a/p2p/base/ice_credentials_iterator_unittest.cc
+++ b/p2p/base/ice_credentials_iterator_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/ice_credentials_iterator.h"
+
#include <vector>
-#include "p2p/base/ice_credentials_iterator.h"
#include "test/gtest.h"
-using cricket::IceParameters;
using cricket::IceCredentialsIterator;
+using cricket::IceParameters;
TEST(IceCredentialsIteratorTest, GetEmpty) {
std::vector<IceParameters> empty;
diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h
index e3d98db..65cfd36 100644
--- a/p2p/base/ice_transport_internal.h
+++ b/p2p/base/ice_transport_internal.h
@@ -12,6 +12,7 @@
#define P2P_BASE_ICE_TRANSPORT_INTERNAL_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/p2p/base/mdns_message.cc b/p2p/base/mdns_message.cc
index e4fe7cc..1aa996c 100644
--- a/p2p/base/mdns_message.cc
+++ b/p2p/base/mdns_message.cc
@@ -9,6 +9,7 @@
*/
#include "p2p/base/mdns_message.h"
+
#include "rtc_base/logging.h"
#include "rtc_base/net_helpers.h"
#include "rtc_base/string_encode.h"
diff --git a/p2p/base/mdns_message.h b/p2p/base/mdns_message.h
index 303c6bb..79be521 100644
--- a/p2p/base/mdns_message.h
+++ b/p2p/base/mdns_message.h
@@ -22,6 +22,7 @@
// after changes made to this file.
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/p2p/base/mdns_message_unittest.cc b/p2p/base/mdns_message_unittest.cc
index a742ccb..2f1f74d 100644
--- a/p2p/base/mdns_message_unittest.cc
+++ b/p2p/base/mdns_message_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/mdns_message.h"
+
#include <map>
#include <set>
#include <string>
-#include "p2p/base/mdns_message.h"
#include "rtc_base/byte_buffer.h"
#include "rtc_base/gunit.h"
#include "rtc_base/ip_address.h"
diff --git a/p2p/base/no_op_dtls_transport.cc b/p2p/base/no_op_dtls_transport.cc
index dda668b..7ba27c4 100644
--- a/p2p/base/no_op_dtls_transport.cc
+++ b/p2p/base/no_op_dtls_transport.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/no_op_dtls_transport.h"
+
#include <algorithm>
#include <memory>
#include <utility>
-#include "p2p/base/no_op_dtls_transport.h"
-
#include "absl/memory/memory.h"
#include "logging/rtc_event_log/events/rtc_event_dtls_transport_state.h"
#include "logging/rtc_event_log/events/rtc_event_dtls_writable_state.h"
diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc
index d510820..86772e0 100644
--- a/p2p/base/p2p_transport_channel.cc
+++ b/p2p/base/p2p_transport_channel.cc
@@ -45,8 +45,9 @@
return conn->local_candidate().relay_protocol() == cricket::UDP_PROTOCOL_NAME;
}
-cricket::PortInterface::CandidateOrigin GetOrigin(cricket::PortInterface* port,
- cricket::PortInterface* origin_port) {
+cricket::PortInterface::CandidateOrigin GetOrigin(
+ cricket::PortInterface* port,
+ cricket::PortInterface* origin_port) {
if (!origin_port)
return cricket::PortInterface::ORIGIN_MESSAGE;
else if (port == origin_port)
@@ -98,8 +99,8 @@
namespace cricket {
-using webrtc::RTCErrorType;
using webrtc::RTCError;
+using webrtc::RTCErrorType;
bool IceCredentialsChanged(const std::string& old_ufrag,
const std::string& old_pwd,
@@ -207,10 +208,10 @@
connection->set_unwritable_timeout(config_.ice_unwritable_timeout);
connection->set_unwritable_min_checks(config_.ice_unwritable_min_checks);
connection->set_inactive_timeout(config_.ice_inactive_timeout);
- connection->SignalReadPacket.connect(
- this, &P2PTransportChannel::OnReadPacket);
- connection->SignalReadyToSend.connect(
- this, &P2PTransportChannel::OnReadyToSend);
+ connection->SignalReadPacket.connect(this,
+ &P2PTransportChannel::OnReadPacket);
+ connection->SignalReadyToSend.connect(this,
+ &P2PTransportChannel::OnReadyToSend);
connection->SignalStateChange.connect(
this, &P2PTransportChannel::OnConnectionStateChange);
connection->SignalDestroyed.connect(
@@ -371,8 +372,8 @@
absl::optional<int> P2PTransportChannel::GetRttEstimate() {
RTC_DCHECK_RUN_ON(network_thread_);
- if (selected_connection_ != nullptr
- && selected_connection_->rtt_samples() > 0) {
+ if (selected_connection_ != nullptr &&
+ selected_connection_->rtt_samples() > 0) {
return selected_connection_->rtt();
} else {
return absl::nullopt;
@@ -769,8 +770,8 @@
if (ice_parameters_.ufrag.empty() || ice_parameters_.pwd.empty()) {
RTC_LOG(LS_ERROR)
<< "Cannot gather candidates because ICE parameters are empty"
- " ufrag: " << ice_parameters_.ufrag
- << " pwd: " << ice_parameters_.pwd;
+ " ufrag: "
+ << ice_parameters_.ufrag << " pwd: " << ice_parameters_.pwd;
return;
}
// Start gathering if we never started before, or if an ICE restart occurred.
@@ -825,13 +826,12 @@
}
// A new port is available, attempt to make connections for it
-void P2PTransportChannel::OnPortReady(PortAllocatorSession *session,
+void P2PTransportChannel::OnPortReady(PortAllocatorSession* session,
PortInterface* port) {
RTC_DCHECK_RUN_ON(network_thread_);
// Set in-effect options on the new port
- for (OptionMap::const_iterator it = options_.begin();
- it != options_.end();
+ for (OptionMap::const_iterator it = options_.begin(); it != options_.end();
++it) {
int val = port->SetOption(it->first, it->second);
if (val < 0) {
@@ -849,12 +849,11 @@
port->SetIceRole(ice_role_);
port->SetIceTiebreaker(tiebreaker_);
ports_.push_back(port);
- port->SignalUnknownAddress.connect(
- this, &P2PTransportChannel::OnUnknownAddress);
+ port->SignalUnknownAddress.connect(this,
+ &P2PTransportChannel::OnUnknownAddress);
port->SignalDestroyed.connect(this, &P2PTransportChannel::OnPortDestroyed);
- port->SignalRoleConflict.connect(
- this, &P2PTransportChannel::OnRoleConflict);
+ port->SignalRoleConflict.connect(this, &P2PTransportChannel::OnRoleConflict);
port->SignalSentPacket.connect(this, &P2PTransportChannel::OnSentPacket);
// Attempt to create a connection from this new port to all of the remote
@@ -904,11 +903,12 @@
}
// Handle stun packets
-void P2PTransportChannel::OnUnknownAddress(
- PortInterface* port,
- const rtc::SocketAddress& address, ProtocolType proto,
- IceMessage* stun_msg, const std::string &remote_username,
- bool port_muxed) {
+void P2PTransportChannel::OnUnknownAddress(PortInterface* port,
+ const rtc::SocketAddress& address,
+ ProtocolType proto,
+ IceMessage* stun_msg,
+ const std::string& remote_username,
+ bool port_muxed) {
RTC_DCHECK_RUN_ON(network_thread_);
// Port has received a valid stun packet from an address that no Connection
@@ -1011,12 +1011,12 @@
if (port->GetConnection(remote_candidate.address())) {
if (port_muxed) {
RTC_LOG(LS_INFO) << "Connection already exists for peer reflexive "
- "candidate: " << remote_candidate.ToString();
+ "candidate: "
+ << remote_candidate.ToString();
return;
} else {
RTC_NOTREACHED();
- port->SendBindingErrorResponse(stun_msg, address,
- STUN_ERROR_SERVER_ERROR,
+ port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR,
STUN_ERROR_REASON_SERVER_ERROR);
return;
}
@@ -1281,7 +1281,7 @@
// to make sure that the origin port is included, even if it was pruned,
// since that may be the only port that can create this connection.
bool created = false;
- std::vector<PortInterface *>::reverse_iterator it;
+ std::vector<PortInterface*>::reverse_iterator it;
for (it = ports_.rbegin(); it != ports_.rend(); ++it) {
if (CreateConnection(*it, remote_candidate, origin_port)) {
if (*it == origin_port)
@@ -1313,9 +1313,8 @@
// found or it is found but the existing remote candidate has an older
// generation, then we can create a new connection for this address.
Connection* connection = port->GetConnection(remote_candidate.address());
- if (connection == nullptr ||
- connection->remote_candidate().generation() <
- remote_candidate.generation()) {
+ if (connection == nullptr || connection->remote_candidate().generation() <
+ remote_candidate.generation()) {
// Don't create a connection if this is a candidate we received in a
// message and we are not allowed to make outgoing connections.
PortInterface::CandidateOrigin origin = GetOrigin(port, origin_port);
@@ -1384,7 +1383,8 @@
// Maintain our remote candidate list, adding this new remote one.
void P2PTransportChannel::RememberRemoteCandidate(
- const Candidate& remote_candidate, PortInterface* origin_port) {
+ const Candidate& remote_candidate,
+ PortInterface* origin_port) {
RTC_DCHECK_RUN_ON(network_thread_);
// Remove any candidates whose generation is older than this one. The
// presence of a new generation indicates that the old ones are not useful.
@@ -1451,7 +1451,8 @@
}
// Send data to the other side, using our selected connection.
-int P2PTransportChannel::SendPacket(const char *data, size_t len,
+int P2PTransportChannel::SendPacket(const char* data,
+ size_t len,
const rtc::PacketOptions& options,
int flags) {
RTC_DCHECK_RUN_ON(network_thread_);
@@ -1511,7 +1512,7 @@
if (it == options_.end()) {
return rtc::DSCP_NO_CHANGE;
}
- return static_cast<rtc::DiffServCodePoint> (it->second);
+ return static_cast<rtc::DiffServCodePoint>(it->second);
}
// Monitor connection states.
@@ -1694,10 +1695,10 @@
// want to use the new candidates and purge the old candidates as they come
// in, so use the fact that the old ports get pruned immediately to rank the
// candidates with an active port/remote candidate higher.
- bool a_pruned = IsPortPruned(a->port()) ||
- IsRemoteCandidatePruned(a->remote_candidate());
- bool b_pruned = IsPortPruned(b->port()) ||
- IsRemoteCandidatePruned(b->remote_candidate());
+ bool a_pruned =
+ IsPortPruned(a->port()) || IsRemoteCandidatePruned(a->remote_candidate());
+ bool b_pruned =
+ IsPortPruned(b->port()) || IsRemoteCandidatePruned(b->remote_candidate());
if (!a_pruned && b_pruned) {
return a_is_better;
}
@@ -1931,12 +1932,10 @@
++nomination_;
selected_connection_->set_selected(true);
if (old_selected_connection) {
- RTC_LOG(LS_INFO) << ToString()
- << ": Previous selected connection: "
+ RTC_LOG(LS_INFO) << ToString() << ": Previous selected connection: "
<< old_selected_connection->ToString();
}
- RTC_LOG(LS_INFO) << ToString()
- << ": New selected connection: "
+ RTC_LOG(LS_INFO) << ToString() << ": New selected connection: "
<< selected_connection_->ToString();
SignalRouteChange(this, selected_connection_->remote_candidate());
// This is a temporary, but safe fix to webrtc issue 5705.
@@ -1961,8 +1960,7 @@
selected_connection_->local_candidate().address().family()) +
GetProtocolOverhead(selected_connection_->local_candidate().protocol());
} else {
- RTC_LOG(LS_INFO) << ToString()
- << ": No selected connection";
+ RTC_LOG(LS_INFO) << ToString() << ": No selected connection";
}
SignalNetworkRouteChanged(network_route_);
@@ -1998,8 +1996,7 @@
ComputeIceTransportState();
if (state_ != state) {
- RTC_LOG(LS_INFO) << ToString()
- << ": Transport channel state changed from "
+ RTC_LOG(LS_INFO) << ToString() << ": Transport channel state changed from "
<< static_cast<int>(state_) << " to "
<< static_cast<int>(state);
// Check that the requested transition is allowed. Note that
@@ -2609,8 +2606,7 @@
if (writable_ == writable) {
return;
}
- RTC_LOG(LS_VERBOSE) << ToString()
- << ": Changed writable_ to " << writable;
+ RTC_LOG(LS_VERBOSE) << ToString() << ": Changed writable_ to " << writable;
writable_ = writable;
if (writable_) {
has_been_writable_ = true;
diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc
index 8558efc..59c66c4 100644
--- a/p2p/base/p2p_transport_channel_unittest.cc
+++ b/p2p/base/p2p_transport_channel_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/p2p_transport_channel.h"
+
#include <list>
#include <memory>
#include <utility>
@@ -17,7 +19,6 @@
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/ice_transport_internal.h"
#include "p2p/base/mock_async_resolver.h"
-#include "p2p/base/p2p_transport_channel.h"
#include "p2p/base/packet_transport_internal.h"
#include "p2p/base/test_relay_server.h"
#include "p2p/base/test_stun_server.h"
diff --git a/p2p/base/packet_socket_factory.cc b/p2p/base/packet_socket_factory.cc
index 2739dbc..c11869d 100644
--- a/p2p/base/packet_socket_factory.cc
+++ b/p2p/base/packet_socket_factory.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <string>
-
#include "p2p/base/packet_socket_factory.h"
+#include <string>
+
namespace rtc {
PacketSocketTcpOptions::PacketSocketTcpOptions() = default;
diff --git a/p2p/base/port.cc b/p2p/base/port.cc
index 9574323..17e462e 100644
--- a/p2p/base/port.cc
+++ b/p2p/base/port.cc
@@ -60,8 +60,8 @@
namespace cricket {
-using webrtc::RTCErrorType;
using webrtc::RTCError;
+using webrtc::RTCErrorType;
// TODO(ronghuawu): Use "local", "srflx", "prflx" and "relay". But this requires
// the signaling part be updated correspondingly as well.
diff --git a/p2p/base/port_allocator_unittest.cc b/p2p/base/port_allocator_unittest.cc
index 9d6b4dd..5606168 100644
--- a/p2p/base/port_allocator_unittest.cc
+++ b/p2p/base/port_allocator_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/port_allocator.h"
+
#include <memory>
#include "p2p/base/fake_port_allocator.h"
-#include "p2p/base/port_allocator.h"
#include "rtc_base/thread.h"
#include "rtc_base/virtual_socket_server.h"
#include "test/gtest.h"
diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc
index fb2b4ef..4e32867 100644
--- a/p2p/base/port_unittest.cc
+++ b/p2p/base/port_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/port.h"
+
#include <string.h>
+
#include <cstdint>
#include <list>
#include <memory>
@@ -23,7 +26,6 @@
#include "p2p/base/basic_packet_socket_factory.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/packet_socket_factory.h"
-#include "p2p/base/port.h"
#include "p2p/base/port_allocator.h"
#include "p2p/base/port_interface.h"
#include "p2p/base/relay_port.h"
@@ -69,11 +71,11 @@
using rtc::AsyncPacketSocket;
using rtc::ByteBufferReader;
using rtc::ByteBufferWriter;
-using rtc::NATType;
-using rtc::NAT_OPEN_CONE;
using rtc::NAT_ADDR_RESTRICTED;
+using rtc::NAT_OPEN_CONE;
using rtc::NAT_PORT_RESTRICTED;
using rtc::NAT_SYMMETRIC;
+using rtc::NATType;
using rtc::PacketSocketFactory;
using rtc::Socket;
using rtc::SocketAddress;
diff --git a/p2p/base/pseudo_tcp.cc b/p2p/base/pseudo_tcp.cc
index 44c59c5..1c62829 100644
--- a/p2p/base/pseudo_tcp.cc
+++ b/p2p/base/pseudo_tcp.cc
@@ -12,6 +12,7 @@
#include <errno.h>
#include <stdio.h>
+
#include <algorithm>
#include <cstdint>
#include <memory>
diff --git a/p2p/base/pseudo_tcp.h b/p2p/base/pseudo_tcp.h
index 375be3b..cb6d974 100644
--- a/p2p/base/pseudo_tcp.h
+++ b/p2p/base/pseudo_tcp.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include "rtc_base/memory/fifo_buffer.h"
diff --git a/p2p/base/pseudo_tcp_unittest.cc b/p2p/base/pseudo_tcp_unittest.cc
index c0f4a89..3afe955 100644
--- a/p2p/base/pseudo_tcp_unittest.cc
+++ b/p2p/base/pseudo_tcp_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/pseudo_tcp.h"
+
#include <string.h>
+
#include <algorithm>
#include <cstddef>
#include <string>
#include <vector>
-#include "p2p/base/pseudo_tcp.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
#include "rtc_base/location.h"
diff --git a/p2p/base/regathering_controller_unittest.cc b/p2p/base/regathering_controller_unittest.cc
index c86aa1a..d583ef8 100644
--- a/p2p/base/regathering_controller_unittest.cc
+++ b/p2p/base/regathering_controller_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/regathering_controller.h"
+
#include <map>
#include <memory>
#include <string>
@@ -18,7 +20,6 @@
#include "p2p/base/mock_ice_transport.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/port.h"
-#include "p2p/base/regathering_controller.h"
#include "p2p/base/stun_server.h"
#include "rtc_base/gunit.h"
#include "rtc_base/ref_counted_object.h"
diff --git a/p2p/base/relay_port.cc b/p2p/base/relay_port.cc
index 9aecb6e..662a44b 100644
--- a/p2p/base/relay_port.cc
+++ b/p2p/base/relay_port.cc
@@ -7,12 +7,14 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/relay_port.h"
+
#include <errno.h>
#include <string.h>
+
#include <algorithm>
#include "p2p/base/connection.h"
-#include "p2p/base/relay_port.h"
#include "p2p/base/stun.h"
#include "p2p/base/stun_request.h"
#include "rtc_base/async_packet_socket.h"
diff --git a/p2p/base/relay_port_unittest.cc b/p2p/base/relay_port_unittest.cc
index ce01c15..1b2236a 100644
--- a/p2p/base/relay_port_unittest.cc
+++ b/p2p/base/relay_port_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/relay_port.h"
+
#include <map>
#include <memory>
#include "p2p/base/basic_packet_socket_factory.h"
-#include "p2p/base/relay_port.h"
#include "p2p/base/relay_server.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
diff --git a/p2p/base/relay_server_unittest.cc b/p2p/base/relay_server_unittest.cc
index 48e750f..3debc5f 100644
--- a/p2p/base/relay_server_unittest.cc
+++ b/p2p/base/relay_server_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/relay_server.h"
+
#include <string.h>
+
#include <memory>
#include <string>
#include <utility>
#include "absl/memory/memory.h"
-#include "p2p/base/relay_server.h"
#include "rtc_base/async_udp_socket.h"
#include "rtc_base/byte_buffer.h"
#include "rtc_base/helpers.h"
diff --git a/p2p/base/stun.h b/p2p/base/stun.h
index 5b9b953d..5c1342d 100644
--- a/p2p/base/stun.h
+++ b/p2p/base/stun.h
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/p2p/base/stun_port.h b/p2p/base/stun_port.h
index 3c42349..aa57d66 100644
--- a/p2p/base/stun_port.h
+++ b/p2p/base/stun_port.h
@@ -81,9 +81,7 @@
return socket_->GetLocalAddress();
}
- const ServerAddresses& server_addresses() const {
- return server_addresses_;
- }
+ const ServerAddresses& server_addresses() const { return server_addresses_; }
void set_server_addresses(const ServerAddresses& addresses) {
server_addresses_ = addresses;
}
@@ -108,9 +106,7 @@
void GetStunStats(absl::optional<StunStats>* stats) override;
void set_stun_keepalive_delay(const absl::optional<int>& delay);
- int stun_keepalive_delay() const {
- return stun_keepalive_delay_;
- }
+ int stun_keepalive_delay() const { return stun_keepalive_delay_; }
// Visible for testing.
int stun_keepalive_lifetime() const { return stun_keepalive_lifetime_; }
@@ -201,8 +197,8 @@
sigslot::signal2<const rtc::SocketAddress&, int> SignalDone;
private:
- typedef std::map<rtc::SocketAddress,
- rtc::AsyncResolverInterface*> ResolverMap;
+ typedef std::map<rtc::SocketAddress, rtc::AsyncResolverInterface*>
+ ResolverMap;
void OnResolveResult(rtc::AsyncResolverInterface* resolver);
diff --git a/p2p/base/stun_port_unittest.cc b/p2p/base/stun_port_unittest.cc
index 854156d..f0a2117 100644
--- a/p2p/base/stun_port_unittest.cc
+++ b/p2p/base/stun_port_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/stun_port.h"
+
#include <memory>
#include "p2p/base/basic_packet_socket_factory.h"
-#include "p2p/base/stun_port.h"
#include "p2p/base/test_stun_server.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
diff --git a/p2p/base/stun_request.cc b/p2p/base/stun_request.cc
index afd276f..44aa483 100644
--- a/p2p/base/stun_request.cc
+++ b/p2p/base/stun_request.cc
@@ -34,7 +34,7 @@
// The timeout doubles each retransmission, up to this many times
// RFC 5389 says SHOULD retransmit 7 times.
// This has been 8 for years (not sure why).
-const int STUN_MAX_RETRANSMISSIONS = 8; // Total sends: 9
+const int STUN_MAX_RETRANSMISSIONS = 8; // Total sends: 9
const int STUN_MAX_RETRANSMISSIONS_RFC_5389 = 6; // Total sends: 7
// We also cap the doubling, even though the standard doesn't say to.
diff --git a/p2p/base/stun_request.h b/p2p/base/stun_request.h
index 571abe1..af2e14e 100644
--- a/p2p/base/stun_request.h
+++ b/p2p/base/stun_request.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <string>
diff --git a/p2p/base/stun_request_unittest.cc b/p2p/base/stun_request_unittest.cc
index 47d2d41..1f48c19 100644
--- a/p2p/base/stun_request_unittest.cc
+++ b/p2p/base/stun_request_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/stun_request.h"
+
#include <vector>
-#include "p2p/base/stun_request.h"
#include "rtc_base/fake_clock.h"
#include "rtc_base/gunit.h"
#include "rtc_base/logging.h"
diff --git a/p2p/base/stun_server.h b/p2p/base/stun_server.h
index 01d74e2..8cfba4d 100644
--- a/p2p/base/stun_server.h
+++ b/p2p/base/stun_server.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "p2p/base/stun.h"
diff --git a/p2p/base/stun_server_unittest.cc b/p2p/base/stun_server_unittest.cc
index 7b11d6f..b1142f7 100644
--- a/p2p/base/stun_server_unittest.cc
+++ b/p2p/base/stun_server_unittest.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/stun_server.h"
+
#include <string.h>
+
#include <memory>
#include <string>
#include "absl/memory/memory.h"
-#include "p2p/base/stun_server.h"
#include "rtc_base/byte_buffer.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/logging.h"
diff --git a/p2p/base/stun_unittest.cc b/p2p/base/stun_unittest.cc
index 60a0f7e..b7d5f50 100644
--- a/p2p/base/stun_unittest.cc
+++ b/p2p/base/stun_unittest.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/stun.h"
+
#include <string.h>
+
#include <string>
#include <utility>
#include "absl/memory/memory.h"
-#include "p2p/base/stun.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/byte_buffer.h"
#include "rtc_base/byte_order.h"
diff --git a/p2p/base/tcp_port.cc b/p2p/base/tcp_port.cc
index 07ca300..2cc2c94 100644
--- a/p2p/base/tcp_port.cc
+++ b/p2p/base/tcp_port.cc
@@ -67,6 +67,7 @@
#include "p2p/base/tcp_port.h"
#include <errno.h>
+
#include <vector>
#include "absl/algorithm/container.h"
diff --git a/p2p/base/tcp_port_unittest.cc b/p2p/base/tcp_port_unittest.cc
index 4c11470..2c9fbce 100644
--- a/p2p/base/tcp_port_unittest.cc
+++ b/p2p/base/tcp_port_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/tcp_port.h"
+
#include <list>
#include <memory>
#include <vector>
#include "p2p/base/basic_packet_socket_factory.h"
#include "p2p/base/p2p_constants.h"
-#include "p2p/base/tcp_port.h"
#include "p2p/base/transport_description.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
@@ -25,12 +26,12 @@
#include "rtc_base/virtual_socket_server.h"
#include "test/gtest.h"
-using rtc::SocketAddress;
using cricket::Connection;
+using cricket::ICE_PWD_LENGTH;
+using cricket::ICE_UFRAG_LENGTH;
using cricket::Port;
using cricket::TCPPort;
-using cricket::ICE_UFRAG_LENGTH;
-using cricket::ICE_PWD_LENGTH;
+using rtc::SocketAddress;
static int kTimeout = 1000;
static const SocketAddress kLocalAddr("11.11.11.11", 0);
diff --git a/p2p/base/transport_description_factory.cc b/p2p/base/transport_description_factory.cc
index 4d4a138..518a2ac 100644
--- a/p2p/base/transport_description_factory.cc
+++ b/p2p/base/transport_description_factory.cc
@@ -11,6 +11,7 @@
#include "p2p/base/transport_description_factory.h"
#include <stddef.h>
+
#include <memory>
#include <string>
diff --git a/p2p/base/transport_description_factory_unittest.cc b/p2p/base/transport_description_factory_unittest.cc
index 3819e81..f91cf6f 100644
--- a/p2p/base/transport_description_factory_unittest.cc
+++ b/p2p/base/transport_description_factory_unittest.cc
@@ -8,14 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/base/transport_description_factory.h"
+
#include <stddef.h>
+
#include <memory>
#include <string>
#include <vector>
#include "p2p/base/p2p_constants.h"
#include "p2p/base/transport_description.h"
-#include "p2p/base/transport_description_factory.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/fake_ssl_identity.h"
#include "rtc_base/ssl_certificate.h"
diff --git a/p2p/base/turn_port.h b/p2p/base/turn_port.h
index 5edbb1c..e6dab6e 100644
--- a/p2p/base/turn_port.h
+++ b/p2p/base/turn_port.h
@@ -12,6 +12,7 @@
#define P2P_BASE_TURN_PORT_H_
#include <stdio.h>
+
#include <list>
#include <map>
#include <memory>
@@ -187,7 +188,6 @@
void OnSocketConnect(rtc::AsyncPacketSocket* socket);
void OnSocketClose(rtc::AsyncPacketSocket* socket, int error);
-
const std::string& hash() const { return hash_; }
const std::string& nonce() const { return nonce_; }
@@ -195,9 +195,7 @@
void OnAllocateMismatch();
- rtc::AsyncPacketSocket* socket() const {
- return socket_;
- }
+ rtc::AsyncPacketSocket* socket() const { return socket_; }
// For testing only.
rtc::AsyncInvoker* invoker() { return &invoker_; }
@@ -205,9 +203,9 @@
// Signal with resolved server address.
// Parameters are port, server address and resolved server address.
// This signal will be sent only if server address is resolved successfully.
- sigslot::signal3<TurnPort*,
- const rtc::SocketAddress&,
- const rtc::SocketAddress&> SignalResolvedServerAddress;
+ sigslot::
+ signal3<TurnPort*, const rtc::SocketAddress&, const rtc::SocketAddress&>
+ SignalResolvedServerAddress;
// Signal when TurnPort is closed,
// e.g remote socket closed (TCP)
@@ -263,8 +261,7 @@
// NOTE: This method needs to be accessible for StacPort
// return true if entry was created (i.e channel_number consumed).
- bool CreateOrRefreshEntry(const rtc::SocketAddress& addr,
- int channel_number);
+ bool CreateOrRefreshEntry(const rtc::SocketAddress& addr, int channel_number);
bool CreateOrRefreshEntry(const rtc::SocketAddress& addr,
int channel_number,
@@ -328,8 +325,7 @@
bool ScheduleRefresh(uint32_t lifetime);
void SendRequest(StunRequest* request, int delay);
- int Send(const void* data, size_t size,
- const rtc::PacketOptions& options);
+ int Send(const void* data, size_t size, const rtc::PacketOptions& options);
void UpdateHash();
bool UpdateNonce(StunMessage* response);
void ResetNonce();
@@ -353,7 +349,8 @@
void TurnCustomizerMaybeModifyOutgoingStunMessage(StunMessage* message);
bool TurnCustomizerAllowChannelData(const void* data,
- size_t size, bool payload);
+ size_t size,
+ bool payload);
ProtocolAddress server_address_;
TlsCertPolicy tls_cert_policy_ = TlsCertPolicy::TLS_CERT_POLICY_SECURE;
@@ -370,9 +367,9 @@
rtc::DiffServCodePoint stun_dscp_value_;
StunRequestManager request_manager_;
- std::string realm_; // From 401/438 response message.
- std::string nonce_; // From 401/438 response message.
- std::string hash_; // Digest of username:realm:password
+ std::string realm_; // From 401/438 response message.
+ std::string nonce_; // From 401/438 response message.
+ std::string hash_; // Digest of username:realm:password
int next_channel_number_;
EntryList entries_;
@@ -389,7 +386,7 @@
// Optional TurnCustomizer that can modify outgoing messages. Once set, this
// must outlive the TurnPort's lifetime.
- webrtc::TurnCustomizer *turn_customizer_ = nullptr;
+ webrtc::TurnCustomizer* turn_customizer_ = nullptr;
friend class TurnEntry;
friend class TurnAllocateRequest;
diff --git a/p2p/base/turn_server.cc b/p2p/base/turn_server.cc
index 8f482a3..cd00e5f 100644
--- a/p2p/base/turn_server.cc
+++ b/p2p/base/turn_server.cc
@@ -81,8 +81,7 @@
// allocation, and self-deletes when its lifetime timer expires.
class TurnServerAllocation::Channel : public rtc::MessageHandler {
public:
- Channel(rtc::Thread* thread, int id,
- const rtc::SocketAddress& peer);
+ Channel(rtc::Thread* thread, int id, const rtc::SocketAddress& peer);
~Channel() override;
int id() const { return id_; }
@@ -108,8 +107,10 @@
return true;
}
-static bool InitErrorResponse(const StunMessage* req, int code,
- const std::string& reason, StunMessage* resp) {
+static bool InitErrorResponse(const StunMessage* req,
+ int code,
+ const std::string& reason,
+ StunMessage* resp) {
int resp_type = (req) ? GetStunErrorResponseType(req->type()) : -1;
if (resp_type == -1)
return false;
@@ -120,14 +121,12 @@
return true;
}
-
TurnServer::TurnServer(rtc::Thread* thread)
: thread_(thread),
nonce_key_(rtc::CreateRandomString(kNonceKeySize)),
auth_hook_(NULL),
redirect_hook_(NULL),
- enable_otu_nonce_(false) {
-}
+ enable_otu_nonce_(false) {}
TurnServer::~TurnServer() {
RTC_DCHECK(thread_checker_.IsCurrent());
@@ -227,7 +226,8 @@
}
}
-void TurnServer::HandleStunMessage(TurnServerConnection* conn, const char* data,
+void TurnServer::HandleStunMessage(TurnServerConnection* conn,
+ const char* data,
size_t size) {
RTC_DCHECK(thread_checker_.IsCurrent());
TurnMessage msg;
@@ -250,8 +250,7 @@
if (redirect_hook_ != NULL && msg.type() == STUN_ALLOCATE_REQUEST) {
rtc::SocketAddress address;
if (redirect_hook_->ShouldRedirect(conn->src(), &address)) {
- SendErrorResponseWithAlternateServer(
- conn, &msg, address);
+ SendErrorResponseWithAlternateServer(conn, &msg, address);
return;
}
}
@@ -309,7 +308,8 @@
bool TurnServer::CheckAuthorization(TurnServerConnection* conn,
const StunMessage* msg,
- const char* data, size_t size,
+ const char* data,
+ size_t size,
const std::string& key) {
RTC_DCHECK(thread_checker_.IsCurrent());
// RFC 5389, 10.2.2.
@@ -435,15 +435,16 @@
// Decode the timestamp.
int64_t then;
char* p = reinterpret_cast<char*>(&then);
- size_t len = rtc::hex_decode(p, sizeof(then),
- nonce.substr(0, sizeof(then) * 2));
+ size_t len =
+ rtc::hex_decode(p, sizeof(then), nonce.substr(0, sizeof(then) * 2));
if (len != sizeof(then)) {
return false;
}
// Verify the HMAC.
- if (nonce.substr(sizeof(then) * 2) != rtc::ComputeHmac(
- rtc::DIGEST_MD5, nonce_key_, std::string(p, sizeof(then)))) {
+ if (nonce.substr(sizeof(then) * 2) !=
+ rtc::ComputeHmac(rtc::DIGEST_MD5, nonce_key_,
+ std::string(p, sizeof(then)))) {
return false;
}
@@ -461,15 +462,17 @@
int proto,
const std::string& key) {
RTC_DCHECK(thread_checker_.IsCurrent());
- rtc::AsyncPacketSocket* external_socket = (external_socket_factory_) ?
- external_socket_factory_->CreateUdpSocket(external_addr_, 0, 0) : NULL;
+ rtc::AsyncPacketSocket* external_socket =
+ (external_socket_factory_)
+ ? external_socket_factory_->CreateUdpSocket(external_addr_, 0, 0)
+ : NULL;
if (!external_socket) {
return NULL;
}
// The Allocation takes ownership of the socket.
- TurnServerAllocation* allocation = new TurnServerAllocation(this,
- thread_, *conn, external_socket, key);
+ TurnServerAllocation* allocation =
+ new TurnServerAllocation(this, thread_, *conn, external_socket, key);
allocation->SignalDestroyed.connect(this, &TurnServer::OnAllocationDestroyed);
allocations_[*conn].reset(allocation);
return allocation;
@@ -477,7 +480,8 @@
void TurnServer::SendErrorResponse(TurnServerConnection* conn,
const StunMessage* req,
- int code, const std::string& reason) {
+ int code,
+ const std::string& reason) {
RTC_DCHECK(thread_checker_.IsCurrent());
TurnMessage resp;
InitErrorResponse(req, code, reason, &resp);
@@ -486,9 +490,10 @@
SendStun(conn, &resp);
}
-void TurnServer::SendErrorResponseWithRealmAndNonce(
- TurnServerConnection* conn, const StunMessage* msg,
- int code, const std::string& reason) {
+void TurnServer::SendErrorResponseWithRealmAndNonce(TurnServerConnection* conn,
+ const StunMessage* msg,
+ int code,
+ const std::string& reason) {
RTC_DCHECK(thread_checker_.IsCurrent());
TurnMessage resp;
InitErrorResponse(msg, code, reason, &resp);
@@ -506,7 +511,8 @@
}
void TurnServer::SendErrorResponseWithAlternateServer(
- TurnServerConnection* conn, const StunMessage* msg,
+ TurnServerConnection* conn,
+ const StunMessage* msg,
const rtc::SocketAddress& addr) {
RTC_DCHECK(thread_checker_.IsCurrent());
TurnMessage resp;
@@ -584,8 +590,7 @@
: src_(src),
dst_(socket->GetRemoteAddress()),
proto_(proto),
- socket_(socket) {
-}
+ socket_(socket) {}
bool TurnServerConnection::operator==(const TurnServerConnection& c) const {
return src_ == c.src_ && dst_ == c.dst_ && proto_ == c.proto_;
@@ -596,11 +601,9 @@
}
std::string TurnServerConnection::ToString() const {
- const char* const kProtos[] = {
- "unknown", "udp", "tcp", "ssltcp"
- };
+ const char* const kProtos[] = {"unknown", "udp", "tcp", "ssltcp"};
rtc::StringBuilder ost;
- ost << src_.ToString() << "-" << dst_.ToString() << ":"<< kProtos[proto_];
+ ost << src_.ToString() << "-" << dst_.ToString() << ":" << kProtos[proto_];
return ost.Release();
}
@@ -619,12 +622,11 @@
}
TurnServerAllocation::~TurnServerAllocation() {
- for (ChannelList::iterator it = channels_.begin();
- it != channels_.end(); ++it) {
+ for (ChannelList::iterator it = channels_.begin(); it != channels_.end();
+ ++it) {
delete *it;
}
- for (PermissionList::iterator it = perms_.begin();
- it != perms_.end(); ++it) {
+ for (PermissionList::iterator it = perms_.begin(); it != perms_.end(); ++it) {
delete *it;
}
thread_->Clear(this, MSG_ALLOCATION_TIMEOUT);
@@ -730,8 +732,7 @@
const StunAddressAttribute* peer_attr =
msg->GetAddress(STUN_ATTR_XOR_PEER_ADDRESS);
if (!data_attr || !peer_attr) {
- RTC_LOG(LS_WARNING) << ToString()
- << ": Received invalid send indication";
+ RTC_LOG(LS_WARNING) << ToString() << ": Received invalid send indication";
return;
}
@@ -766,8 +767,7 @@
// Add this permission.
AddPermission(peer_attr->GetAddress().ipaddr());
- RTC_LOG(LS_INFO) << ToString()
- << ": Created permission, peer="
+ RTC_LOG(LS_INFO) << ToString() << ": Created permission, peer="
<< peer_attr->GetAddress().ToString();
// Send a success response.
@@ -806,8 +806,8 @@
// Add or refresh this channel.
if (!channel1) {
channel1 = new Channel(thread_, channel_id, peer_attr->GetAddress());
- channel1->SignalDestroyed.connect(this,
- &TurnServerAllocation::OnChannelDestroyed);
+ channel1->SignalDestroyed.connect(
+ this, &TurnServerAllocation::OnChannelDestroyed);
channels_.push_back(channel1);
} else {
channel1->Refresh();
@@ -816,8 +816,7 @@
// Channel binds also refresh permissions.
AddPermission(peer_attr->GetAddress().ipaddr());
- RTC_LOG(LS_INFO) << ToString()
- << ": Bound channel, id=" << channel_id
+ RTC_LOG(LS_INFO) << ToString() << ": Bound channel, id=" << channel_id
<< ", peer=" << peer_attr->GetAddress().ToString();
// Send a success response.
@@ -861,8 +860,7 @@
// No channel, but a permission exists. Send as a data indication.
TurnMessage msg;
msg.SetType(TURN_DATA_INDICATION);
- msg.SetTransactionID(
- rtc::CreateRandomString(kStunTransactionIdLength));
+ msg.SetTransactionID(rtc::CreateRandomString(kStunTransactionIdLength));
msg.AddAttribute(absl::make_unique<StunXorAddressAttribute>(
STUN_ATTR_XOR_PEER_ADDRESS, addr));
msg.AddAttribute(
@@ -870,8 +868,7 @@
server_->SendStun(&conn_, &msg);
} else {
RTC_LOG(LS_WARNING)
- << ToString()
- << ": Received external packet without permission, peer="
+ << ToString() << ": Received external packet without permission, peer="
<< addr.ToString();
}
}
@@ -894,8 +891,8 @@
Permission* perm = FindPermission(addr);
if (!perm) {
perm = new Permission(thread_, addr);
- perm->SignalDestroyed.connect(
- this, &TurnServerAllocation::OnPermissionDestroyed);
+ perm->SignalDestroyed.connect(this,
+ &TurnServerAllocation::OnPermissionDestroyed);
perms_.push_back(perm);
} else {
perm->Refresh();
@@ -904,8 +901,8 @@
TurnServerAllocation::Permission* TurnServerAllocation::FindPermission(
const rtc::IPAddress& addr) const {
- for (PermissionList::const_iterator it = perms_.begin();
- it != perms_.end(); ++it) {
+ for (PermissionList::const_iterator it = perms_.begin(); it != perms_.end();
+ ++it) {
if ((*it)->peer() == addr)
return *it;
}
@@ -942,13 +939,15 @@
SendErrorResponse(req, STUN_ERROR_BAD_REQUEST, STUN_ERROR_REASON_BAD_REQUEST);
}
-void TurnServerAllocation::SendErrorResponse(const TurnMessage* req, int code,
- const std::string& reason) {
+void TurnServerAllocation::SendErrorResponse(const TurnMessage* req,
+ int code,
+ const std::string& reason) {
server_->SendErrorResponse(&conn_, req, code, reason);
}
-void TurnServerAllocation::SendExternal(const void* data, size_t size,
- const rtc::SocketAddress& peer) {
+void TurnServerAllocation::SendExternal(const void* data,
+ size_t size,
+ const rtc::SocketAddress& peer) {
rtc::PacketOptions options;
external_socket_->SendTo(data, size, peer, options);
}
@@ -972,7 +971,7 @@
}
TurnServerAllocation::Permission::Permission(rtc::Thread* thread,
- const rtc::IPAddress& peer)
+ const rtc::IPAddress& peer)
: thread_(thread), peer_(peer) {
Refresh();
}
@@ -993,8 +992,9 @@
delete this;
}
-TurnServerAllocation::Channel::Channel(rtc::Thread* thread, int id,
- const rtc::SocketAddress& peer)
+TurnServerAllocation::Channel::Channel(rtc::Thread* thread,
+ int id,
+ const rtc::SocketAddress& peer)
: thread_(thread), id_(id), peer_(peer) {
Refresh();
}
diff --git a/p2p/base/turn_server.h b/p2p/base/turn_server.h
index 1665055..7308cd5 100644
--- a/p2p/base/turn_server.h
+++ b/p2p/base/turn_server.h
@@ -31,7 +31,7 @@
class ByteBufferWriter;
class PacketSocketFactory;
class Thread;
-}
+} // namespace rtc
namespace cricket {
@@ -119,9 +119,11 @@
void SendResponse(TurnMessage* msg);
void SendBadRequestResponse(const TurnMessage* req);
- void SendErrorResponse(const TurnMessage* req, int code,
+ void SendErrorResponse(const TurnMessage* req,
+ int code,
const std::string& reason);
- void SendExternal(const void* data, size_t size,
+ void SendExternal(const void* data,
+ size_t size,
const rtc::SocketAddress& peer);
void OnPermissionDestroyed(Permission* perm);
@@ -147,7 +149,8 @@
// Gets HA1 for the specified user and realm.
// HA1 = MD5(A1) = MD5(username:realm:password).
// Return true if the given username and realm are valid, or false if not.
- virtual bool GetKey(const std::string& username, const std::string& realm,
+ virtual bool GetKey(const std::string& username,
+ const std::string& realm,
std::string* key) = 0;
virtual ~TurnAuthInterface() = default;
};
@@ -232,13 +235,11 @@
}
// Starts listening for packets from internal clients.
- void AddInternalSocket(rtc::AsyncPacketSocket* socket,
- ProtocolType proto);
+ void AddInternalSocket(rtc::AsyncPacketSocket* socket, ProtocolType proto);
// Starts listening for the connections on this socket. When someone tries
// to connect, the connection will be accepted and a new internal socket
// will be added.
- void AddInternalServerSocket(rtc::AsyncSocket* socket,
- ProtocolType proto);
+ void AddInternalServerSocket(rtc::AsyncSocket* socket, ProtocolType proto);
// Specifies the factory to use for creating external sockets.
void SetExternalSocketFactory(rtc::PacketSocketFactory* factory,
const rtc::SocketAddress& address);
@@ -249,8 +250,7 @@
return GenerateNonce(timestamp);
}
- void SetStunMessageObserver(
- std::unique_ptr<StunMessageObserver> observer) {
+ void SetStunMessageObserver(std::unique_ptr<StunMessageObserver> observer) {
RTC_DCHECK(thread_checker_.IsCurrent());
stun_message_observer_ = std::move(observer);
}
@@ -269,24 +269,31 @@
void AcceptConnection(rtc::AsyncSocket* server_socket);
void OnInternalSocketClose(rtc::AsyncPacketSocket* socket, int err);
- void HandleStunMessage(
- TurnServerConnection* conn, const char* data, size_t size);
+ void HandleStunMessage(TurnServerConnection* conn,
+ const char* data,
+ size_t size);
void HandleBindingRequest(TurnServerConnection* conn, const StunMessage* msg);
- void HandleAllocateRequest(TurnServerConnection* conn, const TurnMessage* msg,
+ void HandleAllocateRequest(TurnServerConnection* conn,
+ const TurnMessage* msg,
const std::string& key);
bool GetKey(const StunMessage* msg, std::string* key);
- bool CheckAuthorization(TurnServerConnection* conn, const StunMessage* msg,
- const char* data, size_t size,
+ bool CheckAuthorization(TurnServerConnection* conn,
+ const StunMessage* msg,
+ const char* data,
+ size_t size,
const std::string& key);
bool ValidateNonce(const std::string& nonce) const;
TurnServerAllocation* FindAllocation(TurnServerConnection* conn);
- TurnServerAllocation* CreateAllocation(
- TurnServerConnection* conn, int proto, const std::string& key);
+ TurnServerAllocation* CreateAllocation(TurnServerConnection* conn,
+ int proto,
+ const std::string& key);
- void SendErrorResponse(TurnServerConnection* conn, const StunMessage* req,
- int code, const std::string& reason);
+ void SendErrorResponse(TurnServerConnection* conn,
+ const StunMessage* req,
+ int code,
+ const std::string& reason);
void SendErrorResponseWithRealmAndNonce(TurnServerConnection* conn,
const StunMessage* req,
@@ -306,10 +313,8 @@
// Just clears |sockets_to_delete_|; called asynchronously.
void FreeSockets();
- typedef std::map<rtc::AsyncPacketSocket*,
- ProtocolType> InternalSocketMap;
- typedef std::map<rtc::AsyncSocket*,
- ProtocolType> ServerSocketMap;
+ typedef std::map<rtc::AsyncPacketSocket*, ProtocolType> InternalSocketMap;
+ typedef std::map<rtc::AsyncSocket*, ProtocolType> ServerSocketMap;
rtc::Thread* thread_;
rtc::ThreadChecker thread_checker_;
diff --git a/p2p/client/basic_port_allocator_unittest.cc b/p2p/client/basic_port_allocator_unittest.cc
index a893554..86544c8 100644
--- a/p2p/client/basic_port_allocator_unittest.cc
+++ b/p2p/client/basic_port_allocator_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/client/basic_port_allocator.h"
+
#include <memory>
#include <ostream> // no-presubmit-check TODO(webrtc:8982)
@@ -21,7 +23,6 @@
#include "p2p/base/test_relay_server.h"
#include "p2p/base/test_stun_server.h"
#include "p2p/base/test_turn_server.h"
-#include "p2p/client/basic_port_allocator.h"
#include "rtc_base/fake_clock.h"
#include "rtc_base/fake_mdns_responder.h"
#include "rtc_base/fake_network.h"
diff --git a/p2p/stunprober/stun_prober.cc b/p2p/stunprober/stun_prober.cc
index 4cbb5ed..3968347 100644
--- a/p2p/stunprober/stun_prober.cc
+++ b/p2p/stunprober/stun_prober.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/stunprober/stun_prober.h"
+
#include <map>
#include <memory>
#include <set>
@@ -16,7 +18,6 @@
#include "p2p/base/packet_socket_factory.h"
#include "p2p/base/stun.h"
-#include "p2p/stunprober/stun_prober.h"
#include "rtc_base/async_packet_socket.h"
#include "rtc_base/async_resolver_interface.h"
#include "rtc_base/bind.h"
diff --git a/p2p/stunprober/stun_prober_unittest.cc b/p2p/stunprober/stun_prober_unittest.cc
index e192598..91e2aac 100644
--- a/p2p/stunprober/stun_prober_unittest.cc
+++ b/p2p/stunprober/stun_prober_unittest.cc
@@ -8,20 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "p2p/stunprober/stun_prober.h"
+
#include <stdint.h>
+
#include <memory>
#include "p2p/base/basic_packet_socket_factory.h"
#include "p2p/base/test_stun_server.h"
-#include "p2p/stunprober/stun_prober.h"
#include "rtc_base/gunit.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/ssl_adapter.h"
#include "rtc_base/virtual_socket_server.h"
#include "test/gtest.h"
-using stunprober::StunProber;
using stunprober::AsyncCallback;
+using stunprober::StunProber;
namespace stunprober {
diff --git a/pc/audio_rtp_receiver.cc b/pc/audio_rtp_receiver.cc
index a470707..9bf6659 100644
--- a/pc/audio_rtp_receiver.cc
+++ b/pc/audio_rtp_receiver.cc
@@ -11,6 +11,7 @@
#include "pc/audio_rtp_receiver.h"
#include <stddef.h>
+
#include <utility>
#include <vector>
diff --git a/pc/audio_rtp_receiver.h b/pc/audio_rtp_receiver.h
index bc80fbe..cef6081 100644
--- a/pc/audio_rtp_receiver.h
+++ b/pc/audio_rtp_receiver.h
@@ -12,6 +12,7 @@
#define PC_AUDIO_RTP_RECEIVER_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc
index 3d7e01a..c721614 100644
--- a/pc/channel_manager_unittest.cc
+++ b/pc/channel_manager_unittest.cc
@@ -36,11 +36,14 @@
namespace cricket {
static const AudioCodec kAudioCodecs[] = {
- AudioCodec(97, "voice", 1, 2, 3), AudioCodec(111, "OPUS", 48000, 32000, 2),
+ AudioCodec(97, "voice", 1, 2, 3),
+ AudioCodec(111, "OPUS", 48000, 32000, 2),
};
static const VideoCodec kVideoCodecs[] = {
- VideoCodec(99, "H264"), VideoCodec(100, "VP8"), VideoCodec(96, "rtx"),
+ VideoCodec(99, "H264"),
+ VideoCodec(100, "VP8"),
+ VideoCodec(96, "rtx"),
};
class ChannelManagerTest : public ::testing::Test {
diff --git a/pc/composite_rtp_transport.cc b/pc/composite_rtp_transport.cc
index 61d9990..641d1d0 100644
--- a/pc/composite_rtp_transport.cc
+++ b/pc/composite_rtp_transport.cc
@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/composite_rtp_transport.h"
+
#include <string>
#include <utility>
-#include "pc/composite_rtp_transport.h"
-
#include "absl/memory/memory.h"
#include "p2p/base/packet_transport_internal.h"
diff --git a/pc/data_channel_unittest.cc b/pc/data_channel_unittest.cc
index 52c54e7..ad0e9b6 100644
--- a/pc/data_channel_unittest.cc
+++ b/pc/data_channel_unittest.cc
@@ -8,11 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/data_channel.h"
+
#include <string.h>
+
#include <memory>
#include <vector>
-#include "pc/data_channel.h"
#include "pc/sctp_utils.h"
#include "pc/test/fake_data_channel_provider.h"
#include "rtc_base/gunit.h"
@@ -232,8 +234,10 @@
AddObserver();
SetChannelReady();
std::vector<webrtc::DataBuffer> buffers({
- webrtc::DataBuffer("message 1"), webrtc::DataBuffer("msg 2"),
- webrtc::DataBuffer("message three"), webrtc::DataBuffer("quadra message"),
+ webrtc::DataBuffer("message 1"),
+ webrtc::DataBuffer("msg 2"),
+ webrtc::DataBuffer("message three"),
+ webrtc::DataBuffer("quadra message"),
webrtc::DataBuffer("fifthmsg"),
webrtc::DataBuffer("message of the beast"),
});
@@ -454,8 +458,10 @@
TEST_F(SctpDataChannelTest, VerifyMessagesAndBytesReceived) {
AddObserver();
std::vector<webrtc::DataBuffer> buffers({
- webrtc::DataBuffer("message 1"), webrtc::DataBuffer("msg 2"),
- webrtc::DataBuffer("message three"), webrtc::DataBuffer("quadra message"),
+ webrtc::DataBuffer("message 1"),
+ webrtc::DataBuffer("msg 2"),
+ webrtc::DataBuffer("message three"),
+ webrtc::DataBuffer("quadra message"),
webrtc::DataBuffer("fifthmsg"),
webrtc::DataBuffer("message of the beast"),
});
diff --git a/pc/dtls_srtp_transport.cc b/pc/dtls_srtp_transport.cc
index fcf0727..dacbcb4 100644
--- a/pc/dtls_srtp_transport.cc
+++ b/pc/dtls_srtp_transport.cc
@@ -11,6 +11,7 @@
#include "pc/dtls_srtp_transport.h"
#include <string.h>
+
#include <string>
#include <utility>
diff --git a/pc/dtls_srtp_transport_unittest.cc b/pc/dtls_srtp_transport_unittest.cc
index d4ad5fa..38d0458 100644
--- a/pc/dtls_srtp_transport_unittest.cc
+++ b/pc/dtls_srtp_transport_unittest.cc
@@ -11,6 +11,7 @@
#include "pc/dtls_srtp_transport.h"
#include <string.h>
+
#include <cstdint>
#include <memory>
#include <set>
@@ -34,8 +35,8 @@
using cricket::FakeDtlsTransport;
using cricket::FakeIceTransport;
using webrtc::DtlsSrtpTransport;
-using webrtc::SrtpTransport;
using webrtc::RtpTransport;
+using webrtc::SrtpTransport;
const int kRtpAuthTagLen = 10;
diff --git a/pc/dtmf_sender.cc b/pc/dtmf_sender.cc
index 7c1d3c1..af5b809 100644
--- a/pc/dtmf_sender.cc
+++ b/pc/dtmf_sender.cc
@@ -12,6 +12,7 @@
#include <ctype.h>
#include <string.h>
+
#include <string>
#include "rtc_base/checks.h"
@@ -150,8 +151,8 @@
void DtmfSender::QueueInsertDtmf(const rtc::Location& posted_from,
uint32_t delay_ms) {
- dtmf_driver_.AsyncInvokeDelayed<void>(posted_from, signaling_thread_,
- [this] { DoInsertDtmf(); }, delay_ms);
+ dtmf_driver_.AsyncInvokeDelayed<void>(
+ posted_from, signaling_thread_, [this] { DoInsertDtmf(); }, delay_ms);
}
void DtmfSender::DoInsertDtmf() {
diff --git a/pc/dtmf_sender_unittest.cc b/pc/dtmf_sender_unittest.cc
index 069833a..3f59af0 100644
--- a/pc/dtmf_sender_unittest.cc
+++ b/pc/dtmf_sender_unittest.cc
@@ -11,6 +11,7 @@
#include "pc/dtmf_sender.h"
#include <stddef.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/pc/ice_server_parsing.cc b/pc/ice_server_parsing.cc
index 3d05d66..2400fd5 100644
--- a/pc/ice_server_parsing.cc
+++ b/pc/ice_server_parsing.cc
@@ -11,6 +11,7 @@
#include "pc/ice_server_parsing.h"
#include <stddef.h>
+
#include <cctype> // For std::isdigit.
#include <string>
diff --git a/pc/ice_server_parsing_unittest.cc b/pc/ice_server_parsing_unittest.cc
index 2262903..2625b24 100644
--- a/pc/ice_server_parsing_unittest.cc
+++ b/pc/ice_server_parsing_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/ice_server_parsing.h"
+
#include <string>
#include <vector>
#include "p2p/base/port_interface.h"
-#include "pc/ice_server_parsing.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/socket_address.h"
#include "test/gtest.h"
diff --git a/pc/jitter_buffer_delay_unittest.cc b/pc/jitter_buffer_delay_unittest.cc
index 383a4b7..7edd09a 100644
--- a/pc/jitter_buffer_delay_unittest.cc
+++ b/pc/jitter_buffer_delay_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/jitter_buffer_delay.h"
+
#include <stdint.h>
#include "absl/types/optional.h"
#include "api/scoped_refptr.h"
-#include "pc/jitter_buffer_delay.h"
#include "pc/test/mock_delayable.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/thread.h"
diff --git a/pc/jsep_session_description_unittest.cc b/pc/jsep_session_description_unittest.cc
index d2fc6e5..8abb500 100644
--- a/pc/jsep_session_description_unittest.cc
+++ b/pc/jsep_session_description_unittest.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/jsep_session_description.h"
+
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <utility>
@@ -19,7 +22,6 @@
#include "api/candidate.h"
#include "api/jsep.h"
#include "api/jsep_ice_candidate.h"
-#include "api/jsep_session_description.h"
#include "media/base/codec.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/port.h"
diff --git a/pc/jsep_transport.cc b/pc/jsep_transport.cc
index 9380341..e32f279 100644
--- a/pc/jsep_transport.cc
+++ b/pc/jsep_transport.cc
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <type_traits>
#include <utility> // for std::pair
diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc
index 7b91ad8..c4fd8d2 100644
--- a/pc/jsep_transport_controller_unittest.cc
+++ b/pc/jsep_transport_controller_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/jsep_transport_controller.h"
+
#include <map>
#include <memory>
@@ -20,14 +22,13 @@
#include "p2p/base/no_op_dtls_transport.h"
#include "p2p/base/transport_factory_interface.h"
#include "p2p/base/transport_info.h"
-#include "pc/jsep_transport_controller.h"
#include "rtc_base/gunit.h"
#include "rtc_base/thread.h"
#include "test/gtest.h"
-using cricket::FakeDtlsTransport;
using cricket::Candidate;
using cricket::Candidates;
+using cricket::FakeDtlsTransport;
using webrtc::SdpType;
static const int kTimeout = 100;
diff --git a/pc/jsep_transport_unittest.cc b/pc/jsep_transport_unittest.cc
index 31a4e92..0680027 100644
--- a/pc/jsep_transport_unittest.cc
+++ b/pc/jsep_transport_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/jsep_transport.h"
+
#include <memory>
#include <tuple>
#include <utility>
@@ -16,7 +18,6 @@
#include "media/base/fake_rtp.h"
#include "p2p/base/fake_dtls_transport.h"
#include "p2p/base/fake_ice_transport.h"
-#include "pc/jsep_transport.h"
#include "rtc_base/gunit.h"
namespace cricket {
diff --git a/pc/media_session_unittest.cc b/pc/media_session_unittest.cc
index 4cdfb67..a0d9d0c 100644
--- a/pc/media_session_unittest.cc
+++ b/pc/media_session_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/media_session.h"
+
#include <algorithm>
#include <memory>
#include <string>
@@ -22,7 +24,6 @@
#include "p2p/base/p2p_constants.h"
#include "p2p/base/transport_description.h"
#include "p2p/base/transport_info.h"
-#include "pc/media_session.h"
#include "pc/rtp_media_utils.h"
#include "pc/srtp_filter.h"
#include "rtc_base/checks.h"
@@ -2530,14 +2531,17 @@
// TODO(wu): |updated_offer| should not include the codec
// (i.e. |kAudioCodecs2[0]|) the other side doesn't support.
const AudioCodec kUpdatedAudioCodecOffer[] = {
- kAudioCodecsAnswer[0], kAudioCodecsAnswer[1], kAudioCodecs2[0],
+ kAudioCodecsAnswer[0],
+ kAudioCodecsAnswer[1],
+ kAudioCodecs2[0],
};
// The expected video codecs are the common video codecs from the first
// offer/answer exchange plus the video codecs only |f2_| offer, sorted in
// preference order.
const VideoCodec kUpdatedVideoCodecOffer[] = {
- kVideoCodecsAnswer[0], kVideoCodecs2[1],
+ kVideoCodecsAnswer[0],
+ kVideoCodecs2[1],
};
const AudioContentDescription* updated_acd =
@@ -3170,14 +3174,16 @@
// Since the default local extension id |f2_| uses has already been used by
// |f1_| for another extensions, it is changed to 13.
const RtpExtension kUpdatedAudioRtpExtensions[] = {
- kAudioRtpExtensionAnswer[0], RtpExtension(kAudioRtpExtension2[1].uri, 13),
+ kAudioRtpExtensionAnswer[0],
+ RtpExtension(kAudioRtpExtension2[1].uri, 13),
kAudioRtpExtension2[2],
};
// Since the default local extension id |f2_| uses has already been used by
// |f1_| for another extensions, is is changed to 12.
const RtpExtension kUpdatedVideoRtpExtensions[] = {
- kVideoRtpExtensionAnswer[0], RtpExtension(kVideoRtpExtension2[1].uri, 12),
+ kVideoRtpExtensionAnswer[0],
+ RtpExtension(kVideoRtpExtension2[1].uri, 12),
kVideoRtpExtension2[2],
};
@@ -3207,7 +3213,8 @@
// Since the audio extensions used ID 3 for "both_audio_and_video", so should
// the video extensions.
const RtpExtension kExpectedVideoRtpExtension[] = {
- kVideoRtpExtension3[0], kAudioRtpExtension3[1],
+ kVideoRtpExtension3[0],
+ kAudioRtpExtension3[1],
};
EXPECT_EQ(
diff --git a/pc/media_stream.cc b/pc/media_stream.cc
index e083b96..00f491b 100644
--- a/pc/media_stream.cc
+++ b/pc/media_stream.cc
@@ -11,6 +11,7 @@
#include "pc/media_stream.h"
#include <stddef.h>
+
#include <vector>
#include "rtc_base/checks.h"
diff --git a/pc/media_stream_unittest.cc b/pc/media_stream_unittest.cc
index b49481e..b70171d 100644
--- a/pc/media_stream_unittest.cc
+++ b/pc/media_stream_unittest.cc
@@ -8,11 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/media_stream.h"
+
#include <stddef.h>
+
#include <string>
#include "pc/audio_track.h"
-#include "pc/media_stream.h"
#include "pc/test/fake_video_track_source.h"
#include "pc/video_track.h"
#include "rtc_base/thread.h"
diff --git a/pc/peer_connection_crypto_unittest.cc b/pc/peer_connection_crypto_unittest.cc
index f32a124..077ac36 100644
--- a/pc/peer_connection_crypto_unittest.cc
+++ b/pc/peer_connection_crypto_unittest.cc
@@ -30,8 +30,8 @@
using RTCConfiguration = PeerConnectionInterface::RTCConfiguration;
using RTCOfferAnswerOptions = PeerConnectionInterface::RTCOfferAnswerOptions;
-using ::testing::Values;
using ::testing::Combine;
+using ::testing::Values;
constexpr int kGenerateCertTimeout = 1000;
diff --git a/pc/peer_connection_factory_unittest.cc b/pc/peer_connection_factory_unittest.cc
index a19e430..dd392c5 100644
--- a/pc/peer_connection_factory_unittest.cc
+++ b/pc/peer_connection_factory_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/peer_connection_factory.h"
+
#include <stddef.h>
+
#include <memory>
#include <string>
#include <utility>
@@ -33,7 +36,6 @@
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/port.h"
#include "p2p/base/port_interface.h"
-#include "pc/peer_connection_factory.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_video_track_source.h"
#include "rtc_base/socket_address.h"
@@ -51,8 +53,8 @@
using webrtc::PeerConnectionFactoryInterface;
using webrtc::PeerConnectionInterface;
using webrtc::PeerConnectionObserver;
-using webrtc::VideoTrackSourceInterface;
using webrtc::VideoTrackInterface;
+using webrtc::VideoTrackSourceInterface;
namespace {
diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc
index e841399..345c46e 100644
--- a/pc/peer_connection_interface_unittest.cc
+++ b/pc/peer_connection_interface_unittest.cc
@@ -8,9 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "api/peer_connection_interface.h"
+
#include <limits.h>
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include <string>
#include <utility>
@@ -31,7 +34,6 @@
#include "api/jsep_session_description.h"
#include "api/media_stream_interface.h"
#include "api/media_types.h"
-#include "api/peer_connection_interface.h"
#include "api/rtc_error.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
diff --git a/pc/peer_connection_jsep_unittest.cc b/pc/peer_connection_jsep_unittest.cc
index 161f534..2afb72b 100644
--- a/pc/peer_connection_jsep_unittest.cc
+++ b/pc/peer_connection_jsep_unittest.cc
@@ -35,10 +35,10 @@
using cricket::MediaContentDescription;
using RTCConfiguration = PeerConnectionInterface::RTCConfiguration;
-using ::testing::Values;
using ::testing::Combine;
using ::testing::ElementsAre;
using ::testing::UnorderedElementsAre;
+using ::testing::Values;
class PeerConnectionFactoryForJsepTest : public PeerConnectionFactory {
public:
diff --git a/pc/peer_connection_media_unittest.cc b/pc/peer_connection_media_unittest.cc
index 031622f..a980334 100644
--- a/pc/peer_connection_media_unittest.cc
+++ b/pc/peer_connection_media_unittest.cc
@@ -42,8 +42,8 @@
using RTCOfferAnswerOptions = PeerConnectionInterface::RTCOfferAnswerOptions;
using ::testing::Bool;
using ::testing::Combine;
-using ::testing::Values;
using ::testing::ElementsAre;
+using ::testing::Values;
class PeerConnectionWrapperForMediaTest : public PeerConnectionWrapper {
public:
@@ -337,9 +337,9 @@
RTCOfferAnswerOptions options;
options.num_simulcast_layers = 3;
auto offer = caller->CreateOffer(options);
- auto* description = cricket::GetFirstMediaContent(
- offer->description(),
- cricket::MEDIA_TYPE_VIDEO)->media_description();
+ auto* description = cricket::GetFirstMediaContent(offer->description(),
+ cricket::MEDIA_TYPE_VIDEO)
+ ->media_description();
ASSERT_EQ(1u, description->streams().size());
ASSERT_TRUE(description->streams()[0].get_ssrc_group("SIM"));
EXPECT_EQ(3u, description->streams()[0].get_ssrc_group("SIM")->ssrcs.size());
@@ -364,9 +364,9 @@
RTCOfferAnswerOptions options;
options.num_simulcast_layers = 3;
auto answer = callee->CreateAnswer(options);
- auto* description = cricket::GetFirstMediaContent(
- answer->description(),
- cricket::MEDIA_TYPE_VIDEO)->media_description();
+ auto* description = cricket::GetFirstMediaContent(answer->description(),
+ cricket::MEDIA_TYPE_VIDEO)
+ ->media_description();
ASSERT_EQ(1u, description->streams().size());
ASSERT_TRUE(description->streams()[0].get_ssrc_group("SIM"));
EXPECT_EQ(3u, description->streams()[0].get_ssrc_group("SIM")->ssrcs.size());
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 6336f1f..67aa98d 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <stdint.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/pc/peer_connection_wrapper.cc b/pc/peer_connection_wrapper.cc
index 74089f6..b4b0782 100644
--- a/pc/peer_connection_wrapper.cc
+++ b/pc/peer_connection_wrapper.cc
@@ -11,6 +11,7 @@
#include "pc/peer_connection_wrapper.h"
#include <stdint.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc
index ed8ef2d..2590f85 100644
--- a/pc/remote_audio_source.cc
+++ b/pc/remote_audio_source.cc
@@ -11,6 +11,7 @@
#include "pc/remote_audio_source.h"
#include <stddef.h>
+
#include <string>
#include "absl/algorithm/container.h"
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 0ccfd18..55735c0 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -71,7 +71,8 @@
}
std::string RTCTransportStatsIDFromTransportChannel(
- const std::string& transport_name, int channel_component) {
+ const std::string& transport_name,
+ int channel_component) {
char buf[1024];
rtc::SimpleStringBuilder sb(buf);
sb << "RTCTransport_" << transport_name << "_" << channel_component;
@@ -265,17 +266,16 @@
const std::string& mid,
const cricket::VoiceReceiverInfo& voice_receiver_info,
RTCInboundRTPStreamStats* inbound_audio) {
- SetInboundRTPStreamStatsFromMediaReceiverInfo(
- voice_receiver_info, inbound_audio);
+ SetInboundRTPStreamStatsFromMediaReceiverInfo(voice_receiver_info,
+ inbound_audio);
inbound_audio->media_type = "audio";
inbound_audio->kind = "audio";
if (voice_receiver_info.codec_payload_type) {
inbound_audio->codec_id = RTCCodecStatsIDFromMidDirectionAndPayload(
mid, true, *voice_receiver_info.codec_payload_type);
}
- inbound_audio->jitter =
- static_cast<double>(voice_receiver_info.jitter_ms) /
- rtc::kNumMillisecsPerSec;
+ inbound_audio->jitter = static_cast<double>(voice_receiver_info.jitter_ms) /
+ rtc::kNumMillisecsPerSec;
// |fir_count|, |pli_count| and |sli_count| are only valid for video and are
// purposefully left undefined for audio.
if (voice_receiver_info.last_packet_received_timestamp_ms) {
@@ -294,8 +294,8 @@
const std::string& mid,
const cricket::VideoReceiverInfo& video_receiver_info,
RTCInboundRTPStreamStats* inbound_video) {
- SetInboundRTPStreamStatsFromMediaReceiverInfo(
- video_receiver_info, inbound_video);
+ SetInboundRTPStreamStatsFromMediaReceiverInfo(video_receiver_info,
+ inbound_video);
inbound_video->media_type = "video";
inbound_video->kind = "video";
if (video_receiver_info.codec_payload_type) {
@@ -349,8 +349,8 @@
const std::string& mid,
const cricket::VoiceSenderInfo& voice_sender_info,
RTCOutboundRTPStreamStats* outbound_audio) {
- SetOutboundRTPStreamStatsFromMediaSenderInfo(
- voice_sender_info, outbound_audio);
+ SetOutboundRTPStreamStatsFromMediaSenderInfo(voice_sender_info,
+ outbound_audio);
outbound_audio->media_type = "audio";
outbound_audio->kind = "audio";
if (voice_sender_info.codec_payload_type) {
@@ -365,8 +365,8 @@
const std::string& mid,
const cricket::VideoSenderInfo& video_sender_info,
RTCOutboundRTPStreamStats* outbound_video) {
- SetOutboundRTPStreamStatsFromMediaSenderInfo(
- video_sender_info, outbound_video);
+ SetOutboundRTPStreamStatsFromMediaSenderInfo(video_sender_info,
+ outbound_video);
outbound_video->media_type = "video";
outbound_video->kind = "video";
if (video_sender_info.codec_payload_type) {
@@ -466,7 +466,8 @@
}
void ProduceCertificateStatsFromSSLCertificateStats(
- int64_t timestamp_us, const rtc::SSLCertificateStats& certificate_stats,
+ int64_t timestamp_us,
+ const rtc::SSLCertificateStats& certificate_stats,
RTCStatsReport* report) {
RTCCertificateStats* prev_certificate_stats = nullptr;
for (const rtc::SSLCertificateStats* s = &certificate_stats; s;
@@ -480,8 +481,8 @@
RTC_DCHECK_EQ(s, &certificate_stats);
break;
}
- RTCCertificateStats* certificate_stats = new RTCCertificateStats(
- certificate_stats_id, timestamp_us);
+ RTCCertificateStats* certificate_stats =
+ new RTCCertificateStats(certificate_stats_id, timestamp_us);
certificate_stats->fingerprint = s->fingerprint;
certificate_stats->fingerprint_algorithm = s->fingerprint_algorithm;
certificate_stats->base64_certificate = s->base64_certificate;
@@ -492,9 +493,11 @@
}
}
-const std::string& ProduceIceCandidateStats(
- int64_t timestamp_us, const cricket::Candidate& candidate, bool is_local,
- const std::string& transport_id, RTCStatsReport* report) {
+const std::string& ProduceIceCandidateStats(int64_t timestamp_us,
+ const cricket::Candidate& candidate,
+ bool is_local,
+ const std::string& transport_id,
+ RTCStatsReport* report) {
const std::string& id = "RTCIceCandidate_" + candidate.id();
const RTCStats* stats = report->Get(id);
if (!stats) {
@@ -521,8 +524,8 @@
candidate_stats->ip = candidate.address().ipaddr().ToString();
candidate_stats->port = static_cast<int32_t>(candidate.address().port());
candidate_stats->protocol = candidate.protocol();
- candidate_stats->candidate_type = CandidateTypeToRTCIceCandidateType(
- candidate.type());
+ candidate_stats->candidate_type =
+ CandidateTypeToRTCIceCandidateType(candidate.type());
candidate_stats->priority = static_cast<int32_t>(candidate.priority());
stats = candidate_stats.get();
@@ -580,8 +583,8 @@
audio_track_stats->remote_source = true;
audio_track_stats->detached = false;
if (voice_receiver_info.audio_level >= 0) {
- audio_track_stats->audio_level = DoubleAudioLevelFromIntAudioLevel(
- voice_receiver_info.audio_level);
+ audio_track_stats->audio_level =
+ DoubleAudioLevelFromIntAudioLevel(voice_receiver_info.audio_level);
}
audio_track_stats->jitter_buffer_delay =
voice_receiver_info.jitter_buffer_delay_seconds;
@@ -636,10 +639,10 @@
attachment_id);
video_track_stats->remote_source = false;
video_track_stats->detached = false;
- video_track_stats->frame_width = static_cast<uint32_t>(
- video_sender_info.send_frame_width);
- video_track_stats->frame_height = static_cast<uint32_t>(
- video_sender_info.send_frame_height);
+ video_track_stats->frame_width =
+ static_cast<uint32_t>(video_sender_info.send_frame_width);
+ video_track_stats->frame_height =
+ static_cast<uint32_t>(video_sender_info.send_frame_height);
// TODO(hbos): Will reduce this by frames dropped due to congestion control
// when available. https://crbug.com/659137
video_track_stats->frames_sent = video_sender_info.frames_encoded;
@@ -665,10 +668,10 @@
video_track_stats->detached = false;
if (video_receiver_info.frame_width > 0 &&
video_receiver_info.frame_height > 0) {
- video_track_stats->frame_width = static_cast<uint32_t>(
- video_receiver_info.frame_width);
- video_track_stats->frame_height = static_cast<uint32_t>(
- video_receiver_info.frame_height);
+ video_track_stats->frame_width =
+ static_cast<uint32_t>(video_receiver_info.frame_width);
+ video_track_stats->frame_height =
+ static_cast<uint32_t>(video_receiver_info.frame_height);
}
video_track_stats->jitter_buffer_delay =
video_receiver_info.jitter_buffer_delay_seconds;
@@ -682,8 +685,8 @@
video_track_stats->frames_decoded = video_receiver_info.frames_decoded;
RTC_DCHECK_GE(video_receiver_info.frames_received,
video_receiver_info.frames_rendered);
- video_track_stats->frames_dropped = video_receiver_info.frames_received -
- video_receiver_info.frames_rendered;
+ video_track_stats->frames_dropped =
+ video_receiver_info.frames_received - video_receiver_info.frames_rendered;
video_track_stats->freeze_count = video_receiver_info.freeze_count;
video_track_stats->pause_count = video_receiver_info.pause_count;
video_track_stats->total_freezes_duration =
@@ -1214,7 +1217,8 @@
}
void RTCStatsCollector::ProduceDataChannelStats_s(
- int64_t timestamp_us, RTCStatsReport* report) const {
+ int64_t timestamp_us,
+ RTCStatsReport* report) const {
RTC_DCHECK(signaling_thread_->IsCurrent());
for (const rtc::scoped_refptr<DataChannel>& data_channel :
pc_->sctp_data_channels()) {
@@ -1457,10 +1461,11 @@
}
void RTCStatsCollector::ProducePeerConnectionStats_s(
- int64_t timestamp_us, RTCStatsReport* report) const {
+ int64_t timestamp_us,
+ RTCStatsReport* report) const {
RTC_DCHECK(signaling_thread_->IsCurrent());
std::unique_ptr<RTCPeerConnectionStats> stats(
- new RTCPeerConnectionStats("RTCPeerConnection", timestamp_us));
+ new RTCPeerConnectionStats("RTCPeerConnection", timestamp_us));
stats->data_channels_opened = internal_record_.data_channels_opened;
stats->data_channels_closed = internal_record_.data_channels_closed;
report->AddStats(std::move(stats));
@@ -1645,8 +1650,7 @@
std::string rtcp_transport_stats_id;
for (const cricket::TransportChannelStats& channel_stats :
transport_stats.channel_stats) {
- if (channel_stats.component ==
- cricket::ICE_CANDIDATE_COMPONENT_RTCP) {
+ if (channel_stats.component == cricket::ICE_CANDIDATE_COMPONENT_RTCP) {
rtcp_transport_stats_id = RTCTransportStatsIDFromTransportChannel(
transport_name, channel_stats.component);
break;
@@ -1678,8 +1682,8 @@
timestamp_us));
transport_stats->bytes_sent = 0;
transport_stats->bytes_received = 0;
- transport_stats->dtls_state = DtlsTransportStateToRTCDtlsTransportState(
- channel_stats.dtls_state);
+ transport_stats->dtls_state =
+ DtlsTransportStateToRTCDtlsTransportState(channel_stats.dtls_state);
for (const cricket::ConnectionInfo& info :
channel_stats.connection_infos) {
*transport_stats->bytes_sent += info.sent_total_bytes;
@@ -1855,8 +1859,9 @@
void RTCStatsCollector::OnDataChannelOpened(DataChannel* channel) {
RTC_DCHECK(signaling_thread_->IsCurrent());
- bool result = internal_record_.opened_data_channels.insert(
- reinterpret_cast<uintptr_t>(channel)).second;
+ bool result = internal_record_.opened_data_channels
+ .insert(reinterpret_cast<uintptr_t>(channel))
+ .second;
++internal_record_.data_channels_opened;
RTC_DCHECK(result);
}
diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc
index 02f6654..cd50346 100644
--- a/pc/rtc_stats_collector_unittest.cc
+++ b/pc/rtc_stats_collector_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/rtc_stats_collector.h"
+
#include <ctype.h>
#include <algorithm>
@@ -30,7 +32,6 @@
#include "p2p/base/port.h"
#include "pc/media_stream.h"
#include "pc/media_stream_track.h"
-#include "pc/rtc_stats_collector.h"
#include "pc/test/fake_peer_connection_for_stats.h"
#include "pc/test/mock_data_channel.h"
#include "pc/test/mock_rtp_receiver_internal.h"
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index adb986d..a723123 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <string.h>
+
#include <algorithm>
#include <memory>
#include <set>
@@ -978,8 +979,10 @@
// TODO(hbos): Include RTC[Audio/Video]ReceiverStats when implemented.
// TODO(hbos): Include RTCRemoteOutboundRtpStreamStats when implemented.
// TODO(hbos): Include RTCRtpContributingSourceStats when implemented.
- RTCInboundRTPStreamStats::kType, RTCPeerConnectionStats::kType,
- RTCMediaStreamStats::kType, RTCDataChannelStats::kType,
+ RTCInboundRTPStreamStats::kType,
+ RTCPeerConnectionStats::kType,
+ RTCMediaStreamStats::kType,
+ RTCDataChannelStats::kType,
};
RTCStatsReportVerifier(report.get()).VerifyReport(allowed_missing_stats);
EXPECT_TRUE(report->size());
@@ -995,8 +998,10 @@
// TODO(hbos): Include RTC[Audio/Video]SenderStats when implemented.
// TODO(hbos): Include RTCRemoteInboundRtpStreamStats when implemented.
// TODO(hbos): Include RTCRtpContributingSourceStats when implemented.
- RTCOutboundRTPStreamStats::kType, RTCPeerConnectionStats::kType,
- RTCMediaStreamStats::kType, RTCDataChannelStats::kType,
+ RTCOutboundRTPStreamStats::kType,
+ RTCPeerConnectionStats::kType,
+ RTCMediaStreamStats::kType,
+ RTCDataChannelStats::kType,
};
RTCStatsReportVerifier(report.get()).VerifyReport(allowed_missing_stats);
EXPECT_TRUE(report->size());
diff --git a/pc/rtp_media_utils_unittest.cc b/pc/rtp_media_utils_unittest.cc
index f200c28..5ee49e3 100644
--- a/pc/rtp_media_utils_unittest.cc
+++ b/pc/rtp_media_utils_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/rtp_media_utils.h"
+
#include <tuple>
-#include "pc/rtp_media_utils.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/pc/rtp_parameters_conversion_unittest.cc b/pc/rtp_parameters_conversion_unittest.cc
index 83a2893..3d64d62 100644
--- a/pc/rtp_parameters_conversion_unittest.cc
+++ b/pc/rtp_parameters_conversion_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/rtp_parameters_conversion.h"
+
#include <algorithm>
-#include "pc/rtp_parameters_conversion.h"
#include "rtc_base/gunit.h"
#include "test/gmock.h"
diff --git a/pc/rtp_receiver.cc b/pc/rtp_receiver.cc
index 0b800c1..f65afd7 100644
--- a/pc/rtp_receiver.cc
+++ b/pc/rtp_receiver.cc
@@ -11,6 +11,7 @@
#include "pc/rtp_receiver.h"
#include <stddef.h>
+
#include <utility>
#include <vector>
diff --git a/pc/rtp_receiver.h b/pc/rtp_receiver.h
index e56c859..b33878e 100644
--- a/pc/rtp_receiver.h
+++ b/pc/rtp_receiver.h
@@ -16,6 +16,7 @@
#define PC_RTP_RECEIVER_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc
index a303d6f..c6118b5 100644
--- a/pc/rtp_sender_receiver_unittest.cc
+++ b/pc/rtp_sender_receiver_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <stddef.h>
+
#include <cstdint>
#include <memory>
#include <string>
diff --git a/pc/rtp_transport.cc b/pc/rtp_transport.cc
index 6cfbed9..fe7357f 100644
--- a/pc/rtp_transport.cc
+++ b/pc/rtp_transport.cc
@@ -11,6 +11,7 @@
#include "pc/rtp_transport.h"
#include <errno.h>
+
#include <string>
#include <utility>
diff --git a/pc/rtp_transport_unittest.cc b/pc/rtp_transport_unittest.cc
index 4248ba7..03e8820 100644
--- a/pc/rtp_transport_unittest.cc
+++ b/pc/rtp_transport_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/rtp_transport.h"
+
#include <cstdint>
#include <set>
#include <string>
@@ -16,7 +18,6 @@
#include "api/rtp_headers.h"
#include "api/rtp_parameters.h"
#include "p2p/base/fake_packet_transport.h"
-#include "pc/rtp_transport.h"
#include "pc/test/rtp_transport_test_util.h"
#include "rtc_base/buffer.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
diff --git a/pc/sdp_serializer_unittest.cc b/pc/sdp_serializer_unittest.cc
index 726d01d..b50f4f9 100644
--- a/pc/sdp_serializer_unittest.cc
+++ b/pc/sdp_serializer_unittest.cc
@@ -8,21 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/sdp_serializer.h"
+
#include <map>
#include <string>
#include <utility>
#include <vector>
-#include "pc/sdp_serializer.h"
#include "rtc_base/gunit.h"
-using ::testing::ValuesIn;
-using ::testing::TestWithParam;
using cricket::RidDescription;
using cricket::RidDirection;
using cricket::SimulcastDescription;
using cricket::SimulcastLayer;
using cricket::SimulcastLayerList;
+using ::testing::TestWithParam;
+using ::testing::ValuesIn;
namespace webrtc {
diff --git a/pc/session_description.cc b/pc/session_description.cc
index fc4afbc..07ab7db 100644
--- a/pc/session_description.cc
+++ b/pc/session_description.cc
@@ -90,8 +90,7 @@
SessionDescription::SessionDescription() = default;
SessionDescription::SessionDescription(const SessionDescription&) = default;
-SessionDescription::~SessionDescription() {
-}
+SessionDescription::~SessionDescription() {}
std::unique_ptr<SessionDescription> SessionDescription::Clone() const {
// Copy using the private copy constructor.
diff --git a/pc/session_description.h b/pc/session_description.h
index 01e9345..bc84740 100644
--- a/pc/session_description.h
+++ b/pc/session_description.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <iosfwd>
#include <memory>
#include <string>
@@ -48,7 +49,6 @@
extern const char kMediaProtocolDtlsSavpf[];
-
// Options to control how session descriptions are generated.
const int kAutoBandwidth = -1;
diff --git a/pc/session_description_unittest.cc b/pc/session_description_unittest.cc
index 6baf5a1..7f2b410 100644
--- a/pc/session_description_unittest.cc
+++ b/pc/session_description_unittest.cc
@@ -140,5 +140,4 @@
->extmap_allow_mixed_enum());
}
-
} // namespace cricket
diff --git a/pc/simulcast_description.cc b/pc/simulcast_description.cc
index 0359ffc..8b510fe 100644
--- a/pc/simulcast_description.cc
+++ b/pc/simulcast_description.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/simulcast_description.h"
+
#include <utility>
-#include "pc/simulcast_description.h"
#include "rtc_base/checks.h"
namespace cricket {
diff --git a/pc/srtp_filter.cc b/pc/srtp_filter.cc
index cdfaeaa..d4ad3bb 100644
--- a/pc/srtp_filter.cc
+++ b/pc/srtp_filter.cc
@@ -11,6 +11,7 @@
#include "pc/srtp_filter.h"
#include <string.h>
+
#include <cstdint>
#include "rtc_base/logging.h"
diff --git a/pc/srtp_filter_unittest.cc b/pc/srtp_filter_unittest.cc
index 7964002..9a57206 100644
--- a/pc/srtp_filter_unittest.cc
+++ b/pc/srtp_filter_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/srtp_filter.h"
+
#include <string.h>
#include "api/crypto_params.h"
-#include "pc/srtp_filter.h"
#include "rtc_base/ssl_stream_adapter.h"
#include "test/gtest.h"
diff --git a/pc/srtp_session_unittest.cc b/pc/srtp_session_unittest.cc
index 8feceb4..0125cc1 100644
--- a/pc/srtp_session_unittest.cc
+++ b/pc/srtp_session_unittest.cc
@@ -11,6 +11,7 @@
#include "pc/srtp_session.h"
#include <string.h>
+
#include <string>
#include "media/base/fake_rtp.h"
diff --git a/pc/srtp_transport.cc b/pc/srtp_transport.cc
index 20e32f5..6306d50 100644
--- a/pc/srtp_transport.cc
+++ b/pc/srtp_transport.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <string>
#include <utility>
#include <vector>
diff --git a/pc/srtp_transport.h b/pc/srtp_transport.h
index ed92379..4bc028d 100644
--- a/pc/srtp_transport.h
+++ b/pc/srtp_transport.h
@@ -12,6 +12,7 @@
#define PC_SRTP_TRANSPORT_H_
#include <stddef.h>
+
#include <cstdint>
#include <memory>
#include <string>
diff --git a/pc/srtp_transport_unittest.cc b/pc/srtp_transport_unittest.cc
index a12d2c5..403ff7c 100644
--- a/pc/srtp_transport_unittest.cc
+++ b/pc/srtp_transport_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/srtp_transport.h"
+
#include <string.h>
+
#include <set>
#include <vector>
@@ -17,7 +20,6 @@
#include "media/base/fake_rtp.h"
#include "p2p/base/dtls_transport_internal.h"
#include "p2p/base/fake_packet_transport.h"
-#include "pc/srtp_transport.h"
#include "pc/test/rtp_transport_test_util.h"
#include "pc/test/srtp_test_util.h"
#include "rtc_base/async_packet_socket.h"
diff --git a/pc/stats_collector.h b/pc/stats_collector.h
index b3d5cb9..569f1a6 100644
--- a/pc/stats_collector.h
+++ b/pc/stats_collector.h
@@ -15,6 +15,7 @@
#define PC_STATS_COLLECTOR_H_
#include <stdint.h>
+
#include <map>
#include <memory>
#include <string>
diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc
index 6b75184..82f219e 100644
--- a/pc/stats_collector_unittest.cc
+++ b/pc/stats_collector_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/stats_collector.h"
+
#include <stdio.h>
+
#include <memory>
#include "absl/algorithm/container.h"
@@ -24,7 +27,6 @@
#include "pc/data_channel.h"
#include "pc/media_stream.h"
#include "pc/media_stream_track.h"
-#include "pc/stats_collector.h"
#include "pc/test/fake_peer_connection_for_stats.h"
#include "pc/test/fake_video_track_source.h"
#include "pc/test/mock_rtp_receiver_internal.h"
diff --git a/pc/test/fake_audio_capture_module_unittest.cc b/pc/test/fake_audio_capture_module_unittest.cc
index c8be683..8dd252a 100644
--- a/pc/test/fake_audio_capture_module_unittest.cc
+++ b/pc/test/fake_audio_capture_module_unittest.cc
@@ -11,6 +11,7 @@
#include "pc/test/fake_audio_capture_module.h"
#include <string.h>
+
#include <algorithm>
#include "api/scoped_refptr.h"
diff --git a/pc/test/frame_generator_capturer_video_track_source.h b/pc/test/frame_generator_capturer_video_track_source.h
index 229a66a..007cfc2 100644
--- a/pc/test/frame_generator_capturer_video_track_source.h
+++ b/pc/test/frame_generator_capturer_video_track_source.h
@@ -64,13 +64,9 @@
~FrameGeneratorCapturerVideoTrackSource() = default;
- void Start() {
- SetState(kLive);
- }
+ void Start() { SetState(kLive); }
- void Stop() {
- SetState(kMuted);
- }
+ void Stop() { SetState(kMuted); }
bool is_screencast() const override { return is_screencast_; }
diff --git a/pc/test/peer_connection_test_wrapper.cc b/pc/test/peer_connection_test_wrapper.cc
index c2fd338..7b278c8 100644
--- a/pc/test/peer_connection_test_wrapper.cc
+++ b/pc/test/peer_connection_test_wrapper.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/test/peer_connection_test_wrapper.h"
+
#include <stddef.h>
+
#include <string>
#include <utility>
#include <vector>
@@ -29,7 +32,6 @@
#include "pc/test/fake_periodic_video_track_source.h"
#include "pc/test/fake_rtc_certificate_generator.h"
#include "pc/test/mock_peer_connection_observers.h"
-#include "pc/test/peer_connection_test_wrapper.h"
#include "rtc_base/gunit.h"
#include "rtc_base/logging.h"
#include "rtc_base/ref_counted_object.h"
diff --git a/pc/used_ids_unittest.cc b/pc/used_ids_unittest.cc
index 43e6208..f12a093 100644
--- a/pc/used_ids_unittest.cc
+++ b/pc/used_ids_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "pc/used_ids.h"
+
#include "test/gtest.h"
using cricket::UsedIds;
diff --git a/pc/video_rtp_receiver.cc b/pc/video_rtp_receiver.cc
index 7a9ec98..a2ba3cb 100644
--- a/pc/video_rtp_receiver.cc
+++ b/pc/video_rtp_receiver.cc
@@ -11,6 +11,7 @@
#include "pc/video_rtp_receiver.h"
#include <stddef.h>
+
#include <utility>
#include <vector>
diff --git a/pc/video_rtp_receiver.h b/pc/video_rtp_receiver.h
index 10354b0..a06865f 100644
--- a/pc/video_rtp_receiver.h
+++ b/pc/video_rtp_receiver.h
@@ -12,6 +12,7 @@
#define PC_VIDEO_RTP_RECEIVER_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/pc/video_track.cc b/pc/video_track.cc
index 16e1e70..55356e7 100644
--- a/pc/video_track.cc
+++ b/pc/video_track.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/video_track.h"
+
#include <string>
#include <vector>
#include "api/notifier.h"
-#include "pc/video_track.h"
#include "rtc_base/checks.h"
#include "rtc_base/location.h"
#include "rtc_base/ref_counted_object.h"
diff --git a/pc/video_track_source.cc b/pc/video_track_source.cc
index c806ec1..f45d44a 100644
--- a/pc/video_track_source.cc
+++ b/pc/video_track_source.cc
@@ -14,8 +14,7 @@
namespace webrtc {
-VideoTrackSource::VideoTrackSource(
- bool remote)
+VideoTrackSource::VideoTrackSource(bool remote)
: state_(kInitializing), remote_(remote) {
worker_thread_checker_.Detach();
}
diff --git a/pc/video_track_unittest.cc b/pc/video_track_unittest.cc
index fc05f66..f86bec8 100644
--- a/pc/video_track_unittest.cc
+++ b/pc/video_track_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "pc/video_track.h"
+
#include <memory>
#include "media/base/fake_frame_source.h"
#include "media/base/video_common.h"
#include "pc/test/fake_video_track_renderer.h"
#include "pc/test/fake_video_track_source.h"
-#include "pc/video_track.h"
#include "pc/video_track_source.h"
#include "rtc_base/ref_counted_object.h"
#include "test/gtest.h"
diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc
index d3be4f3..2be454f 100644
--- a/pc/webrtc_sdp_unittest.cc
+++ b/pc/webrtc_sdp_unittest.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <map>
diff --git a/pc/webrtc_session_description_factory.cc b/pc/webrtc_session_description_factory.cc
index ad7a0c1..4cf1c8c 100644
--- a/pc/webrtc_session_description_factory.cc
+++ b/pc/webrtc_session_description_factory.cc
@@ -11,6 +11,7 @@
#include "pc/webrtc_session_description_factory.h"
#include <stddef.h>
+
#include <string>
#include <utility>
#include <vector>
diff --git a/pc/webrtc_session_description_factory.h b/pc/webrtc_session_description_factory.h
index b94ddbf..c707feb 100644
--- a/pc/webrtc_session_description_factory.h
+++ b/pc/webrtc_session_description_factory.h
@@ -12,6 +12,7 @@
#define PC_WEBRTC_SESSION_DESCRIPTION_FACTORY_H_
#include <stdint.h>
+
#include <memory>
#include <queue>
#include <string>
diff --git a/rtc_base/async_packet_socket.cc b/rtc_base/async_packet_socket.cc
index a708fae..a42725c 100644
--- a/rtc_base/async_packet_socket.cc
+++ b/rtc_base/async_packet_socket.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/async_packet_socket.h"
+
#include "rtc_base/net_helper.h"
namespace rtc {
diff --git a/rtc_base/async_socket.cc b/rtc_base/async_socket.cc
index ab3f99e..90e2c2a 100644
--- a/rtc_base/async_socket.cc
+++ b/rtc_base/async_socket.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/async_socket.h"
+
#include "rtc_base/checks.h"
namespace rtc {
diff --git a/rtc_base/async_tcp_socket.cc b/rtc_base/async_tcp_socket.cc
index 148e459..d03ae32 100644
--- a/rtc_base/async_tcp_socket.cc
+++ b/rtc_base/async_tcp_socket.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <algorithm>
#include <memory>
diff --git a/rtc_base/async_tcp_socket.h b/rtc_base/async_tcp_socket.h
index ae12a94..fecaba7 100644
--- a/rtc_base/async_tcp_socket.h
+++ b/rtc_base/async_tcp_socket.h
@@ -12,6 +12,7 @@
#define RTC_BASE_ASYNC_TCP_SOCKET_H_
#include <stddef.h>
+
#include <memory>
#include "rtc_base/async_packet_socket.h"
diff --git a/rtc_base/async_tcp_socket_unittest.cc b/rtc_base/async_tcp_socket_unittest.cc
index 4fa9d92..c701433 100644
--- a/rtc_base/async_tcp_socket_unittest.cc
+++ b/rtc_base/async_tcp_socket_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/async_tcp_socket.h"
+
#include <memory>
#include <string>
-#include "rtc_base/async_tcp_socket.h"
#include "rtc_base/gunit.h"
#include "rtc_base/virtual_socket_server.h"
diff --git a/rtc_base/async_udp_socket.cc b/rtc_base/async_udp_socket.cc
index 8521910..378b687 100644
--- a/rtc_base/async_udp_socket.cc
+++ b/rtc_base/async_udp_socket.cc
@@ -11,6 +11,7 @@
#include "rtc_base/async_udp_socket.h"
#include <stdint.h>
+
#include <string>
#include "rtc_base/checks.h"
diff --git a/rtc_base/async_udp_socket.h b/rtc_base/async_udp_socket.h
index 237c88d..d1f0660 100644
--- a/rtc_base/async_udp_socket.h
+++ b/rtc_base/async_udp_socket.h
@@ -12,6 +12,7 @@
#define RTC_BASE_ASYNC_UDP_SOCKET_H_
#include <stddef.h>
+
#include <memory>
#include "rtc_base/async_packet_socket.h"
diff --git a/rtc_base/async_udp_socket_unittest.cc b/rtc_base/async_udp_socket_unittest.cc
index 7ef7c86..ecb28c1 100644
--- a/rtc_base/async_udp_socket_unittest.cc
+++ b/rtc_base/async_udp_socket_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/async_udp_socket.h"
+
#include <memory>
#include <string>
-#include "rtc_base/async_udp_socket.h"
#include "rtc_base/gunit.h"
#include "rtc_base/physical_socket_server.h"
#include "rtc_base/virtual_socket_server.h"
diff --git a/rtc_base/base64_unittest.cc b/rtc_base/base64_unittest.cc
index dcc4d1b..6722a1f 100644
--- a/rtc_base/base64_unittest.cc
+++ b/rtc_base/base64_unittest.cc
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
+
#include <algorithm>
#include "rtc_base/logging.h"
diff --git a/rtc_base/bind_unittest.cc b/rtc_base/bind_unittest.cc
index a62e547..a97d2be 100644
--- a/rtc_base/bind_unittest.cc
+++ b/rtc_base/bind_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/bind.h"
+
#include <string>
-#include "rtc_base/bind.h"
#include "rtc_base/ref_count.h"
#include "rtc_base/ref_counted_object.h"
#include "test/gtest.h"
diff --git a/rtc_base/bitrate_allocation_strategy.h b/rtc_base/bitrate_allocation_strategy.h
index fc54373..def7736 100644
--- a/rtc_base/bitrate_allocation_strategy.h
+++ b/rtc_base/bitrate_allocation_strategy.h
@@ -12,6 +12,7 @@
#define RTC_BASE_BITRATE_ALLOCATION_STRATEGY_H_
#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/rtc_base/buffer.h b/rtc_base/buffer.h
index e95636a..34ef885 100644
--- a/rtc_base/buffer.h
+++ b/rtc_base/buffer.h
@@ -12,6 +12,7 @@
#define RTC_BASE_BUFFER_H_
#include <stdint.h>
+
#include <algorithm>
#include <cstring>
#include <memory>
diff --git a/rtc_base/buffer_queue.cc b/rtc_base/buffer_queue.cc
index 8f3ead9..445045c 100644
--- a/rtc_base/buffer_queue.cc
+++ b/rtc_base/buffer_queue.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
+
#include <algorithm>
namespace rtc {
diff --git a/rtc_base/buffer_queue.h b/rtc_base/buffer_queue.h
index bce3c8a..5cb18d0 100644
--- a/rtc_base/buffer_queue.h
+++ b/rtc_base/buffer_queue.h
@@ -12,6 +12,7 @@
#define RTC_BASE_BUFFER_QUEUE_H_
#include <stddef.h>
+
#include <deque>
#include <vector>
diff --git a/rtc_base/byte_buffer.h b/rtc_base/byte_buffer.h
index 73e9040..e48d708 100644
--- a/rtc_base/byte_buffer.h
+++ b/rtc_base/byte_buffer.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "rtc_base/buffer.h"
diff --git a/rtc_base/byte_order_unittest.cc b/rtc_base/byte_order_unittest.cc
index 82b5fe9..0db230f 100644
--- a/rtc_base/byte_order_unittest.cc
+++ b/rtc_base/byte_order_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/byte_order.h"
+
#include <stdint.h>
-#include "rtc_base/byte_order.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/checks.cc b/rtc_base/checks.cc
index d541307..1bddf22 100644
--- a/rtc_base/checks.cc
+++ b/rtc_base/checks.cc
@@ -164,7 +164,8 @@
} // namespace rtc
// Function to call from the C version of the RTC_CHECK and RTC_DCHECK macros.
-RTC_NORETURN void rtc_FatalMessage(const char* file, int line,
+RTC_NORETURN void rtc_FatalMessage(const char* file,
+ int line,
const char* msg) {
static constexpr rtc::webrtc_checks_impl::CheckArgType t[] = {
rtc::webrtc_checks_impl::CheckArgType::kEnd};
diff --git a/rtc_base/checks.h b/rtc_base/checks.h
index 3bfa759..627e301 100644
--- a/rtc_base/checks.h
+++ b/rtc_base/checks.h
@@ -24,7 +24,7 @@
#if defined(_MSC_VER)
#define RTC_NORETURN __declspec(noreturn)
#elif defined(__GNUC__)
-#define RTC_NORETURN __attribute__ ((__noreturn__))
+#define RTC_NORETURN __attribute__((__noreturn__))
#else
#define RTC_NORETURN
#endif
diff --git a/rtc_base/copy_on_write_buffer.h b/rtc_base/copy_on_write_buffer.h
index c7df325..c60e78b 100644
--- a/rtc_base/copy_on_write_buffer.h
+++ b/rtc_base/copy_on_write_buffer.h
@@ -12,6 +12,7 @@
#define RTC_BASE_COPY_ON_WRITE_BUFFER_H_
#include <stdint.h>
+
#include <algorithm>
#include <cstring>
#include <string>
diff --git a/rtc_base/critical_section_unittest.cc b/rtc_base/critical_section_unittest.cc
index cf9dfaf..04af949 100644
--- a/rtc_base/critical_section_unittest.cc
+++ b/rtc_base/critical_section_unittest.cc
@@ -8,8 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/critical_section.h"
+
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <set>
#include <utility>
@@ -18,7 +21,6 @@
#include "rtc_base/arraysize.h"
#include "rtc_base/atomic_ops.h"
#include "rtc_base/checks.h"
-#include "rtc_base/critical_section.h"
#include "rtc_base/event.h"
#include "rtc_base/location.h"
#include "rtc_base/message_handler.h"
diff --git a/rtc_base/event_tracer.cc b/rtc_base/event_tracer.cc
index d3f6ebf..d23af21 100644
--- a/rtc_base/event_tracer.cc
+++ b/rtc_base/event_tracer.cc
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <string>
#include <vector>
diff --git a/rtc_base/experiments/alr_experiment.cc b/rtc_base/experiments/alr_experiment.cc
index d805cb3..119a401 100644
--- a/rtc_base/experiments/alr_experiment.cc
+++ b/rtc_base/experiments/alr_experiment.cc
@@ -12,6 +12,7 @@
#include <inttypes.h>
#include <stdio.h>
+
#include <string>
#include "api/transport/field_trial_based_config.h"
diff --git a/rtc_base/experiments/balanced_degradation_settings.cc b/rtc_base/experiments/balanced_degradation_settings.cc
index 884a669..3205550 100644
--- a/rtc_base/experiments/balanced_degradation_settings.cc
+++ b/rtc_base/experiments/balanced_degradation_settings.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/experiments/balanced_degradation_settings.h"
+
#include <limits>
#include "rtc_base/experiments/field_trial_list.h"
diff --git a/rtc_base/experiments/cpu_speed_experiment.cc b/rtc_base/experiments/cpu_speed_experiment.cc
index 114c27f..6d5650a 100644
--- a/rtc_base/experiments/cpu_speed_experiment.cc
+++ b/rtc_base/experiments/cpu_speed_experiment.cc
@@ -11,6 +11,7 @@
#include "rtc_base/experiments/cpu_speed_experiment.h"
#include <stdio.h>
+
#include <string>
#include "rtc_base/logging.h"
diff --git a/rtc_base/experiments/field_trial_units.cc b/rtc_base/experiments/field_trial_units.cc
index 5311a3a..a7cd13f 100644
--- a/rtc_base/experiments/field_trial_units.cc
+++ b/rtc_base/experiments/field_trial_units.cc
@@ -10,6 +10,7 @@
#include "rtc_base/experiments/field_trial_units.h"
#include <stdio.h>
+
#include <limits>
#include <string>
diff --git a/rtc_base/experiments/field_trial_units.h b/rtc_base/experiments/field_trial_units.h
index af88f4a..353c87b 100644
--- a/rtc_base/experiments/field_trial_units.h
+++ b/rtc_base/experiments/field_trial_units.h
@@ -10,11 +10,10 @@
#ifndef RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_
#define RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_
-#include "rtc_base/experiments/field_trial_parser.h"
-
#include "api/units/data_rate.h"
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
+#include "rtc_base/experiments/field_trial_parser.h"
namespace webrtc {
extern template class FieldTrialParameter<DataRate>;
diff --git a/rtc_base/experiments/field_trial_units_unittest.cc b/rtc_base/experiments/field_trial_units_unittest.cc
index 94cbdb8..189fd10 100644
--- a/rtc_base/experiments/field_trial_units_unittest.cc
+++ b/rtc_base/experiments/field_trial_units_unittest.cc
@@ -7,11 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/experiments/field_trial_units.h"
+
#include <string>
#include "absl/types/optional.h"
#include "rtc_base/experiments/field_trial_parser.h"
-#include "rtc_base/experiments/field_trial_units.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/rtc_base/experiments/jitter_upper_bound_experiment.cc b/rtc_base/experiments/jitter_upper_bound_experiment.cc
index 84a17bf..ea95e84 100644
--- a/rtc_base/experiments/jitter_upper_bound_experiment.cc
+++ b/rtc_base/experiments/jitter_upper_bound_experiment.cc
@@ -11,6 +11,7 @@
#include "rtc_base/experiments/jitter_upper_bound_experiment.h"
#include <stdio.h>
+
#include <string>
#include "rtc_base/logging.h"
diff --git a/rtc_base/experiments/keyframe_interval_settings_unittest.cc b/rtc_base/experiments/keyframe_interval_settings_unittest.cc
index 5457dc4..7d89a4c 100644
--- a/rtc_base/experiments/keyframe_interval_settings_unittest.cc
+++ b/rtc_base/experiments/keyframe_interval_settings_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/experiments/keyframe_interval_settings.h"
+
#include "test/field_trial.h"
#include "test/gtest.h"
diff --git a/rtc_base/experiments/normalize_simulcast_size_experiment.cc b/rtc_base/experiments/normalize_simulcast_size_experiment.cc
index ddf0683..ce817a0 100644
--- a/rtc_base/experiments/normalize_simulcast_size_experiment.cc
+++ b/rtc_base/experiments/normalize_simulcast_size_experiment.cc
@@ -11,6 +11,7 @@
#include "rtc_base/experiments/normalize_simulcast_size_experiment.h"
#include <stdio.h>
+
#include <string>
#include "rtc_base/logging.h"
diff --git a/rtc_base/experiments/quality_scaling_experiment.cc b/rtc_base/experiments/quality_scaling_experiment.cc
index 4a50115..ca58ba8 100644
--- a/rtc_base/experiments/quality_scaling_experiment.cc
+++ b/rtc_base/experiments/quality_scaling_experiment.cc
@@ -10,6 +10,7 @@
#include "rtc_base/experiments/quality_scaling_experiment.h"
#include <stdio.h>
+
#include <string>
#include "rtc_base/logging.h"
diff --git a/rtc_base/experiments/rtt_mult_experiment.cc b/rtc_base/experiments/rtt_mult_experiment.cc
index ed26262..b4c9c31 100644
--- a/rtc_base/experiments/rtt_mult_experiment.cc
+++ b/rtc_base/experiments/rtt_mult_experiment.cc
@@ -10,6 +10,7 @@
#include "rtc_base/experiments/rtt_mult_experiment.h"
#include <stdio.h>
+
#include <algorithm>
#include <string>
diff --git a/rtc_base/fake_clock_unittest.cc b/rtc_base/fake_clock_unittest.cc
index 74073d0..0cabce8 100644
--- a/rtc_base/fake_clock_unittest.cc
+++ b/rtc_base/fake_clock_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "test/gtest.h"
-
#include "rtc_base/fake_clock.h"
+#include "test/gtest.h"
+
namespace rtc {
TEST(ScopedFakeClockTest, OverridesGlobalClock) {
const int64_t kFixedTimeUs = 100000;
diff --git a/rtc_base/fake_network.h b/rtc_base/fake_network.h
index 5913cc3..040b242 100644
--- a/rtc_base/fake_network.h
+++ b/rtc_base/fake_network.h
@@ -82,8 +82,8 @@
// MessageHandler interface.
void OnMessage(Message* msg) override { DoUpdateNetworks(); }
- using NetworkManagerBase::set_enumeration_permission;
using NetworkManagerBase::set_default_local_addresses;
+ using NetworkManagerBase::set_enumeration_permission;
// rtc::NetworkManager override.
webrtc::MdnsResponderInterface* GetMdnsResponder() const override {
diff --git a/rtc_base/file_rotating_stream.cc b/rtc_base/file_rotating_stream.cc
index 98e817b..826e674 100644
--- a/rtc_base/file_rotating_stream.cc
+++ b/rtc_base/file_rotating_stream.cc
@@ -16,6 +16,7 @@
#if defined(WEBRTC_WIN)
#include <windows.h>
+
#include "rtc_base/string_utils.h"
#else
#include <dirent.h>
diff --git a/rtc_base/file_rotating_stream.h b/rtc_base/file_rotating_stream.h
index 78e2983..117cf20 100644
--- a/rtc_base/file_rotating_stream.h
+++ b/rtc_base/file_rotating_stream.h
@@ -12,6 +12,7 @@
#define RTC_BASE_FILE_ROTATING_STREAM_H_
#include <stddef.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/rtc_base/file_rotating_stream_unittest.cc b/rtc_base/file_rotating_stream_unittest.cc
index 22e247f..c2ba067 100644
--- a/rtc_base/file_rotating_stream_unittest.cc
+++ b/rtc_base/file_rotating_stream_unittest.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/file_rotating_stream.h"
+
#include <string.h>
+
#include <cstdint>
#include <memory>
#include "rtc_base/arraysize.h"
-#include "rtc_base/file_rotating_stream.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/rtc_base/firewall_socket_server.cc b/rtc_base/firewall_socket_server.cc
index f73da99..6490f34 100644
--- a/rtc_base/firewall_socket_server.cc
+++ b/rtc_base/firewall_socket_server.cc
@@ -13,6 +13,7 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "absl/algorithm/container.h"
diff --git a/rtc_base/helpers.cc b/rtc_base/helpers.cc
index d8ea89f..64cab10 100644
--- a/rtc_base/helpers.cc
+++ b/rtc_base/helpers.cc
@@ -11,6 +11,7 @@
#include "rtc_base/helpers.h"
#include <openssl/rand.h>
+
#include <cstdint>
#include <limits>
#include <memory>
diff --git a/rtc_base/helpers.h b/rtc_base/helpers.h
index a93b321..29c4ab0 100644
--- a/rtc_base/helpers.h
+++ b/rtc_base/helpers.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
namespace rtc {
diff --git a/rtc_base/helpers_unittest.cc b/rtc_base/helpers_unittest.cc
index 8d8f900..b855872 100644
--- a/rtc_base/helpers_unittest.cc
+++ b/rtc_base/helpers_unittest.cc
@@ -8,11 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/helpers.h"
+
#include <string.h>
+
#include <string>
#include "rtc_base/buffer.h"
-#include "rtc_base/helpers.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/http_common.cc b/rtc_base/http_common.cc
index 10cfb3a..1dd4a20 100644
--- a/rtc_base/http_common.cc
+++ b/rtc_base/http_common.cc
@@ -21,6 +21,7 @@
#include <ctype.h> // for isspace
#include <stdio.h> // for sprintf
+
#include <utility> // for pair
#include <vector>
diff --git a/rtc_base/ifaddrs_android.cc b/rtc_base/ifaddrs_android.cc
index 94b8669..1cc63fe 100644
--- a/rtc_base/ifaddrs_android.cc
+++ b/rtc_base/ifaddrs_android.cc
@@ -10,6 +10,7 @@
#if defined(WEBRTC_ANDROID)
#include "rtc_base/ifaddrs_android.h"
+
#include <errno.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
diff --git a/rtc_base/ifaddrs_converter.cc b/rtc_base/ifaddrs_converter.cc
index 586b4e9..d963efd 100644
--- a/rtc_base/ifaddrs_converter.cc
+++ b/rtc_base/ifaddrs_converter.cc
@@ -40,7 +40,9 @@
reinterpret_cast<sockaddr_in6*>(interface->ifa_netmask)->sin6_addr);
return true;
}
- default: { return false; }
+ default: {
+ return false;
+ }
}
}
diff --git a/rtc_base/log_sinks.cc b/rtc_base/log_sinks.cc
index db12e9f..a3019b9 100644
--- a/rtc_base/log_sinks.cc
+++ b/rtc_base/log_sinks.cc
@@ -11,6 +11,7 @@
#include "rtc_base/log_sinks.h"
#include <string.h>
+
#include <cstdio>
#include <string>
diff --git a/rtc_base/log_sinks.h b/rtc_base/log_sinks.h
index 9e35748..70d0299 100644
--- a/rtc_base/log_sinks.h
+++ b/rtc_base/log_sinks.h
@@ -12,6 +12,7 @@
#define RTC_BASE_LOG_SINKS_H_
#include <stddef.h>
+
#include <memory>
#include <string>
diff --git a/rtc_base/logging.cc b/rtc_base/logging.cc
index b842b38..a4aea28 100644
--- a/rtc_base/logging.cc
+++ b/rtc_base/logging.cc
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
+
#include <algorithm>
#include <cstdarg>
#include <vector>
diff --git a/rtc_base/logging.h b/rtc_base/logging.h
index 7931daa..17c6c24b 100644
--- a/rtc_base/logging.h
+++ b/rtc_base/logging.h
@@ -91,12 +91,12 @@
// LogErrorContext assists in interpreting the meaning of an error value.
enum LogErrorContext {
ERRCTX_NONE,
- ERRCTX_ERRNO, // System-local errno
- ERRCTX_HRESULT, // Windows HRESULT
+ ERRCTX_ERRNO, // System-local errno
+ ERRCTX_HRESULT, // Windows HRESULT
// Abbreviations for LOG_E macro
- ERRCTX_EN = ERRCTX_ERRNO, // LOG_E(sev, EN, x)
- ERRCTX_HR = ERRCTX_HRESULT, // LOG_E(sev, HR, x)
+ ERRCTX_EN = ERRCTX_ERRNO, // LOG_E(sev, EN, x)
+ ERRCTX_HR = ERRCTX_HRESULT, // LOG_E(sev, HR, x)
};
// Virtual sink interface that can receive log messages.
@@ -541,12 +541,12 @@
return (LogMessage::GetMinLogSeverity() <= sev);
}
-#define RTC_LOG_E(sev, ctx, err) \
- rtc::webrtc_logging_impl::LogCall() & \
- rtc::webrtc_logging_impl::LogStreamer<>() \
- << rtc::webrtc_logging_impl::LogMetadataErr { \
- {__FILE__, __LINE__, rtc::sev}, rtc::ERRCTX_##ctx, (err) \
- }
+#define RTC_LOG_E(sev, ctx, err) \
+ rtc::webrtc_logging_impl::LogCall() & \
+ rtc::webrtc_logging_impl::LogStreamer<>() \
+ << rtc::webrtc_logging_impl::LogMetadataErr { \
+ {__FILE__, __LINE__, rtc::sev}, rtc::ERRCTX_##ctx, (err) \
+ }
#define RTC_LOG_T(sev) RTC_LOG(sev) << this << ": "
@@ -578,12 +578,12 @@
}
} // namespace webrtc_logging_impl
-#define RTC_LOG_TAG(sev, tag) \
- rtc::webrtc_logging_impl::LogCall() & \
- rtc::webrtc_logging_impl::LogStreamer<>() \
- << rtc::webrtc_logging_impl::LogMetadataTag { \
- sev, rtc::webrtc_logging_impl::AdaptString(tag) \
- }
+#define RTC_LOG_TAG(sev, tag) \
+ rtc::webrtc_logging_impl::LogCall() & \
+ rtc::webrtc_logging_impl::LogStreamer<>() \
+ << rtc::webrtc_logging_impl::LogMetadataTag { \
+ sev, rtc::webrtc_logging_impl::AdaptString(tag) \
+ }
#else
diff --git a/rtc_base/logging_unittest.cc b/rtc_base/logging_unittest.cc
index 54f6549..637d2e0 100644
--- a/rtc_base/logging_unittest.cc
+++ b/rtc_base/logging_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/logging.h"
#include <string.h>
+
#include <algorithm>
#include "rtc_base/arraysize.h"
diff --git a/rtc_base/mac_ifaddrs_converter.cc b/rtc_base/mac_ifaddrs_converter.cc
index 254be9b..eb82cf2 100644
--- a/rtc_base/mac_ifaddrs_converter.cc
+++ b/rtc_base/mac_ifaddrs_converter.cc
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include <net/if.h>
#include <sys/ioctl.h>
#include <unistd.h>
+#include <memory>
+
#include "rtc_base/checks.h"
#include "rtc_base/ifaddrs_converter.h"
#include "rtc_base/logging.h"
diff --git a/rtc_base/mac_utils.cc b/rtc_base/mac_utils.cc
index 390f183..d2428b4 100644
--- a/rtc_base/mac_utils.cc
+++ b/rtc_base/mac_utils.cc
@@ -8,14 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <cstring>
-#include <memory>
+#include "rtc_base/mac_utils.h"
#include <sys/utsname.h>
+#include <cstring>
+#include <memory>
+
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/mac_utils.h"
namespace rtc {
diff --git a/rtc_base/mac_utils.h b/rtc_base/mac_utils.h
index ae97c3a..5f5b836 100644
--- a/rtc_base/mac_utils.h
+++ b/rtc_base/mac_utils.h
@@ -12,6 +12,7 @@
#define RTC_BASE_MAC_UTILS_H_
#include <CoreFoundation/CoreFoundation.h>
+
#include <string>
namespace rtc {
diff --git a/rtc_base/memory/aligned_malloc.cc b/rtc_base/memory/aligned_malloc.cc
index 5de8dab..b00fab2 100644
--- a/rtc_base/memory/aligned_malloc.cc
+++ b/rtc_base/memory/aligned_malloc.cc
@@ -10,11 +10,11 @@
#include "rtc_base/memory/aligned_malloc.h"
-#include "rtc_base/checks.h"
-
#include <stdlib.h> // for free, malloc
#include <string.h> // for memcpy
+#include "rtc_base/checks.h"
+
#ifdef _WIN32
#include <windows.h>
#else
diff --git a/rtc_base/memory/fifo_buffer_unittest.cc b/rtc_base/memory/fifo_buffer_unittest.cc
index c2926b3..14cb4a5 100644
--- a/rtc_base/memory/fifo_buffer_unittest.cc
+++ b/rtc_base/memory/fifo_buffer_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/memory/fifo_buffer.h"
+
#include <string.h>
-#include "rtc_base/memory/fifo_buffer.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/memory_stream.cc b/rtc_base/memory_stream.cc
index a30aacd..ed9c14a 100644
--- a/rtc_base/memory_stream.cc
+++ b/rtc_base/memory_stream.cc
@@ -8,12 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/memory_stream.h"
+
#include <errno.h>
#include <string.h>
+
#include <algorithm>
#include "rtc_base/checks.h"
-#include "rtc_base/memory_stream.h"
namespace rtc {
diff --git a/rtc_base/memory_usage.cc b/rtc_base/memory_usage.cc
index 20db9f3..4284e4f 100644
--- a/rtc_base/memory_usage.cc
+++ b/rtc_base/memory_usage.cc
@@ -12,6 +12,7 @@
#if defined(WEBRTC_LINUX)
#include <unistd.h>
+
#include <cstdio>
#elif defined(WEBRTC_MAC)
#include <mach/mach.h>
diff --git a/rtc_base/message_digest.cc b/rtc_base/message_digest.cc
index b1d4a48..62b4a6b 100644
--- a/rtc_base/message_digest.cc
+++ b/rtc_base/message_digest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/message_digest.h"
#include <string.h>
+
#include <cstdint>
#include <memory>
diff --git a/rtc_base/message_digest.h b/rtc_base/message_digest.h
index bbb22cf..36f00b5 100644
--- a/rtc_base/message_digest.h
+++ b/rtc_base/message_digest.h
@@ -12,6 +12,7 @@
#define RTC_BASE_MESSAGE_DIGEST_H_
#include <stddef.h>
+
#include <string>
namespace rtc {
diff --git a/rtc_base/message_handler.cc b/rtc_base/message_handler.cc
index 0e6c237..dd86e59 100644
--- a/rtc_base/message_handler.cc
+++ b/rtc_base/message_handler.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/message_handler.h"
+
#include "rtc_base/message_queue.h"
namespace rtc {
diff --git a/rtc_base/message_queue.cc b/rtc_base/message_queue.cc
index f827db4..ffa8a56 100644
--- a/rtc_base/message_queue.cc
+++ b/rtc_base/message_queue.cc
@@ -7,6 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/message_queue.h"
+
#include <string>
#include <utility>
@@ -14,7 +16,6 @@
#include "rtc_base/atomic_ops.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/message_queue.h"
#include "rtc_base/thread.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
diff --git a/rtc_base/nat_server.cc b/rtc_base/nat_server.cc
index 2b614e8..323a787 100644
--- a/rtc_base/nat_server.cc
+++ b/rtc_base/nat_server.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/nat_server.h"
+
#include <memory>
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/nat_server.h"
#include "rtc_base/nat_socket_factory.h"
#include "rtc_base/socket_adapters.h"
diff --git a/rtc_base/nat_socket_factory.h b/rtc_base/nat_socket_factory.h
index 9b5cb5a..bbc109e 100644
--- a/rtc_base/nat_socket_factory.h
+++ b/rtc_base/nat_socket_factory.h
@@ -12,6 +12,7 @@
#define RTC_BASE_NAT_SOCKET_FACTORY_H_
#include <stddef.h>
+
#include <map>
#include <memory>
#include <set>
diff --git a/rtc_base/nat_unittest.cc b/rtc_base/nat_unittest.cc
index 79f6ea2..374e68c 100644
--- a/rtc_base/nat_unittest.cc
+++ b/rtc_base/nat_unittest.cc
@@ -9,6 +9,7 @@
*/
#include <string.h>
+
#include <algorithm>
#include <memory>
#include <string>
diff --git a/rtc_base/net_helpers.cc b/rtc_base/net_helpers.cc
index c662f1a..6ff3791 100644
--- a/rtc_base/net_helpers.cc
+++ b/rtc_base/net_helpers.cc
@@ -15,6 +15,7 @@
#if defined(WEBRTC_WIN)
#include <ws2spi.h>
#include <ws2tcpip.h>
+
#include "rtc_base/win32.h"
#endif
#if defined(WEBRTC_POSIX) && !defined(__native_client__)
diff --git a/rtc_base/network.cc b/rtc_base/network.cc
index 6dddbc0..4670ab0 100644
--- a/rtc_base/network.cc
+++ b/rtc_base/network.cc
@@ -24,6 +24,7 @@
#if defined(WEBRTC_WIN)
#include <iphlpapi.h>
+
#include "rtc_base/win32.h"
#elif !defined(__native_client__)
#include "rtc_base/ifaddrs_converter.h"
diff --git a/rtc_base/network_unittest.cc b/rtc_base/network_unittest.cc
index b35b9f4..d07feb6 100644
--- a/rtc_base/network_unittest.cc
+++ b/rtc_base/network_unittest.cc
@@ -21,6 +21,7 @@
#if defined(WEBRTC_POSIX)
#include <net/if.h>
#include <sys/types.h>
+
#include "rtc_base/ifaddrs_converter.h"
#endif // defined(WEBRTC_POSIX)
#include "rtc_base/gunit.h"
diff --git a/rtc_base/null_socket_server.cc b/rtc_base/null_socket_server.cc
index b2071e3..a7ee4f9 100644
--- a/rtc_base/null_socket_server.cc
+++ b/rtc_base/null_socket_server.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/null_socket_server.h"
+
#include "rtc_base/checks.h"
namespace rtc {
diff --git a/rtc_base/null_socket_server_unittest.cc b/rtc_base/null_socket_server_unittest.cc
index 961ab6a..62c95a4 100644
--- a/rtc_base/null_socket_server_unittest.cc
+++ b/rtc_base/null_socket_server_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/null_socket_server.h"
#include <stdint.h>
+
#include <memory>
#include "rtc_base/gunit.h"
diff --git a/rtc_base/numerics/exp_filter_unittest.cc b/rtc_base/numerics/exp_filter_unittest.cc
index 46f01c8..f5b436f 100644
--- a/rtc_base/numerics/exp_filter_unittest.cc
+++ b/rtc_base/numerics/exp_filter_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/exp_filter.h"
+
#include <cmath>
-#include "rtc_base/numerics/exp_filter.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/numerics/histogram_percentile_counter.h b/rtc_base/numerics/histogram_percentile_counter.h
index f52513c..a708c2da 100644
--- a/rtc_base/numerics/histogram_percentile_counter.h
+++ b/rtc_base/numerics/histogram_percentile_counter.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/rtc_base/numerics/moving_average.h b/rtc_base/numerics/moving_average.h
index 1ae26ff..dfaf6ce 100644
--- a/rtc_base/numerics/moving_average.h
+++ b/rtc_base/numerics/moving_average.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <vector>
#include "absl/types/optional.h"
diff --git a/rtc_base/numerics/moving_max_counter_unittest.cc b/rtc_base/numerics/moving_max_counter_unittest.cc
index 4e74d6d..0e3195f 100644
--- a/rtc_base/numerics/moving_max_counter_unittest.cc
+++ b/rtc_base/numerics/moving_max_counter_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/numerics/moving_max_counter.h"
+
#include "test/gtest.h"
TEST(MovingMaxCounter, ReportsMaximumInTheWindow) {
diff --git a/rtc_base/numerics/moving_median_filter.h b/rtc_base/numerics/moving_median_filter.h
index b4d8741..723679e 100644
--- a/rtc_base/numerics/moving_median_filter.h
+++ b/rtc_base/numerics/moving_median_filter.h
@@ -12,6 +12,7 @@
#define RTC_BASE_NUMERICS_MOVING_MEDIAN_FILTER_H_
#include <stddef.h>
+
#include <list>
#include "rtc_base/checks.h"
diff --git a/rtc_base/numerics/percentile_filter.h b/rtc_base/numerics/percentile_filter.h
index 4781963..cba4463 100644
--- a/rtc_base/numerics/percentile_filter.h
+++ b/rtc_base/numerics/percentile_filter.h
@@ -12,6 +12,7 @@
#define RTC_BASE_NUMERICS_PERCENTILE_FILTER_H_
#include <stdint.h>
+
#include <iterator>
#include <set>
diff --git a/rtc_base/numerics/percentile_filter_unittest.cc b/rtc_base/numerics/percentile_filter_unittest.cc
index 456cb4c..2655cc2 100644
--- a/rtc_base/numerics/percentile_filter_unittest.cc
+++ b/rtc_base/numerics/percentile_filter_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/percentile_filter.h"
+
#include <stdlib.h>
+
#include <array>
#include <climits>
#include <cstdint>
@@ -16,7 +19,6 @@
#include "absl/algorithm/container.h"
#include "rtc_base/constructor_magic.h"
-#include "rtc_base/numerics/percentile_filter.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/rtc_base/numerics/running_statistics.h b/rtc_base/numerics/running_statistics.h
index f3aa8e3..4a3516d3 100644
--- a/rtc_base/numerics/running_statistics.h
+++ b/rtc_base/numerics/running_statistics.h
@@ -16,7 +16,6 @@
#include <limits>
#include "absl/types/optional.h"
-
#include "rtc_base/checks.h"
#include "rtc_base/numerics/math_utils.h"
diff --git a/rtc_base/numerics/running_statistics_unittest.cc b/rtc_base/numerics/running_statistics_unittest.cc
index d77280a..8ef30f1 100644
--- a/rtc_base/numerics/running_statistics_unittest.cc
+++ b/rtc_base/numerics/running_statistics_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/numerics/running_statistics.h"
#include <math.h>
+
#include <random>
#include <vector>
diff --git a/rtc_base/numerics/safe_compare_unittest.cc b/rtc_base/numerics/safe_compare_unittest.cc
index e7a251f..92bde68 100644
--- a/rtc_base/numerics/safe_compare_unittest.cc
+++ b/rtc_base/numerics/safe_compare_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/safe_compare.h"
+
#include <limits>
-#include "rtc_base/numerics/safe_compare.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/numerics/safe_minmax_unittest.cc b/rtc_base/numerics/safe_minmax_unittest.cc
index 72d23b6..c52b3f9 100644
--- a/rtc_base/numerics/safe_minmax_unittest.cc
+++ b/rtc_base/numerics/safe_minmax_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/safe_minmax.h"
+
#include <algorithm>
#include <limits>
-#include "rtc_base/numerics/safe_minmax.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/numerics/sample_counter.cc b/rtc_base/numerics/sample_counter.cc
index 7f76b74..16a8e25 100644
--- a/rtc_base/numerics/sample_counter.cc
+++ b/rtc_base/numerics/sample_counter.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/sample_counter.h"
+
#include <limits>
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
-#include "rtc_base/numerics/sample_counter.h"
namespace rtc {
diff --git a/rtc_base/numerics/samples_stats_counter_unittest.cc b/rtc_base/numerics/samples_stats_counter_unittest.cc
index 7760b42..a20a3d9 100644
--- a/rtc_base/numerics/samples_stats_counter_unittest.cc
+++ b/rtc_base/numerics/samples_stats_counter_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/numerics/samples_stats_counter.h"
#include <math.h>
+
#include <random>
#include <vector>
diff --git a/rtc_base/numerics/sequence_number_util.h b/rtc_base/numerics/sequence_number_util.h
index 57efb51..96a4974 100644
--- a/rtc_base/numerics/sequence_number_util.h
+++ b/rtc_base/numerics/sequence_number_util.h
@@ -12,6 +12,7 @@
#define RTC_BASE_NUMERICS_SEQUENCE_NUMBER_UTIL_H_
#include <stdint.h>
+
#include <limits>
#include <type_traits>
diff --git a/rtc_base/numerics/sequence_number_util_unittest.cc b/rtc_base/numerics/sequence_number_util_unittest.cc
index 09a4514..d7fa0b1 100644
--- a/rtc_base/numerics/sequence_number_util_unittest.cc
+++ b/rtc_base/numerics/sequence_number_util_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/numerics/sequence_number_util.h"
+
#include <cstdint>
#include <iterator>
#include <set>
-#include "rtc_base/numerics/sequence_number_util.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/rtc_base/openssl_adapter.cc b/rtc_base/openssl_adapter.cc
index 388b9a0..2c93118 100644
--- a/rtc_base/openssl_adapter.cc
+++ b/rtc_base/openssl_adapter.cc
@@ -11,13 +11,10 @@
#include "rtc_base/openssl_adapter.h"
#include <errno.h>
-
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/x509.h>
-#include "rtc_base/openssl.h"
-
#include <string.h>
#include <time.h>
@@ -26,6 +23,7 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
+#include "rtc_base/openssl.h"
#include "rtc_base/openssl_certificate.h"
#include "rtc_base/openssl_utility.h"
#include "rtc_base/string_encode.h"
diff --git a/rtc_base/openssl_adapter.h b/rtc_base/openssl_adapter.h
index 7219671..26b58be 100644
--- a/rtc_base/openssl_adapter.h
+++ b/rtc_base/openssl_adapter.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/rtc_base/openssl_adapter_unittest.cc b/rtc_base/openssl_adapter_unittest.cc
index 2b171e6..77603e0 100644
--- a/rtc_base/openssl_adapter_unittest.cc
+++ b/rtc_base/openssl_adapter_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/openssl_adapter.h"
+
#include <sstream>
#include <string>
#include <vector>
@@ -15,7 +17,6 @@
#include "absl/memory/memory.h"
#include "rtc_base/async_socket.h"
#include "rtc_base/gunit.h"
-#include "rtc_base/openssl_adapter.h"
#include "test/gmock.h"
namespace rtc {
diff --git a/rtc_base/openssl_certificate.h b/rtc_base/openssl_certificate.h
index 9b61eee..c317a72 100644
--- a/rtc_base/openssl_certificate.h
+++ b/rtc_base/openssl_certificate.h
@@ -12,9 +12,9 @@
#define RTC_BASE_OPENSSL_CERTIFICATE_H_
#include <openssl/ossl_typ.h>
-
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "rtc_base/buffer.h"
diff --git a/rtc_base/openssl_digest.h b/rtc_base/openssl_digest.h
index ee39eb8..7fcb71c 100644
--- a/rtc_base/openssl_digest.h
+++ b/rtc_base/openssl_digest.h
@@ -13,6 +13,7 @@
#include <openssl/ossl_typ.h>
#include <stddef.h>
+
#include <string>
#include "rtc_base/message_digest.h"
diff --git a/rtc_base/openssl_identity.cc b/rtc_base/openssl_identity.cc
index 531c971..81357a8 100644
--- a/rtc_base/openssl_identity.cc
+++ b/rtc_base/openssl_identity.cc
@@ -24,7 +24,6 @@
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
-
#include <stdint.h>
#include "absl/memory/memory.h"
diff --git a/rtc_base/openssl_session_cache.cc b/rtc_base/openssl_session_cache.cc
index 270abe8..f8fcd47 100644
--- a/rtc_base/openssl_session_cache.cc
+++ b/rtc_base/openssl_session_cache.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/openssl_session_cache.h"
+
#include "rtc_base/checks.h"
#include "rtc_base/openssl.h"
diff --git a/rtc_base/openssl_session_cache.h b/rtc_base/openssl_session_cache.h
index e53e41a..b049e64 100644
--- a/rtc_base/openssl_session_cache.h
+++ b/rtc_base/openssl_session_cache.h
@@ -12,6 +12,7 @@
#define RTC_BASE_OPENSSL_SESSION_CACHE_H_
#include <openssl/ossl_typ.h>
+
#include <map>
#include <string>
diff --git a/rtc_base/openssl_session_cache_unittest.cc b/rtc_base/openssl_session_cache_unittest.cc
index 366fc26..1d3084b 100644
--- a/rtc_base/openssl_session_cache_unittest.cc
+++ b/rtc_base/openssl_session_cache_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/openssl_session_cache.h"
+
#include <openssl/ssl.h>
#include <stdlib.h>
@@ -16,7 +18,6 @@
#include "rtc_base/gunit.h"
#include "rtc_base/openssl.h"
-#include "rtc_base/openssl_session_cache.h"
namespace rtc {
diff --git a/rtc_base/openssl_stream_adapter.h b/rtc_base/openssl_stream_adapter.h
index 40d1779..5d99e32 100644
--- a/rtc_base/openssl_stream_adapter.h
+++ b/rtc_base/openssl_stream_adapter.h
@@ -12,9 +12,9 @@
#define RTC_BASE_OPENSSL_STREAM_ADAPTER_H_
#include <openssl/ossl_typ.h>
-
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/rtc_base/openssl_utility.cc b/rtc_base/openssl_utility.cc
index 9749912..1984eb0 100644
--- a/rtc_base/openssl_utility.cc
+++ b/rtc_base/openssl_utility.cc
@@ -17,13 +17,12 @@
#include <openssl/err.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "rtc_base/openssl.h"
-
#include <stddef.h>
#include "rtc_base/arraysize.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
+#include "rtc_base/openssl.h"
#include "rtc_base/openssl_certificate.h"
#ifndef WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS
#include "rtc_base/ssl_roots.h"
diff --git a/rtc_base/openssl_utility.h b/rtc_base/openssl_utility.h
index a2e49df..022294d 100644
--- a/rtc_base/openssl_utility.h
+++ b/rtc_base/openssl_utility.h
@@ -12,6 +12,7 @@
#define RTC_BASE_OPENSSL_UTILITY_H_
#include <openssl/ossl_typ.h>
+
#include <string>
namespace rtc {
diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc
index c38d7fd..c1d6d26 100644
--- a/rtc_base/physical_socket_server.cc
+++ b/rtc_base/physical_socket_server.cc
@@ -323,7 +323,7 @@
#else
0
#endif
- );
+ );
UpdateLastError();
MaybeRemapSendError();
// We have seen minidumps where this may be false.
diff --git a/rtc_base/physical_socket_server_unittest.cc b/rtc_base/physical_socket_server_unittest.cc
index 3987a59..5083ca1 100644
--- a/rtc_base/physical_socket_server_unittest.cc
+++ b/rtc_base/physical_socket_server_unittest.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/physical_socket_server.h"
+
#include <signal.h>
+
#include <algorithm>
#include <memory>
@@ -16,7 +19,6 @@
#include "rtc_base/ip_address.h"
#include "rtc_base/logging.h"
#include "rtc_base/network_monitor.h"
-#include "rtc_base/physical_socket_server.h"
#include "rtc_base/socket_unittest.h"
#include "rtc_base/test_utils.h"
#include "rtc_base/thread.h"
diff --git a/rtc_base/platform_file.h b/rtc_base/platform_file.h
index 52fbaff..303d9f5 100644
--- a/rtc_base/platform_file.h
+++ b/rtc_base/platform_file.h
@@ -12,6 +12,7 @@
#define RTC_BASE_PLATFORM_FILE_H_
#include <stdio.h>
+
#include <string>
#if defined(WEBRTC_WIN)
diff --git a/rtc_base/platform_file_unittest.cc b/rtc_base/platform_file_unittest.cc
index 396286a..26cf6a1 100644
--- a/rtc_base/platform_file_unittest.cc
+++ b/rtc_base/platform_file_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/platform_file.h"
+
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/rtc_base/platform_thread.cc b/rtc_base/platform_thread.cc
index cb5eb8b..8a5f2c9 100644
--- a/rtc_base/platform_thread.cc
+++ b/rtc_base/platform_thread.cc
@@ -15,6 +15,7 @@
#endif
#include <stdint.h>
#include <time.h>
+
#include <algorithm>
#include "rtc_base/checks.h"
@@ -29,7 +30,7 @@
pthread_attr_t attr;
};
#endif // defined(WEBRTC_WIN)
-}
+} // namespace
PlatformThread::PlatformThread(ThreadRunFunction func,
void* obj,
diff --git a/rtc_base/proxy_info.h b/rtc_base/proxy_info.h
index 6fded09..e614692 100644
--- a/rtc_base/proxy_info.h
+++ b/rtc_base/proxy_info.h
@@ -12,6 +12,7 @@
#define RTC_BASE_PROXY_INFO_H_
#include <string>
+
#include "rtc_base/crypt_string.h"
#include "rtc_base/socket_address.h"
diff --git a/rtc_base/proxy_unittest.cc b/rtc_base/proxy_unittest.cc
index 59d637a..d73d9de 100644
--- a/rtc_base/proxy_unittest.cc
+++ b/rtc_base/proxy_unittest.cc
@@ -10,6 +10,7 @@
#include <memory>
#include <string>
+
#include "rtc_base/gunit.h"
#include "rtc_base/proxy_server.h"
#include "rtc_base/socket_adapters.h"
diff --git a/rtc_base/random.h b/rtc_base/random.h
index 31de6e1..93241a3 100644
--- a/rtc_base/random.h
+++ b/rtc_base/random.h
@@ -12,6 +12,7 @@
#define RTC_BASE_RANDOM_H_
#include <stdint.h>
+
#include <limits>
#include "rtc_base/checks.h"
diff --git a/rtc_base/random_unittest.cc b/rtc_base/random_unittest.cc
index 8f32657..f94b0c1 100644
--- a/rtc_base/random_unittest.cc
+++ b/rtc_base/random_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/random.h"
+
#include <math.h>
#include <limits>
#include <vector>
#include "rtc_base/numerics/math_utils.h" // unsigned difference
-#include "rtc_base/random.h"
#include "test/gtest.h"
namespace webrtc {
diff --git a/rtc_base/rate_limiter_unittest.cc b/rtc_base/rate_limiter_unittest.cc
index cb9b5b4..8ebf8aa 100644
--- a/rtc_base/rate_limiter_unittest.cc
+++ b/rtc_base/rate_limiter_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/rate_limiter.h"
+
#include <memory>
#include "rtc_base/event.h"
#include "rtc_base/platform_thread.h"
-#include "rtc_base/rate_limiter.h"
#include "system_wrappers/include/clock.h"
#include "test/gtest.h"
diff --git a/rtc_base/rate_statistics.h b/rtc_base/rate_statistics.h
index d4ccc59..a423654 100644
--- a/rtc_base/rate_statistics.h
+++ b/rtc_base/rate_statistics.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include "absl/types/optional.h"
diff --git a/rtc_base/rate_statistics_unittest.cc b/rtc_base/rate_statistics_unittest.cc
index 822767e..9dd8232 100644
--- a/rtc_base/rate_statistics_unittest.cc
+++ b/rtc_base/rate_statistics_unittest.cc
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/rate_statistics.h"
+
#include <cstdlib>
-#include "rtc_base/rate_statistics.h"
#include "test/gtest.h"
namespace {
diff --git a/rtc_base/ref_counted_object_unittest.cc b/rtc_base/ref_counted_object_unittest.cc
index 00a9295..eacf731 100644
--- a/rtc_base/ref_counted_object_unittest.cc
+++ b/rtc_base/ref_counted_object_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/ref_counted_object.h"
+
#include <memory>
#include <string>
#include <utility>
#include "api/scoped_refptr.h"
#include "rtc_base/ref_count.h"
-#include "rtc_base/ref_counted_object.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/rolling_accumulator.h b/rtc_base/rolling_accumulator.h
index b630554..015229b 100644
--- a/rtc_base/rolling_accumulator.h
+++ b/rtc_base/rolling_accumulator.h
@@ -12,6 +12,7 @@
#define RTC_BASE_ROLLING_ACCUMULATOR_H_
#include <stddef.h>
+
#include <algorithm>
#include <vector>
diff --git a/rtc_base/rolling_accumulator_unittest.cc b/rtc_base/rolling_accumulator_unittest.cc
index f6835aa..83013ca 100644
--- a/rtc_base/rolling_accumulator_unittest.cc
+++ b/rtc_base/rolling_accumulator_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <random>
-
#include "rtc_base/rolling_accumulator.h"
+#include <random>
+
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/rtc_certificate.cc b/rtc_base/rtc_certificate.cc
index 46f6c31..1edc393 100644
--- a/rtc_base/rtc_certificate.cc
+++ b/rtc_base/rtc_certificate.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <memory>
-
#include "rtc_base/rtc_certificate.h"
+#include <memory>
+
#include "rtc_base/checks.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/ssl_certificate.h"
diff --git a/rtc_base/rtc_certificate.h b/rtc_base/rtc_certificate.h
index d98c4ea..0a744c4 100644
--- a/rtc_base/rtc_certificate.h
+++ b/rtc_base/rtc_certificate.h
@@ -12,6 +12,7 @@
#define RTC_BASE_RTC_CERTIFICATE_H_
#include <stdint.h>
+
#include <memory>
#include <string>
diff --git a/rtc_base/rtc_certificate_generator.cc b/rtc_base/rtc_certificate_generator.cc
index 08cd19946..2a84fbd 100644
--- a/rtc_base/rtc_certificate_generator.cc
+++ b/rtc_base/rtc_certificate_generator.cc
@@ -11,6 +11,7 @@
#include "rtc_base/rtc_certificate_generator.h"
#include <time.h>
+
#include <algorithm>
#include <memory>
#include <utility>
diff --git a/rtc_base/rtc_certificate_unittest.cc b/rtc_base/rtc_certificate_unittest.cc
index 62e9e2c..1150eee 100644
--- a/rtc_base/rtc_certificate_unittest.cc
+++ b/rtc_base/rtc_certificate_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/rtc_certificate.h"
+
#include <time.h>
+
#include <memory>
#include <utility>
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
-#include "rtc_base/rtc_certificate.h"
#include "rtc_base/ssl_identity.h"
#include "rtc_base/time_utils.h"
#include "test/gtest.h"
diff --git a/rtc_base/server_socket_adapters.cc b/rtc_base/server_socket_adapters.cc
index 887ca87..ebe420c 100644
--- a/rtc_base/server_socket_adapters.cc
+++ b/rtc_base/server_socket_adapters.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/server_socket_adapters.h"
+
#include <string>
#include "rtc_base/byte_buffer.h"
-#include "rtc_base/server_socket_adapters.h"
namespace rtc {
diff --git a/rtc_base/signal_thread_unittest.cc b/rtc_base/signal_thread_unittest.cc
index f03991b..d9304d4 100644
--- a/rtc_base/signal_thread_unittest.cc
+++ b/rtc_base/signal_thread_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/signal_thread.h"
+
#include <memory>
#include "absl/memory/memory.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/gunit.h"
#include "rtc_base/null_socket_server.h"
-#include "rtc_base/signal_thread.h"
#include "rtc_base/thread.h"
#include "test/gtest.h"
diff --git a/rtc_base/socket.cc b/rtc_base/socket.cc
index f19b344..bcd62ad 100644
--- a/rtc_base/socket.cc
+++ b/rtc_base/socket.cc
@@ -10,6 +10,4 @@
#include "rtc_base/socket.h"
-namespace rtc {
-
-} // namespace rtc
+namespace rtc {} // namespace rtc
diff --git a/rtc_base/socket_address.cc b/rtc_base/socket_address.cc
index 3b22a05..3ea045e 100644
--- a/rtc_base/socket_address.cc
+++ b/rtc_base/socket_address.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/socket_address.h"
+
#include "rtc_base/numerics/safe_conversions.h"
#if defined(WEBRTC_POSIX)
diff --git a/rtc_base/socket_server.h b/rtc_base/socket_server.h
index 348d099..2b49524 100644
--- a/rtc_base/socket_server.h
+++ b/rtc_base/socket_server.h
@@ -12,6 +12,7 @@
#define RTC_BASE_SOCKET_SERVER_H_
#include <memory>
+
#include "rtc_base/socket_factory.h"
namespace rtc {
diff --git a/rtc_base/socket_unittest.cc b/rtc_base/socket_unittest.cc
index 3166ec7..7d91cbe 100644
--- a/rtc_base/socket_unittest.cc
+++ b/rtc_base/socket_unittest.cc
@@ -8,9 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/socket.h"
+
#include <errno.h>
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include "absl/memory/memory.h"
@@ -25,7 +28,6 @@
#include "rtc_base/message_handler.h"
#include "rtc_base/message_queue.h"
#include "rtc_base/net_helpers.h"
-#include "rtc_base/socket.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/socket_server.h"
#include "rtc_base/socket_unittest.h"
diff --git a/rtc_base/stream.cc b/rtc_base/stream.cc
index 98fd175..ec75b61 100644
--- a/rtc_base/stream.cc
+++ b/rtc_base/stream.cc
@@ -7,15 +7,17 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/stream.h"
+
#include <errno.h>
#include <string.h>
+
#include <algorithm>
#include <string>
#include "rtc_base/checks.h"
#include "rtc_base/location.h"
#include "rtc_base/message_queue.h"
-#include "rtc_base/stream.h"
#include "rtc_base/thread.h"
namespace rtc {
@@ -130,5 +132,4 @@
SignalEvent(this, events, err);
}
-
} // namespace rtc
diff --git a/rtc_base/string_encode.h b/rtc_base/string_encode.h
index 2ea09e2..c1401b9 100644
--- a/rtc_base/string_encode.h
+++ b/rtc_base/string_encode.h
@@ -12,6 +12,7 @@
#define RTC_BASE_STRING_ENCODE_H_
#include <stddef.h>
+
#include <string>
#include <type_traits>
#include <vector>
diff --git a/rtc_base/string_encode_unittest.cc b/rtc_base/string_encode_unittest.cc
index 4854299..19d293b 100644
--- a/rtc_base/string_encode_unittest.cc
+++ b/rtc_base/string_encode_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/string_encode.h"
#include <string.h>
+
#include <sstream> // no-presubmit-check TODO(webrtc:8982)
#include "test/gtest.h"
diff --git a/rtc_base/string_to_number.cc b/rtc_base/string_to_number.cc
index 634652b..351610f 100644
--- a/rtc_base/string_to_number.cc
+++ b/rtc_base/string_to_number.cc
@@ -11,6 +11,7 @@
#include "rtc_base/string_to_number.h"
#include <ctype.h>
+
#include <cerrno>
#include <cstdlib>
diff --git a/rtc_base/string_to_number_unittest.cc b/rtc_base/string_to_number_unittest.cc
index 2c2dfcc..f460b15 100644
--- a/rtc_base/string_to_number_unittest.cc
+++ b/rtc_base/string_to_number_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_base/string_to_number.h"
#include <stdint.h>
+
#include <limits>
#include <string>
diff --git a/rtc_base/strings/string_builder.cc b/rtc_base/strings/string_builder.cc
index a204e52..caa931b 100644
--- a/rtc_base/strings/string_builder.cc
+++ b/rtc_base/strings/string_builder.cc
@@ -11,6 +11,7 @@
#include "rtc_base/strings/string_builder.h"
#include <stdarg.h>
+
#include <cstdio>
#include <cstring>
diff --git a/rtc_base/swap_queue.h b/rtc_base/swap_queue.h
index 8dd2a28..8914548 100644
--- a/rtc_base/swap_queue.h
+++ b/rtc_base/swap_queue.h
@@ -12,6 +12,7 @@
#define RTC_BASE_SWAP_QUEUE_H_
#include <stddef.h>
+
#include <atomic>
#include <utility>
#include <vector>
diff --git a/rtc_base/synchronization/rw_lock_win.h b/rtc_base/synchronization/rw_lock_win.h
index 52ad9bb..02d0930 100644
--- a/rtc_base/synchronization/rw_lock_win.h
+++ b/rtc_base/synchronization/rw_lock_win.h
@@ -11,10 +11,10 @@
#ifndef RTC_BASE_SYNCHRONIZATION_RW_LOCK_WIN_H_
#define RTC_BASE_SYNCHRONIZATION_RW_LOCK_WIN_H_
-#include "rtc_base/synchronization/rw_lock_wrapper.h"
-
#include <Windows.h>
+#include "rtc_base/synchronization/rw_lock_wrapper.h"
+
namespace webrtc {
class RWLockWin : public RWLockWrapper {
diff --git a/rtc_base/synchronization/yield_policy_unittest.cc b/rtc_base/synchronization/yield_policy_unittest.cc
index 1220808..e0c6225 100644
--- a/rtc_base/synchronization/yield_policy_unittest.cc
+++ b/rtc_base/synchronization/yield_policy_unittest.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/synchronization/yield_policy.h"
+
#include <thread> // Not allowed in production per Chromium style guide.
#include "rtc_base/event.h"
-#include "rtc_base/synchronization/yield_policy.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/rtc_base/task_queue.h b/rtc_base/task_queue.h
index 01fcb78..2f7c44d 100644
--- a/rtc_base/task_queue.h
+++ b/rtc_base/task_queue.h
@@ -12,6 +12,7 @@
#define RTC_BASE_TASK_QUEUE_H_
#include <stdint.h>
+
#include <memory>
#include <utility>
diff --git a/rtc_base/task_queue_gcd.cc b/rtc_base/task_queue_gcd.cc
index c131d82..35c7221 100644
--- a/rtc_base/task_queue_gcd.cc
+++ b/rtc_base/task_queue_gcd.cc
@@ -14,9 +14,8 @@
#include "rtc_base/task_queue_gcd.h"
-#include <string.h>
-
#include <dispatch/dispatch.h>
+#include <string.h>
#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc
index 9a01f46..df10efd 100644
--- a/rtc_base/task_queue_libevent.cc
+++ b/rtc_base/task_queue_libevent.cc
@@ -17,6 +17,7 @@
#include <stdint.h>
#include <time.h>
#include <unistd.h>
+
#include <list>
#include <memory>
#include <type_traits>
diff --git a/rtc_base/task_queue_stdlib.cc b/rtc_base/task_queue_stdlib.cc
index 88128b5..415c14d 100644
--- a/rtc_base/task_queue_stdlib.cc
+++ b/rtc_base/task_queue_stdlib.cc
@@ -11,6 +11,7 @@
#include "rtc_base/task_queue_stdlib.h"
#include <string.h>
+
#include <algorithm>
#include <map>
#include <queue>
diff --git a/rtc_base/task_utils/repeating_task.cc b/rtc_base/task_utils/repeating_task.cc
index cdabf2f..1705918 100644
--- a/rtc_base/task_utils/repeating_task.cc
+++ b/rtc_base/task_utils/repeating_task.cc
@@ -35,7 +35,7 @@
// destruct this object.
if (next_run_time_.IsPlusInfinity())
return true;
-
+
RTC_DCHECK(delay.IsFinite());
TimeDelta lost_time = Timestamp::us(rtc::TimeMicros()) - next_run_time_;
next_run_time_ += delay;
diff --git a/rtc_base/task_utils/repeating_task_unittest.cc b/rtc_base/task_utils/repeating_task_unittest.cc
index c903bc9..471914c 100644
--- a/rtc_base/task_utils/repeating_task_unittest.cc
+++ b/rtc_base/task_utils/repeating_task_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/task_utils/repeating_task.h"
+
#include <atomic>
#include <chrono> // Not allowed in production per Chromium style guide.
#include <memory>
@@ -16,7 +18,6 @@
#include "absl/memory/memory.h"
#include "rtc_base/event.h"
#include "rtc_base/task_queue_for_test.h"
-#include "rtc_base/task_utils/repeating_task.h"
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/rtc_base/test_client.cc b/rtc_base/test_client.cc
index 1264602..e287201 100644
--- a/rtc_base/test_client.cc
+++ b/rtc_base/test_client.cc
@@ -11,6 +11,7 @@
#include "rtc_base/test_client.h"
#include <string.h>
+
#include <utility>
#include "absl/memory/memory.h"
diff --git a/rtc_base/test_client.h b/rtc_base/test_client.h
index bbae12c..b45cf00 100644
--- a/rtc_base/test_client.h
+++ b/rtc_base/test_client.h
@@ -13,6 +13,7 @@
#include <memory>
#include <vector>
+
#include "rtc_base/async_udp_socket.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/critical_section.h"
diff --git a/rtc_base/test_echo_server.h b/rtc_base/test_echo_server.h
index 5f06a0e..da40ac4 100644
--- a/rtc_base/test_echo_server.h
+++ b/rtc_base/test_echo_server.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <list>
#include <memory>
diff --git a/rtc_base/third_party/base64/base64.h b/rtc_base/third_party/base64/base64.h
index bbc93c8..ba26329 100644
--- a/rtc_base/third_party/base64/base64.h
+++ b/rtc_base/third_party/base64/base64.h
@@ -120,4 +120,4 @@
} // namespace rtc
-#endif /* RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ */
+#endif /* RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ */
diff --git a/rtc_base/third_party/sigslot/sigslot.h b/rtc_base/third_party/sigslot/sigslot.h
index 8bd1c70..6dc62c5 100644
--- a/rtc_base/third_party/sigslot/sigslot.h
+++ b/rtc_base/third_party/sigslot/sigslot.h
@@ -640,4 +640,4 @@
} // namespace sigslot
-#endif /* RTC_BASE_THIRD_PARTY_SIGSLOT_SIGSLOT_H_ */
+#endif /* RTC_BASE_THIRD_PARTY_SIGSLOT_SIGSLOT_H_ */
diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc
index 5df5ede..20f58b2 100644
--- a/rtc_base/thread.cc
+++ b/rtc_base/thread.cc
@@ -25,6 +25,7 @@
#endif
#include <stdio.h>
+
#include <utility>
#include "rtc_base/checks.h"
@@ -345,7 +346,7 @@
#else
return nullptr;
#endif
-}
+} // namespace rtc
void Thread::Run() {
ProcessMessages(kForever);
diff --git a/rtc_base/thread.h b/rtc_base/thread.h
index 7d29fbf..58df2536 100644
--- a/rtc_base/thread.h
+++ b/rtc_base/thread.h
@@ -12,6 +12,7 @@
#define RTC_BASE_THREAD_H_
#include <stdint.h>
+
#include <list>
#include <memory>
#include <string>
@@ -359,8 +360,8 @@
std::list<_SendMessage> sendlist_;
std::string name_;
-// TODO(tommi): Add thread checks for proper use of control methods.
-// Ideally we should be able to just use PlatformThread.
+ // TODO(tommi): Add thread checks for proper use of control methods.
+ // Ideally we should be able to just use PlatformThread.
#if defined(WEBRTC_POSIX)
pthread_t thread_ = 0;
diff --git a/rtc_base/thread_annotations_unittest.cc b/rtc_base/thread_annotations_unittest.cc
index 949f042..1b296da 100644
--- a/rtc_base/thread_annotations_unittest.cc
+++ b/rtc_base/thread_annotations_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/thread_annotations.h"
+
#include "test/gtest.h"
namespace {
diff --git a/rtc_base/thread_checker_unittest.cc b/rtc_base/thread_checker_unittest.cc
index c3a64ac..b592704 100644
--- a/rtc_base/thread_checker_unittest.cc
+++ b/rtc_base/thread_checker_unittest.cc
@@ -10,6 +10,8 @@
// Borrowed from Chromium's src/base/threading/thread_checker_unittest.cc.
+#include "rtc_base/thread_checker.h"
+
#include <memory>
#include <utility>
@@ -19,7 +21,6 @@
#include "rtc_base/socket_server.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/thread.h"
-#include "rtc_base/thread_checker.h"
#include "test/gtest.h"
// Duplicated from base/threading/thread_checker.h so that we can be
diff --git a/rtc_base/thread_unittest.cc b/rtc_base/thread_unittest.cc
index 55a0e2d..56af8a5 100644
--- a/rtc_base/thread_unittest.cc
+++ b/rtc_base/thread_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/thread.h"
+
#include <memory>
#include "absl/memory/memory.h"
@@ -19,7 +21,6 @@
#include "rtc_base/physical_socket_server.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
-#include "rtc_base/thread.h"
#if defined(WEBRTC_WIN)
#include <comdef.h> // NOLINT
diff --git a/rtc_base/time_utils.cc b/rtc_base/time_utils.cc
index 53f8b36..7a72173 100644
--- a/rtc_base/time_utils.cc
+++ b/rtc_base/time_utils.cc
@@ -14,6 +14,7 @@
#include <sys/time.h>
#if defined(WEBRTC_MAC)
#include <mach/mach_time.h>
+
#include "rtc_base/numerics/safe_conversions.h"
#endif
#endif
diff --git a/rtc_base/time_utils.h b/rtc_base/time_utils.h
index d1d8b05..7862959 100644
--- a/rtc_base/time_utils.h
+++ b/rtc_base/time_utils.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <time.h>
+
#include <string>
#include "rtc_base/checks.h"
diff --git a/rtc_base/timestamp_aligner.cc b/rtc_base/timestamp_aligner.cc
index 3d92dd8..2896f9c 100644
--- a/rtc_base/timestamp_aligner.cc
+++ b/rtc_base/timestamp_aligner.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/timestamp_aligner.h"
+
#include <cstdlib>
#include <limits>
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/time_utils.h"
-#include "rtc_base/timestamp_aligner.h"
namespace rtc {
diff --git a/rtc_base/timestamp_aligner_unittest.cc b/rtc_base/timestamp_aligner_unittest.cc
index f92cd96..17d9e06 100644
--- a/rtc_base/timestamp_aligner_unittest.cc
+++ b/rtc_base/timestamp_aligner_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/timestamp_aligner.h"
+
#include <math.h>
+
#include <algorithm>
#include <limits>
#include "rtc_base/random.h"
#include "rtc_base/time_utils.h"
-#include "rtc_base/timestamp_aligner.h"
#include "test/gtest.h"
namespace rtc {
@@ -43,8 +45,8 @@
class TimestampAlignerForTest : public TimestampAligner {
// Make internal methods accessible to testing.
public:
- using TimestampAligner::UpdateOffset;
using TimestampAligner::ClipTimestamp;
+ using TimestampAligner::UpdateOffset;
};
void TestTimestampFilter(double rel_freq_error) {
diff --git a/rtc_base/unique_id_generator_unittest.cc b/rtc_base/unique_id_generator_unittest.cc
index a8d7b9e..868b348 100644
--- a/rtc_base/unique_id_generator_unittest.cc
+++ b/rtc_base/unique_id_generator_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/unique_id_generator.h"
+
#include <string>
#include <vector>
@@ -15,7 +17,6 @@
#include "api/array_view.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
-#include "rtc_base/unique_id_generator.h"
#include "test/gmock.h"
using ::testing::IsEmpty;
diff --git a/rtc_base/units/unit_base.h b/rtc_base/units/unit_base.h
index 5bcc0d8..533d355 100644
--- a/rtc_base/units/unit_base.h
+++ b/rtc_base/units/unit_base.h
@@ -11,6 +11,7 @@
#define RTC_BASE_UNITS_UNIT_BASE_H_
#include <stdint.h>
+
#include <algorithm>
#include <cmath>
#include <limits>
diff --git a/rtc_base/weak_ptr.h b/rtc_base/weak_ptr.h
index 80cb7ee..3e63a75 100644
--- a/rtc_base/weak_ptr.h
+++ b/rtc_base/weak_ptr.h
@@ -12,7 +12,6 @@
#define RTC_BASE_WEAK_PTR_H_
#include <memory>
-
#include <utility>
#include "api/scoped_refptr.h"
diff --git a/rtc_base/weak_ptr_unittest.cc b/rtc_base/weak_ptr_unittest.cc
index 1fdd9fea..3906fe7 100644
--- a/rtc_base/weak_ptr_unittest.cc
+++ b/rtc_base/weak_ptr_unittest.cc
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/weak_ptr.h"
+
#include <memory>
#include <string>
#include "absl/memory/memory.h"
#include "rtc_base/event.h"
#include "rtc_base/task_queue_for_test.h"
-#include "rtc_base/weak_ptr.h"
#include "test/gtest.h"
namespace rtc {
diff --git a/rtc_base/win/windows_version.cc b/rtc_base/win/windows_version.cc
index a1ba2c6..2e6c157 100644
--- a/rtc_base/win/windows_version.cc
+++ b/rtc_base/win/windows_version.cc
@@ -11,6 +11,7 @@
#include "rtc_base/win/windows_version.h"
#include <windows.h>
+
#include <memory>
#include "rtc_base/checks.h"
diff --git a/rtc_base/win/windows_version.h b/rtc_base/win/windows_version.h
index fa0a767..1ad319e 100644
--- a/rtc_base/win/windows_version.h
+++ b/rtc_base/win/windows_version.h
@@ -12,6 +12,7 @@
#define RTC_BASE_WIN_WINDOWS_VERSION_H_
#include <stddef.h>
+
#include <string>
#include "rtc_base/constructor_magic.h"
diff --git a/rtc_base/win32.cc b/rtc_base/win32.cc
index 67c987f..1a99c4f 100644
--- a/rtc_base/win32.cc
+++ b/rtc_base/win32.cc
@@ -12,6 +12,7 @@
#include <winsock2.h>
#include <ws2tcpip.h>
+
#include <algorithm>
#include "rtc_base/arraysize.h"
diff --git a/rtc_base/win32_socket_server.cc b/rtc_base/win32_socket_server.cc
index 585cd19..1ae4132 100644
--- a/rtc_base/win32_socket_server.cc
+++ b/rtc_base/win32_socket_server.cc
@@ -11,6 +11,7 @@
#include "rtc_base/win32_socket_server.h"
#include <ws2tcpip.h> // NOLINT
+
#include <algorithm>
#include "rtc_base/byte_order.h"
diff --git a/rtc_base/win32_socket_server_unittest.cc b/rtc_base/win32_socket_server_unittest.cc
index d8484d1..e545460 100644
--- a/rtc_base/win32_socket_server_unittest.cc
+++ b/rtc_base/win32_socket_server_unittest.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/win32_socket_server.h"
+
#include "rtc_base/gunit.h"
#include "rtc_base/socket_unittest.h"
#include "rtc_base/thread.h"
diff --git a/rtc_base/win32_unittest.cc b/rtc_base/win32_unittest.cc
index 0e2abaa..b2955e5 100644
--- a/rtc_base/win32_unittest.cc
+++ b/rtc_base/win32_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_base/win32.h"
+
#include <string>
#include "rtc_base/gunit.h"
#include "rtc_base/net_helpers.h"
-#include "rtc_base/win32.h"
#if !defined(WEBRTC_WIN)
#error Only for Windows
diff --git a/rtc_base/win32_window.cc b/rtc_base/win32_window.cc
index b0eb605..b4d919d 100644
--- a/rtc_base/win32_window.cc
+++ b/rtc_base/win32_window.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/win32_window.h"
+
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
diff --git a/rtc_base/win32_window_unittest.cc b/rtc_base/win32_window_unittest.cc
index 62430bb..665b5c6 100644
--- a/rtc_base/win32_window_unittest.cc
+++ b/rtc_base/win32_window_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "rtc_base/win32_window.h"
+
#include "rtc_base/gunit.h"
#include "rtc_base/logging.h"
diff --git a/rtc_base/zero_memory.h b/rtc_base/zero_memory.h
index f697bcb..b92f52f 100644
--- a/rtc_base/zero_memory.h
+++ b/rtc_base/zero_memory.h
@@ -12,6 +12,7 @@
#define RTC_BASE_ZERO_MEMORY_H_
#include <stddef.h>
+
#include <type_traits>
#include "api/array_view.h"
diff --git a/rtc_tools/converter/converter.cc b/rtc_tools/converter/converter.cc
index 9fb3106..ca5eb26 100644
--- a/rtc_tools/converter/converter.cc
+++ b/rtc_tools/converter/converter.cc
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <sys/stat.h>
+
#include <iomanip>
#include <sstream>
diff --git a/rtc_tools/converter/converter.h b/rtc_tools/converter/converter.h
index e076429..976458c 100644
--- a/rtc_tools/converter/converter.h
+++ b/rtc_tools/converter/converter.h
@@ -12,6 +12,7 @@
#define RTC_TOOLS_CONVERTER_CONVERTER_H_
#include <stdio.h>
+
#include <string>
namespace webrtc {
diff --git a/rtc_tools/converter/rgba_to_i420_converter.cc b/rtc_tools/converter/rgba_to_i420_converter.cc
index cf352e6..2b6670e 100644
--- a/rtc_tools/converter/rgba_to_i420_converter.cc
+++ b/rtc_tools/converter/rgba_to_i420_converter.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
+
#include <string>
#include "absl/flags/flag.h"
diff --git a/rtc_tools/event_log_visualizer/main.cc b/rtc_tools/event_log_visualizer/main.cc
index dc1b023..f5ad86d 100644
--- a/rtc_tools/event_log_visualizer/main.cc
+++ b/rtc_tools/event_log_visualizer/main.cc
@@ -572,4 +572,3 @@
return 0;
}
-
diff --git a/rtc_tools/event_log_visualizer/plot_protobuf.cc b/rtc_tools/event_log_visualizer/plot_protobuf.cc
index 9dc61f7..3b2842d 100644
--- a/rtc_tools/event_log_visualizer/plot_protobuf.cc
+++ b/rtc_tools/event_log_visualizer/plot_protobuf.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/event_log_visualizer/plot_protobuf.h"
#include <stddef.h>
+
#include <iostream>
#include <memory>
#include <vector>
diff --git a/rtc_tools/event_log_visualizer/plot_python.cc b/rtc_tools/event_log_visualizer/plot_python.cc
index 499fd43..b29c092 100644
--- a/rtc_tools/event_log_visualizer/plot_python.cc
+++ b/rtc_tools/event_log_visualizer/plot_python.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/event_log_visualizer/plot_python.h"
#include <stdio.h>
+
#include <memory>
#include <string>
#include <vector>
diff --git a/rtc_tools/frame_analyzer/frame_analyzer.cc b/rtc_tools/frame_analyzer/frame_analyzer.cc
index 8996129..1a22bd6 100644
--- a/rtc_tools/frame_analyzer/frame_analyzer.cc
+++ b/rtc_tools/frame_analyzer/frame_analyzer.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
+
#include <cstddef>
#include <string>
#include <vector>
diff --git a/rtc_tools/frame_analyzer/linear_least_squares.cc b/rtc_tools/frame_analyzer/linear_least_squares.cc
index 478843d..32cb481 100644
--- a/rtc_tools/frame_analyzer/linear_least_squares.cc
+++ b/rtc_tools/frame_analyzer/linear_least_squares.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/frame_analyzer/linear_least_squares.h"
#include <math.h>
+
#include <cstdint>
#include <cstdlib>
#include <functional>
diff --git a/rtc_tools/frame_analyzer/linear_least_squares.h b/rtc_tools/frame_analyzer/linear_least_squares.h
index 412442b..7006db1 100644
--- a/rtc_tools/frame_analyzer/linear_least_squares.h
+++ b/rtc_tools/frame_analyzer/linear_least_squares.h
@@ -12,6 +12,7 @@
#define RTC_TOOLS_FRAME_ANALYZER_LINEAR_LEAST_SQUARES_H_
#include <stdint.h>
+
#include <valarray>
#include <vector>
diff --git a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.cc b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.cc
index ddc5d57..ebfc665 100644
--- a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.cc
+++ b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.cc
@@ -7,12 +7,14 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
+
#include <stdio.h>
+
#include <numeric>
#include <vector>
#include "api/video/video_frame_buffer.h"
-#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#define STATS_LINE_LENGTH 28
diff --git a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h
index f5682edd..3c93119 100644
--- a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h
+++ b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h
@@ -12,6 +12,7 @@
#define RTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/rtc_tools/frame_analyzer/video_color_aligner.cc b/rtc_tools/frame_analyzer/video_color_aligner.cc
index da72341..05e963f 100644
--- a/rtc_tools/frame_analyzer/video_color_aligner.cc
+++ b/rtc_tools/frame_analyzer/video_color_aligner.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/frame_analyzer/video_color_aligner.h"
#include <stddef.h>
+
#include <algorithm>
#include <cmath>
#include <cstdint>
diff --git a/rtc_tools/frame_analyzer/video_quality_analysis.h b/rtc_tools/frame_analyzer/video_quality_analysis.h
index a513a3e..c5f3cb6 100644
--- a/rtc_tools/frame_analyzer/video_quality_analysis.h
+++ b/rtc_tools/frame_analyzer/video_quality_analysis.h
@@ -12,6 +12,7 @@
#define RTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_
#include <stdio.h>
+
#include <string>
#include <vector>
diff --git a/rtc_tools/frame_analyzer/video_quality_analysis_unittest.cc b/rtc_tools/frame_analyzer/video_quality_analysis_unittest.cc
index 4cd4bfa..826cca0 100644
--- a/rtc_tools/frame_analyzer/video_quality_analysis_unittest.cc
+++ b/rtc_tools/frame_analyzer/video_quality_analysis_unittest.cc
@@ -11,12 +11,14 @@
// This test doesn't actually verify the output since it's just printed
// to stdout by void functions, but it's still useful as it executes the code.
+#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
+
#include <stdio.h>
+
#include <cstddef>
#include <fstream>
#include <string>
-#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/rtc_tools/frame_analyzer/video_temporal_aligner.h b/rtc_tools/frame_analyzer/video_temporal_aligner.h
index 9a1bc35..21baff2 100644
--- a/rtc_tools/frame_analyzer/video_temporal_aligner.h
+++ b/rtc_tools/frame_analyzer/video_temporal_aligner.h
@@ -12,6 +12,7 @@
#define RTC_TOOLS_FRAME_ANALYZER_VIDEO_TEMPORAL_ALIGNER_H_
#include <stddef.h>
+
#include <vector>
#include "api/scoped_refptr.h"
diff --git a/rtc_tools/frame_editing/frame_editing.cc b/rtc_tools/frame_editing/frame_editing.cc
index 71798d5..8e82110 100644
--- a/rtc_tools/frame_editing/frame_editing.cc
+++ b/rtc_tools/frame_editing/frame_editing.cc
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include <string>
#include "absl/flags/flag.h"
diff --git a/rtc_tools/frame_editing/frame_editing_lib.cc b/rtc_tools/frame_editing/frame_editing_lib.cc
index 249dd1f..450c0b3 100644
--- a/rtc_tools/frame_editing/frame_editing_lib.cc
+++ b/rtc_tools/frame_editing/frame_editing_lib.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_tools/frame_editing/frame_editing_lib.h"
+
#include <stdio.h>
+
#include <cstdint>
#include <memory>
#include <string>
#include "common_video/libyuv/include/webrtc_libyuv.h"
-#include "rtc_tools/frame_editing/frame_editing_lib.h"
namespace webrtc {
diff --git a/rtc_tools/frame_editing/frame_editing_unittest.cc b/rtc_tools/frame_editing/frame_editing_unittest.cc
index 1e93e42..891ef7c 100644
--- a/rtc_tools/frame_editing/frame_editing_unittest.cc
+++ b/rtc_tools/frame_editing/frame_editing_unittest.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
+
#include <fstream>
#include <memory>
#include <string>
diff --git a/rtc_tools/network_tester/config_reader.h b/rtc_tools/network_tester/config_reader.h
index 69105f1..f44e7a9 100644
--- a/rtc_tools/network_tester/config_reader.h
+++ b/rtc_tools/network_tester/config_reader.h
@@ -16,7 +16,6 @@
#include "absl/types/optional.h"
#include "rtc_base/constructor_magic.h"
-
#include "rtc_base/ignore_wundef.h"
#ifdef WEBRTC_NETWORK_TESTER_PROTO
diff --git a/rtc_tools/network_tester/server.cc b/rtc_tools/network_tester/server.cc
index 25ca5a1..4074a48 100644
--- a/rtc_tools/network_tester/server.cc
+++ b/rtc_tools/network_tester/server.cc
@@ -10,7 +10,7 @@
#include "rtc_tools/network_tester/test_controller.h"
-int main(int /*argn*/, char* /*argv*/ []) {
+int main(int /*argn*/, char* /*argv*/[]) {
webrtc::TestController server(9090, 9090, "server_config.dat",
"server_packet_log.dat");
while (!server.IsTestDone()) {
diff --git a/rtc_tools/network_tester/test_controller.cc b/rtc_tools/network_tester/test_controller.cc
index 5200786..49b470c 100644
--- a/rtc_tools/network_tester/test_controller.cc
+++ b/rtc_tools/network_tester/test_controller.cc
@@ -123,7 +123,9 @@
remote_test_done_ = true;
break;
}
- default: { RTC_NOTREACHED(); }
+ default: {
+ RTC_NOTREACHED();
+ }
}
}
diff --git a/rtc_tools/network_tester/test_controller.h b/rtc_tools/network_tester/test_controller.h
index e522025..d04158d 100644
--- a/rtc_tools/network_tester/test_controller.h
+++ b/rtc_tools/network_tester/test_controller.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <array>
#include <memory>
#include <string>
diff --git a/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc b/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc
index 05180c2..c8aafcc 100644
--- a/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc
+++ b/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
+
#include <algorithm>
#include <string>
diff --git a/rtc_tools/rtp_generator/main.cc b/rtc_tools/rtp_generator/main.cc
index afe6e0a..0e5dee8 100644
--- a/rtc_tools/rtp_generator/main.cc
+++ b/rtc_tools/rtp_generator/main.cc
@@ -9,6 +9,7 @@
*/
#include <stdlib.h>
+
#include <string>
#include "absl/flags/flag.h"
diff --git a/rtc_tools/sanitizers_unittest.cc b/rtc_tools/sanitizers_unittest.cc
index adee3a2..066ac84 100644
--- a/rtc_tools/sanitizers_unittest.cc
+++ b/rtc_tools/sanitizers_unittest.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdio.h>
+
#include <random>
#include "absl/memory/memory.h"
diff --git a/rtc_tools/unpack_aecdump/unpack.cc b/rtc_tools/unpack_aecdump/unpack.cc
index e833f32..f326b4c 100644
--- a/rtc_tools/unpack_aecdump/unpack.cc
+++ b/rtc_tools/unpack_aecdump/unpack.cc
@@ -17,6 +17,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+
#include <memory>
#include <string>
#include <vector>
@@ -95,9 +96,9 @@
namespace webrtc {
using audioproc::Event;
+using audioproc::Init;
using audioproc::ReverseStream;
using audioproc::Stream;
-using audioproc::Init;
namespace {
@@ -291,7 +292,7 @@
reverse_raw_file.reset(
new RawFile(absl::GetFlag(FLAGS_reverse_file) + ".float"));
}
- std::unique_ptr<const float* []> data(
+ std::unique_ptr<const float*[]> data(
new const float*[num_reverse_channels]);
for (size_t i = 0; i < num_reverse_channels; ++i) {
data[i] = reinterpret_cast<const float*>(msg.channel(i).data());
@@ -327,7 +328,7 @@
input_raw_file.reset(
new RawFile(absl::GetFlag(FLAGS_input_file) + ".float"));
}
- std::unique_ptr<const float* []> data(
+ std::unique_ptr<const float*[]> data(
new const float*[num_input_channels]);
for (size_t i = 0; i < num_input_channels; ++i) {
data[i] = reinterpret_cast<const float*>(msg.input_channel(i).data());
@@ -350,7 +351,7 @@
output_raw_file.reset(
new RawFile(absl::GetFlag(FLAGS_output_file) + ".float"));
}
- std::unique_ptr<const float* []> data(
+ std::unique_ptr<const float*[]> data(
new const float*[num_output_channels]);
for (size_t i = 0; i < num_output_channels; ++i) {
data[i] =
diff --git a/rtc_tools/video_file_reader.h b/rtc_tools/video_file_reader.h
index 3cdbcff..1293beb 100644
--- a/rtc_tools/video_file_reader.h
+++ b/rtc_tools/video_file_reader.h
@@ -11,6 +11,7 @@
#define RTC_TOOLS_VIDEO_FILE_READER_H_
#include <stddef.h>
+
#include <cstdio>
#include <iterator>
#include <string>
diff --git a/rtc_tools/video_file_reader_unittest.cc b/rtc_tools/video_file_reader_unittest.cc
index c0258d1..fc00c7c 100644
--- a/rtc_tools/video_file_reader_unittest.cc
+++ b/rtc_tools/video_file_reader_unittest.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/video_file_reader.h"
#include <stdint.h>
+
#include <string>
#include "test/gtest.h"
diff --git a/rtc_tools/video_file_writer.cc b/rtc_tools/video_file_writer.cc
index dc7a699..e4bef17 100644
--- a/rtc_tools/video_file_writer.cc
+++ b/rtc_tools/video_file_writer.cc
@@ -11,6 +11,7 @@
#include "rtc_tools/video_file_writer.h"
#include <stdint.h>
+
#include <cstdio>
#include <string>
diff --git a/rtc_tools/video_file_writer_unittest.cc b/rtc_tools/video_file_writer_unittest.cc
index fea01ba..c4afa8f 100644
--- a/rtc_tools/video_file_writer_unittest.cc
+++ b/rtc_tools/video_file_writer_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "rtc_tools/video_file_writer.h"
+
#include <stdint.h>
+
#include <cstdio>
#include <string>
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/video_file_reader.h"
-#include "rtc_tools/video_file_writer.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc
index bd24ce1..8a89d76 100644
--- a/stats/rtcstats_objects.cc
+++ b/stats/rtcstats_objects.cc
@@ -12,9 +12,8 @@
#include <utility>
-#include "rtc_base/checks.h"
-
#include "api/stats/rtc_stats.h"
+#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/system_wrappers/include/clock.h b/system_wrappers/include/clock.h
index 09d2785..c026a4e 100644
--- a/system_wrappers/include/clock.h
+++ b/system_wrappers/include/clock.h
@@ -12,6 +12,7 @@
#define SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_
#include <stdint.h>
+
#include <memory>
#include "api/units/timestamp.h"
diff --git a/system_wrappers/include/metrics.h b/system_wrappers/include/metrics.h
index 62dc6c6..18c9757 100644
--- a/system_wrappers/include/metrics.h
+++ b/system_wrappers/include/metrics.h
@@ -12,6 +12,7 @@
#define SYSTEM_WRAPPERS_INCLUDE_METRICS_H_
#include <stddef.h>
+
#include <map>
#include <memory>
#include <string>
diff --git a/system_wrappers/include/rtp_to_ntp_estimator.h b/system_wrappers/include/rtp_to_ntp_estimator.h
index c244c4f..d5c50a3 100644
--- a/system_wrappers/include/rtp_to_ntp_estimator.h
+++ b/system_wrappers/include/rtp_to_ntp_estimator.h
@@ -12,6 +12,7 @@
#define SYSTEM_WRAPPERS_INCLUDE_RTP_TO_NTP_ESTIMATOR_H_
#include <stdint.h>
+
#include <list>
#include "absl/types/optional.h"
diff --git a/system_wrappers/source/cpu_features.cc b/system_wrappers/source/cpu_features.cc
index d433a77..ebcb48c 100644
--- a/system_wrappers/source/cpu_features.cc
+++ b/system_wrappers/source/cpu_features.cc
@@ -17,7 +17,6 @@
#include <intrin.h>
#endif
-
// No CPU feature is available => straight C path.
int GetCPUInfoNoASM(CPUFeature feature) {
(void)feature;
diff --git a/system_wrappers/source/metrics_unittest.cc b/system_wrappers/source/metrics_unittest.cc
index 9c96ba0..fa8bb2d 100644
--- a/system_wrappers/source/metrics_unittest.cc
+++ b/system_wrappers/source/metrics_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "system_wrappers/include/metrics.h"
+
#include "test/gmock.h"
#include "test/gtest.h"
diff --git a/system_wrappers/source/ntp_time_unittest.cc b/system_wrappers/source/ntp_time_unittest.cc
index 7be464d..f45273f 100644
--- a/system_wrappers/source/ntp_time_unittest.cc
+++ b/system_wrappers/source/ntp_time_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "system_wrappers/include/ntp_time.h"
+
#include "system_wrappers/include/clock.h"
#include "test/gtest.h"
diff --git a/system_wrappers/source/rtp_to_ntp_estimator.cc b/system_wrappers/source/rtp_to_ntp_estimator.cc
index 4bbf609..b26115f 100644
--- a/system_wrappers/source/rtp_to_ntp_estimator.cc
+++ b/system_wrappers/source/rtp_to_ntp_estimator.cc
@@ -11,6 +11,7 @@
#include "system_wrappers/include/rtp_to_ntp_estimator.h"
#include <stddef.h>
+
#include <cmath>
#include <vector>
diff --git a/test/configurable_frame_size_encoder.cc b/test/configurable_frame_size_encoder.cc
index e12298a..dd25945 100644
--- a/test/configurable_frame_size_encoder.cc
+++ b/test/configurable_frame_size_encoder.cc
@@ -11,6 +11,7 @@
#include "test/configurable_frame_size_encoder.h"
#include <string.h>
+
#include <cstdint>
#include <type_traits>
#include <utility>
diff --git a/test/configurable_frame_size_encoder.h b/test/configurable_frame_size_encoder.h
index 311cb99..0ffe3b2 100644
--- a/test/configurable_frame_size_encoder.h
+++ b/test/configurable_frame_size_encoder.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <functional>
#include <memory>
#include <vector>
diff --git a/test/direct_transport.h b/test/direct_transport.h
index c2efe65..c6b0ecd 100644
--- a/test/direct_transport.h
+++ b/test/direct_transport.h
@@ -73,7 +73,6 @@
const Demuxer demuxer_;
const std::unique_ptr<SimulatedPacketReceiverInterface> fake_network_;
-
};
} // namespace test
} // namespace webrtc
diff --git a/test/drifting_clock.cc b/test/drifting_clock.cc
index 2907ad0..0e3d2a6 100644
--- a/test/drifting_clock.cc
+++ b/test/drifting_clock.cc
@@ -9,6 +9,7 @@
*/
#include "test/drifting_clock.h"
+
#include "rtc_base/checks.h"
namespace webrtc {
diff --git a/test/encoder_settings.h b/test/encoder_settings.h
index 3c740f0..86ef0bb 100644
--- a/test/encoder_settings.h
+++ b/test/encoder_settings.h
@@ -11,6 +11,7 @@
#define TEST_ENCODER_SETTINGS_H_
#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/test/fake_encoder.cc b/test/fake_encoder.cc
index 457f4fe..a1e9742 100644
--- a/test/fake_encoder.cc
+++ b/test/fake_encoder.cc
@@ -11,6 +11,7 @@
#include "test/fake_encoder.h"
#include <string.h>
+
#include <algorithm>
#include <cstdint>
#include <memory>
diff --git a/test/fake_encoder.h b/test/fake_encoder.h
index c0dc739..566980e 100644
--- a/test/fake_encoder.h
+++ b/test/fake_encoder.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/test/fake_vp8_encoder_unittest.cc b/test/fake_vp8_encoder_unittest.cc
index 4e576fe..796ccda6 100644
--- a/test/fake_vp8_encoder_unittest.cc
+++ b/test/fake_vp8_encoder_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/fake_vp8_encoder.h"
+
#include <memory>
#include <utility>
@@ -18,7 +20,6 @@
#include "api/test/video/function_video_encoder_factory.h"
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
#include "test/fake_vp8_decoder.h"
-#include "test/fake_vp8_encoder.h"
namespace webrtc {
namespace test {
diff --git a/test/frame_generator.cc b/test/frame_generator.cc
index 84da4f7..7a9e9a0 100644
--- a/test/frame_generator.cc
+++ b/test/frame_generator.cc
@@ -10,6 +10,7 @@
#include "test/frame_generator.h"
#include <string.h>
+
#include <cstdint>
#include <cstdio>
#include <memory>
@@ -233,8 +234,7 @@
size_t prev_file_index = file_index_;
last_read_buffer_ =
test::ReadI420Buffer(static_cast<int>(width_),
- static_cast<int>(height_),
- files_[file_index_]);
+ static_cast<int>(height_), files_[file_index_]);
++frame_index_;
if (!last_read_buffer_) {
// No more frames to read in this file, rewind and move to next file.
@@ -244,8 +244,7 @@
file_index_ = (file_index_ + 1) % files_.size();
last_read_buffer_ =
test::ReadI420Buffer(static_cast<int>(width_),
- static_cast<int>(height_),
- files_[file_index_]);
+ static_cast<int>(height_), files_[file_index_]);
RTC_CHECK(last_read_buffer_);
}
return frame_index_ != prev_frame_index || file_index_ != prev_file_index;
@@ -301,7 +300,7 @@
void GenerateNewFrame() {
// The squares should have a varying order of magnitude in order
// to simulate variation in the slides' complexity.
- const int kSquareNum = 1 << (4 + (random_generator_.Rand(0, 3) * 2));
+ const int kSquareNum = 1 << (4 + (random_generator_.Rand(0, 3) * 2));
buffer_ = I420Buffer::Create(width_, height_);
memset(buffer_->MutableDataY(), 127, height_ * buffer_->StrideY());
@@ -525,9 +524,11 @@
}
std::unique_ptr<FrameGenerator> FrameGenerator::CreateSlideGenerator(
- int width, int height, int frame_repeat_count) {
- return std::unique_ptr<FrameGenerator>(new SlideGenerator(
- width, height, frame_repeat_count));
+ int width,
+ int height,
+ int frame_repeat_count) {
+ return std::unique_ptr<FrameGenerator>(
+ new SlideGenerator(width, height, frame_repeat_count));
}
std::unique_ptr<FrameGenerator> FrameGenerator::CreateFromYuvFile(
diff --git a/test/frame_generator_unittest.cc b/test/frame_generator_unittest.cc
index 599eac9..4be304a 100644
--- a/test/frame_generator_unittest.cc
+++ b/test/frame_generator_unittest.cc
@@ -8,16 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/frame_generator.h"
+
#include <assert.h>
#include <stdio.h>
#include <string.h>
+
#include <cstdint>
#include <memory>
#include <string>
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
-#include "test/frame_generator.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
diff --git a/test/frame_utils.cc b/test/frame_utils.cc
index 833f571..30389fb 100644
--- a/test/frame_utils.cc
+++ b/test/frame_utils.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/frame_utils.h"
+
#include <stdio.h>
#include <string.h>
#include "api/video/i420_buffer.h"
#include "api/video/video_frame.h"
-#include "test/frame_utils.h"
namespace webrtc {
namespace test {
diff --git a/test/fuzzers/audio_processing_configs_fuzzer.cc b/test/fuzzers/audio_processing_configs_fuzzer.cc
index 58d1e46..f8e9ae5 100644
--- a/test/fuzzers/audio_processing_configs_fuzzer.cc
+++ b/test/fuzzers/audio_processing_configs_fuzzer.cc
@@ -93,7 +93,7 @@
// Filter out incompatible settings that lead to CHECK failures.
if ((use_aecm && use_aec) || // These settings cause CHECK failure.
(use_aecm && aec3 && use_ns) // These settings trigger webrtc:9489.
- ) {
+ ) {
return nullptr;
}
diff --git a/test/fuzzers/audio_processing_fuzzer_helper.cc b/test/fuzzers/audio_processing_fuzzer_helper.cc
index ee87d68..5d7ea4c 100644
--- a/test/fuzzers/audio_processing_fuzzer_helper.cc
+++ b/test/fuzzers/audio_processing_fuzzer_helper.cc
@@ -74,7 +74,8 @@
std::array<float, 480> float_frame1;
std::array<float, 480> float_frame2;
std::array<float* const, 2> float_frame_ptrs = {
- &float_frame1[0], &float_frame2[0],
+ &float_frame1[0],
+ &float_frame2[0],
};
float* const* ptr_to_float_frames = &float_frame_ptrs[0];
diff --git a/test/fuzzers/field_trial_fuzzer.cc b/test/fuzzers/field_trial_fuzzer.cc
index 34a0d4a..74fe65c 100644
--- a/test/fuzzers/field_trial_fuzzer.cc
+++ b/test/fuzzers/field_trial_fuzzer.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "system_wrappers/include/field_trial.h"
diff --git a/test/fuzzers/frame_buffer2_fuzzer.cc b/test/fuzzers/frame_buffer2_fuzzer.cc
index 54d1713..e68f9fe 100644
--- a/test/fuzzers/frame_buffer2_fuzzer.cc
+++ b/test/fuzzers/frame_buffer2_fuzzer.cc
@@ -9,7 +9,6 @@
*/
#include "modules/video_coding/frame_buffer2.h"
-
#include "modules/video_coding/timing.h"
#include "system_wrappers/include/clock.h"
diff --git a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
index 4e1e9ce..417c7a8 100644
--- a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
+++ b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
@@ -8,12 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/video_coding/rtp_frame_reference_finder.h"
-
#include "absl/memory/memory.h"
#include "api/rtp_packet_infos.h"
#include "modules/video_coding/frame_object.h"
#include "modules/video_coding/packet_buffer.h"
+#include "modules/video_coding/rtp_frame_reference_finder.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
diff --git a/test/fuzzers/rtp_header_parser_fuzzer.cc b/test/fuzzers/rtp_header_parser_fuzzer.cc
index c28dcff..6d95fdc 100644
--- a/test/fuzzers/rtp_header_parser_fuzzer.cc
+++ b/test/fuzzers/rtp_header_parser_fuzzer.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <algorithm>
#include <memory>
#include <string>
diff --git a/test/fuzzers/sctp_utils_fuzzer.cc b/test/fuzzers/sctp_utils_fuzzer.cc
index 54bd40a..2497075 100644
--- a/test/fuzzers/sctp_utils_fuzzer.cc
+++ b/test/fuzzers/sctp_utils_fuzzer.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "api/data_channel_interface.h"
diff --git a/test/fuzzers/ssl_certificate_fuzzer.cc b/test/fuzzers/ssl_certificate_fuzzer.cc
index 50632f6..7ab59b5 100644
--- a/test/fuzzers/ssl_certificate_fuzzer.cc
+++ b/test/fuzzers/ssl_certificate_fuzzer.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "rtc_base/ssl_certificate.h"
diff --git a/test/fuzzers/string_to_number_fuzzer.cc b/test/fuzzers/string_to_number_fuzzer.cc
index ae4e394..28b36a7 100644
--- a/test/fuzzers/string_to_number_fuzzer.cc
+++ b/test/fuzzers/string_to_number_fuzzer.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <string>
#include "rtc_base/string_to_number.h"
diff --git a/test/layer_filtering_transport.cc b/test/layer_filtering_transport.cc
index 1a8cc3e..23f1654 100644
--- a/test/layer_filtering_transport.cc
+++ b/test/layer_filtering_transport.cc
@@ -8,7 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/layer_filtering_transport.h"
+
#include <string.h>
+
#include <algorithm>
#include <memory>
#include <utility>
@@ -22,7 +25,6 @@
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
#include "rtc_base/checks.h"
-#include "test/layer_filtering_transport.h"
namespace webrtc {
namespace test {
diff --git a/test/layer_filtering_transport.h b/test/layer_filtering_transport.h
index 95a5388..1a13db3 100644
--- a/test/layer_filtering_transport.h
+++ b/test/layer_filtering_transport.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <memory>
diff --git a/test/logging/log_writer.h b/test/logging/log_writer.h
index db4a737..0098152 100644
--- a/test/logging/log_writer.h
+++ b/test/logging/log_writer.h
@@ -11,6 +11,7 @@
#define TEST_LOGGING_LOG_WRITER_H_
#include <stdarg.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/test/network/cross_traffic.cc b/test/network/cross_traffic.cc
index 7f64d53..63982a1 100644
--- a/test/network/cross_traffic.cc
+++ b/test/network/cross_traffic.cc
@@ -11,6 +11,7 @@
#include "test/network/cross_traffic.h"
#include <math.h>
+
#include <utility>
#include "absl/memory/memory.h"
diff --git a/test/network/cross_traffic_unittest.cc b/test/network/cross_traffic_unittest.cc
index cc20d6c..bab020b 100644
--- a/test/network/cross_traffic_unittest.cc
+++ b/test/network/cross_traffic_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/network/cross_traffic.h"
+
#include <atomic>
#include <memory>
#include <utility>
@@ -20,7 +22,6 @@
#include "rtc_base/logging.h"
#include "test/gmock.h"
#include "test/gtest.h"
-#include "test/network/cross_traffic.h"
namespace webrtc {
namespace test {
diff --git a/test/network/fake_network_socket_server.cc b/test/network/fake_network_socket_server.cc
index df082dd..9be61c5 100644
--- a/test/network/fake_network_socket_server.cc
+++ b/test/network/fake_network_socket_server.cc
@@ -11,6 +11,7 @@
#include "test/network/fake_network_socket_server.h"
#include <utility>
+
#include "rtc_base/thread.h"
namespace webrtc {
diff --git a/test/network/network_emulation_unittest.cc b/test/network/network_emulation_unittest.cc
index 26b1b37..adc7b42 100644
--- a/test/network/network_emulation_unittest.cc
+++ b/test/network/network_emulation_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/network/network_emulation.h"
+
#include <atomic>
#include <memory>
#include <set>
@@ -22,7 +24,6 @@
#include "system_wrappers/include/sleep.h"
#include "test/gmock.h"
#include "test/gtest.h"
-#include "test/network/network_emulation.h"
#include "test/network/network_emulation_manager.h"
namespace webrtc {
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 4216395..a250910 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
@@ -45,10 +45,9 @@
return delegate_->InitDecode(codec_settings, number_of_cores);
}
-int32_t QualityAnalyzingVideoDecoder::Decode(
- const EncodedImage& input_image,
- bool missing_frames,
- int64_t render_time_ms) {
+int32_t QualityAnalyzingVideoDecoder::Decode(const EncodedImage& input_image,
+ bool missing_frames,
+ int64_t render_time_ms) {
// Image extractor extracts id from provided EncodedImage and also returns
// the image with the original buffer. Buffer can be modified in place, so
// owner of original buffer will be responsible for deleting it, or extractor
diff --git a/test/pc/e2e/analyzer_helper.cc b/test/pc/e2e/analyzer_helper.cc
index a0cf792..f11b3bb 100644
--- a/test/pc/e2e/analyzer_helper.cc
+++ b/test/pc/e2e/analyzer_helper.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <utility>
-
#include "test/pc/e2e/analyzer_helper.h"
+#include <utility>
+
namespace webrtc {
namespace webrtc_pc_e2e {
diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc
index 944790e..dbd8d5b 100644
--- a/test/pc/e2e/peer_connection_quality_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test.cc
@@ -220,8 +220,7 @@
configurer(peer_configurations_.back().get());
}
-void PeerConnectionE2EQualityTest::Run(
- RunParams run_params) {
+void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
RTC_CHECK_EQ(peer_configurations_.size(), 2)
<< "Only peer to peer calls are allowed, please add 2 peers";
diff --git a/test/rtp_file_reader_unittest.cc b/test/rtp_file_reader_unittest.cc
index ab51224..8dc817d 100644
--- a/test/rtp_file_reader_unittest.cc
+++ b/test/rtp_file_reader_unittest.cc
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/rtp_file_reader.h"
+
#include <map>
#include <memory>
#include "modules/rtp_rtcp/source/rtp_utility.h"
#include "test/gtest.h"
-#include "test/rtp_file_reader.h"
#include "test/testsupport/file_utils.h"
namespace webrtc {
diff --git a/test/rtp_file_writer.cc b/test/rtp_file_writer.cc
index 3d1bfbe..cdd9c93 100644
--- a/test/rtp_file_writer.cc
+++ b/test/rtp_file_writer.cc
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <string>
#include "rtc_base/checks.h"
diff --git a/test/rtp_file_writer_unittest.cc b/test/rtp_file_writer_unittest.cc
index 6bfad41..a6281c7 100644
--- a/test/rtp_file_writer_unittest.cc
+++ b/test/rtp_file_writer_unittest.cc
@@ -8,13 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/rtp_file_writer.h"
+
#include <stdint.h>
#include <string.h>
+
#include <memory>
#include "test/gtest.h"
#include "test/rtp_file_reader.h"
-#include "test/rtp_file_writer.h"
#include "test/testsupport/file_utils.h"
namespace webrtc {
diff --git a/test/run_loop.h b/test/run_loop.h
index 36bfa06..ee3bdee 100644
--- a/test/run_loop.h
+++ b/test/run_loop.h
@@ -16,7 +16,7 @@
namespace test {
// Blocks until the user presses enter.
-void PressEnterToContinue(SingleThreadedTaskQueueForTesting &task_queue);
+void PressEnterToContinue(SingleThreadedTaskQueueForTesting& task_queue);
} // namespace test
} // namespace webrtc
diff --git a/test/scenario/call_client.cc b/test/scenario/call_client.cc
index f366997..b42f2a3 100644
--- a/test/scenario/call_client.cc
+++ b/test/scenario/call_client.cc
@@ -85,7 +85,7 @@
RTC_CHECK(success);
return event_log;
}
-}
+} // namespace
NetworkControleUpdateCache::NetworkControleUpdateCache(
std::unique_ptr<NetworkControllerInterface> controller)
: controller_(std::move(controller)) {}
@@ -171,8 +171,7 @@
}
}
-LoggingNetworkControllerFactory::~LoggingNetworkControllerFactory() {
-}
+LoggingNetworkControllerFactory::~LoggingNetworkControllerFactory() {}
void LoggingNetworkControllerFactory::LogCongestionControllerStats(
Timestamp at_time) {
diff --git a/test/scenario/column_printer.cc b/test/scenario/column_printer.cc
index ab70af9..661c83b 100644
--- a/test/scenario/column_printer.cc
+++ b/test/scenario/column_printer.cc
@@ -22,9 +22,9 @@
: headers_(headers), printer_(printer), max_length_(max_length) {}
ColumnPrinter ColumnPrinter::Fixed(const char* headers, std::string fields) {
- return ColumnPrinter(headers,
- [fields](rtc::SimpleStringBuilder& sb) { sb << fields; },
- fields.size());
+ return ColumnPrinter(
+ headers, [fields](rtc::SimpleStringBuilder& sb) { sb << fields; },
+ fields.size());
}
ColumnPrinter ColumnPrinter::Lambda(
diff --git a/test/scenario/hardware_codecs.cc b/test/scenario/hardware_codecs.cc
index 16044de..5267e89 100644
--- a/test/scenario/hardware_codecs.cc
+++ b/test/scenario/hardware_codecs.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/scenario/hardware_codecs.h"
+
#include "rtc_base/checks.h"
#ifdef WEBRTC_ANDROID
diff --git a/test/scenario/network_node.cc b/test/scenario/network_node.cc
index 1fc9655..650e26d 100644
--- a/test/scenario/network_node.cc
+++ b/test/scenario/network_node.cc
@@ -64,7 +64,6 @@
});
}
-
NetworkNodeTransport::NetworkNodeTransport(Clock* sender_clock,
Call* sender_call)
: sender_clock_(sender_clock), sender_call_(sender_call) {}
diff --git a/test/scenario/scenario.cc b/test/scenario/scenario.cc
index 9e6105b..9626030 100644
--- a/test/scenario/scenario.cc
+++ b/test/scenario/scenario.cc
@@ -53,7 +53,7 @@
kSimulatedStartTime);
}
}
-}
+} // namespace
Scenario::Scenario()
: Scenario(std::unique_ptr<LogWriterFactoryInterface>(),
@@ -86,12 +86,12 @@
}
ColumnPrinter Scenario::TimePrinter() {
- return ColumnPrinter::Lambda("time",
- [this](rtc::SimpleStringBuilder& sb) {
- sb.AppendFormat("%.3lf",
- Now().seconds<double>());
- },
- 32);
+ return ColumnPrinter::Lambda(
+ "time",
+ [this](rtc::SimpleStringBuilder& sb) {
+ sb.AppendFormat("%.3lf", Now().seconds<double>());
+ },
+ 32);
}
StatesPrinter* Scenario::CreatePrinter(std::string name,
diff --git a/test/scenario/scenario_config.h b/test/scenario/scenario_config.h
index 74cdeab..8f95a15 100644
--- a/test/scenario/scenario_config.h
+++ b/test/scenario/scenario_config.h
@@ -11,6 +11,7 @@
#define TEST_SCENARIO_SCENARIO_CONFIG_H_
#include <stddef.h>
+
#include <string>
#include "absl/types/optional.h"
diff --git a/test/scenario/scenario_tests/bbr_performance.cc b/test/scenario/scenario_tests/bbr_performance.cc
index a4af2a3..82aba2b 100644
--- a/test/scenario/scenario_tests/bbr_performance.cc
+++ b/test/scenario/scenario_tests/bbr_performance.cc
@@ -7,11 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "rtc_base/random.h"
-
#include "modules/congestion_controller/bbr/bbr_factory.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/experiments/field_trial_units.h"
+#include "rtc_base/random.h"
#include "test/field_trial.h"
#include "test/gtest.h"
#include "test/scenario/scenario.h"
@@ -21,10 +20,10 @@
namespace {
constexpr int64_t kRunTimeMs = 60000;
-using ::testing::Values;
using ::testing::Combine;
-using ::testing::tuple;
using ::testing::make_tuple;
+using ::testing::tuple;
+using ::testing::Values;
using Codec = VideoStreamConfig::Encoder::Codec;
using CodecImpl = VideoStreamConfig::Encoder::Implementation;
@@ -66,7 +65,9 @@
void Parse(std::string config_str) {
ParseFieldTrial(
{
- &use_bbr, &bbr_no_target_rate, &bbr_initial_window,
+ &use_bbr,
+ &bbr_no_target_rate,
+ &bbr_initial_window,
&bbr_encoder_gain,
},
config_str);
diff --git a/test/scenario/scenario_unittest.cc b/test/scenario/scenario_unittest.cc
index bed3b1d..c81709f 100644
--- a/test/scenario/scenario_unittest.cc
+++ b/test/scenario/scenario_unittest.cc
@@ -7,11 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/scenario/scenario.h"
+
#include <atomic>
#include "test/gtest.h"
#include "test/logging/memory_log_writer.h"
-#include "test/scenario/scenario.h"
#include "test/scenario/stats_collection.h"
namespace webrtc {
diff --git a/test/scenario/stats_collection.cc b/test/scenario/stats_collection.cc
index 6c61112..964d62a 100644
--- a/test/scenario/stats_collection.cc
+++ b/test/scenario/stats_collection.cc
@@ -9,6 +9,7 @@
*/
#include "test/scenario/stats_collection.h"
+
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "rtc_base/memory_usage.h"
diff --git a/test/scenario/stats_collection_unittest.cc b/test/scenario/stats_collection_unittest.cc
index d39ce58..716691b 100644
--- a/test/scenario/stats_collection_unittest.cc
+++ b/test/scenario/stats_collection_unittest.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/scenario/stats_collection.h"
+
#include "test/gtest.h"
#include "test/scenario/scenario.h"
diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc
index 6b0b4f0..ee389f1 100644
--- a/test/scenario/video_stream.cc
+++ b/test/scenario/video_stream.cc
@@ -361,23 +361,23 @@
using Codec = VideoStreamConfig::Encoder::Codec;
switch (config.encoder.implementation) {
case Encoder::Implementation::kFake:
- encoder_factory_ =
- absl::make_unique<FunctionVideoEncoderFactory>([this]() {
- rtc::CritScope cs(&crit_);
- std::unique_ptr<FakeEncoder> encoder;
- if (config_.encoder.codec == Codec::kVideoCodecVP8) {
- encoder =
- absl::make_unique<test::FakeVP8Encoder>(sender_->clock_);
- } else if (config_.encoder.codec == Codec::kVideoCodecGeneric) {
- encoder = absl::make_unique<test::FakeEncoder>(sender_->clock_);
- } else {
- RTC_NOTREACHED();
- }
- fake_encoders_.push_back(encoder.get());
- if (config_.encoder.fake.max_rate.IsFinite())
- encoder->SetMaxBitrate(config_.encoder.fake.max_rate.kbps());
- return encoder;
- });
+ encoder_factory_ =
+ absl::make_unique<FunctionVideoEncoderFactory>([this]() {
+ rtc::CritScope cs(&crit_);
+ std::unique_ptr<FakeEncoder> encoder;
+ if (config_.encoder.codec == Codec::kVideoCodecVP8) {
+ encoder =
+ absl::make_unique<test::FakeVP8Encoder>(sender_->clock_);
+ } else if (config_.encoder.codec == Codec::kVideoCodecGeneric) {
+ encoder = absl::make_unique<test::FakeEncoder>(sender_->clock_);
+ } else {
+ RTC_NOTREACHED();
+ }
+ fake_encoders_.push_back(encoder.get());
+ if (config_.encoder.fake.max_rate.IsFinite())
+ encoder->SetMaxBitrate(config_.encoder.fake.max_rate.kbps());
+ return encoder;
+ });
break;
case VideoStreamConfig::Encoder::Implementation::kSoftware:
encoder_factory_.reset(new InternalEncoderFactory());
diff --git a/test/testsupport/file_utils.cc b/test/testsupport/file_utils.cc
index 96bd495..0b4ffa4 100644
--- a/test/testsupport/file_utils.cc
+++ b/test/testsupport/file_utils.cc
@@ -20,6 +20,7 @@
#include <direct.h>
#include <tchar.h>
#include <windows.h>
+
#include <algorithm>
#include <codecvt>
#include <locale>
@@ -42,6 +43,7 @@
#include <stdio.h>
#include <stdlib.h>
+
#include <memory>
#include <type_traits>
#include <utility>
diff --git a/test/testsupport/file_utils_override.cc b/test/testsupport/file_utils_override.cc
index b50c437..0980691 100644
--- a/test/testsupport/file_utils_override.cc
+++ b/test/testsupport/file_utils_override.cc
@@ -17,6 +17,7 @@
#include <direct.h>
#include <tchar.h>
#include <windows.h>
+
#include <algorithm>
#include <codecvt>
#include <locale>
diff --git a/test/testsupport/file_utils_unittest.cc b/test/testsupport/file_utils_unittest.cc
index 0ff1254..c62bb7a 100644
--- a/test/testsupport/file_utils_unittest.cc
+++ b/test/testsupport/file_utils_unittest.cc
@@ -11,6 +11,7 @@
#include "test/testsupport/file_utils.h"
#include <stdio.h>
+
#include <algorithm>
#include <fstream>
#include <string>
diff --git a/test/testsupport/mock/mock_frame_reader.h b/test/testsupport/mock/mock_frame_reader.h
index 4ba416f..8da3695 100644
--- a/test/testsupport/mock/mock_frame_reader.h
+++ b/test/testsupport/mock/mock_frame_reader.h
@@ -11,9 +11,8 @@
#ifndef TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_
#define TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_
-#include "test/testsupport/frame_reader.h"
-
#include "test/gmock.h"
+#include "test/testsupport/frame_reader.h"
namespace webrtc {
namespace test {
diff --git a/test/testsupport/perf_test.cc b/test/testsupport/perf_test.cc
index 10b530a..e069c76 100644
--- a/test/testsupport/perf_test.cc
+++ b/test/testsupport/perf_test.cc
@@ -9,16 +9,18 @@
*/
#include "test/testsupport/perf_test.h"
-#include "rtc_base/checks.h"
-#include "rtc_base/critical_section.h"
#include <stdio.h>
+
#include <cmath>
#include <fstream>
#include <map>
#include <sstream>
#include <vector>
+#include "rtc_base/checks.h"
+#include "rtc_base/critical_section.h"
+
namespace {
template <typename Container>
diff --git a/test/testsupport/perf_test.h b/test/testsupport/perf_test.h
index 4f718bb..7d692a3 100644
--- a/test/testsupport/perf_test.h
+++ b/test/testsupport/perf_test.h
@@ -11,11 +11,11 @@
#ifndef TEST_TESTSUPPORT_PERF_TEST_H_
#define TEST_TESTSUPPORT_PERF_TEST_H_
-#include "api/array_view.h"
-
#include <sstream>
#include <string>
+#include "api/array_view.h"
+
namespace webrtc {
namespace test {
diff --git a/test/testsupport/test_artifacts.h b/test/testsupport/test_artifacts.h
index 925ae9e..5b9bf1d 100644
--- a/test/testsupport/test_artifacts.h
+++ b/test/testsupport/test_artifacts.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <stdlib.h>
+
#include <string>
namespace webrtc {
diff --git a/test/testsupport/test_artifacts_unittest.cc b/test/testsupport/test_artifacts_unittest.cc
index 2c3667b..cb8c77c 100644
--- a/test/testsupport/test_artifacts_unittest.cc
+++ b/test/testsupport/test_artifacts_unittest.cc
@@ -11,6 +11,7 @@
#include "test/testsupport/test_artifacts.h"
#include <string.h>
+
#include <string>
#include "rtc_base/flags.h"
diff --git a/test/testsupport/video_frame_writer_unittest.cc b/test/testsupport/video_frame_writer_unittest.cc
index e4a72dd..67fe903 100644
--- a/test/testsupport/video_frame_writer_unittest.cc
+++ b/test/testsupport/video_frame_writer_unittest.cc
@@ -8,9 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/testsupport/video_frame_writer.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <memory>
#include <string>
@@ -20,7 +23,6 @@
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
#include "test/testsupport/frame_reader.h"
-#include "test/testsupport/video_frame_writer.h"
namespace webrtc {
namespace test {
diff --git a/test/testsupport/y4m_frame_reader.cc b/test/testsupport/y4m_frame_reader.cc
index 5e50d86..6008d1e 100644
--- a/test/testsupport/y4m_frame_reader.cc
+++ b/test/testsupport/y4m_frame_reader.cc
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
+
#include <string>
#include "api/scoped_refptr.h"
diff --git a/test/testsupport/y4m_frame_reader_unittest.cc b/test/testsupport/y4m_frame_reader_unittest.cc
index b69a363..f7e2651 100644
--- a/test/testsupport/y4m_frame_reader_unittest.cc
+++ b/test/testsupport/y4m_frame_reader_unittest.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <memory>
#include <string>
diff --git a/test/testsupport/y4m_frame_writer.cc b/test/testsupport/y4m_frame_writer.cc
index 5231605..25106d8 100644
--- a/test/testsupport/y4m_frame_writer.cc
+++ b/test/testsupport/y4m_frame_writer.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <string>
#include "test/testsupport/frame_writer.h"
diff --git a/test/testsupport/y4m_frame_writer_unittest.cc b/test/testsupport/y4m_frame_writer_unittest.cc
index 7ed84cb..f12a4b8 100644
--- a/test/testsupport/y4m_frame_writer_unittest.cc
+++ b/test/testsupport/y4m_frame_writer_unittest.cc
@@ -11,6 +11,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <memory>
#include <string>
diff --git a/test/testsupport/yuv_frame_reader.cc b/test/testsupport/yuv_frame_reader.cc
index 2e788b9..91b31a6 100644
--- a/test/testsupport/yuv_frame_reader.cc
+++ b/test/testsupport/yuv_frame_reader.cc
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
+
#include <string>
#include "api/scoped_refptr.h"
diff --git a/test/testsupport/yuv_frame_reader_unittest.cc b/test/testsupport/yuv_frame_reader_unittest.cc
index a193742..525f0e9 100644
--- a/test/testsupport/yuv_frame_reader_unittest.cc
+++ b/test/testsupport/yuv_frame_reader_unittest.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <memory>
#include <string>
diff --git a/test/testsupport/yuv_frame_writer.cc b/test/testsupport/yuv_frame_writer.cc
index 2f20404..24f4f53 100644
--- a/test/testsupport/yuv_frame_writer.cc
+++ b/test/testsupport/yuv_frame_writer.cc
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stdio.h>
+
#include <string>
#include "rtc_base/checks.h"
diff --git a/test/testsupport/yuv_frame_writer_unittest.cc b/test/testsupport/yuv_frame_writer_unittest.cc
index 33980bd..13ed715 100644
--- a/test/testsupport/yuv_frame_writer_unittest.cc
+++ b/test/testsupport/yuv_frame_writer_unittest.cc
@@ -11,6 +11,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <memory>
#include <string>
diff --git a/test/time_controller/simulated_time_controller.cc b/test/time_controller/simulated_time_controller.cc
index 561559a..5e163cb 100644
--- a/test/time_controller/simulated_time_controller.cc
+++ b/test/time_controller/simulated_time_controller.cc
@@ -312,7 +312,6 @@
return process_thread;
}
-
void SimulatedTimeControllerImpl::YieldExecution() {
if (rtc::CurrentThreadId() == thread_id_) {
TaskQueueBase* yielding_from = TaskQueueBase::Current();
diff --git a/test/time_controller/simulated_time_controller_unittest.cc b/test/time_controller/simulated_time_controller_unittest.cc
index 6eb5211..15155c1 100644
--- a/test/time_controller/simulated_time_controller_unittest.cc
+++ b/test/time_controller/simulated_time_controller_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "test/time_controller/simulated_time_controller.h"
+
#include <atomic>
#include <memory>
@@ -16,7 +18,6 @@
#include "rtc_base/task_utils/repeating_task.h"
#include "test/gmock.h"
#include "test/gtest.h"
-#include "test/time_controller/simulated_time_controller.h"
// NOTE: Since these tests rely on real time behavior, they will be flaky
// if run on heavily loaded systems.
diff --git a/test/vcm_capturer.cc b/test/vcm_capturer.cc
index 3854e9f..a037f9e 100644
--- a/test/vcm_capturer.cc
+++ b/test/vcm_capturer.cc
@@ -11,6 +11,7 @@
#include "test/vcm_capturer.h"
#include <stdint.h>
+
#include <memory>
#include "modules/video_capture/video_capture_factory.h"
diff --git a/test/video_codec_settings.h b/test/video_codec_settings.h
index 1557fc9..b525048 100644
--- a/test/video_codec_settings.h
+++ b/test/video_codec_settings.h
@@ -44,7 +44,8 @@
settings->numberOfSimulcastStreams = 0;
settings->timing_frame_thresholds = {
- kTestTimingFramesDelayMs, kTestOutlierFrameSizePercent,
+ kTestTimingFramesDelayMs,
+ kTestOutlierFrameSizePercent,
};
settings->codecType = codec_type;
diff --git a/test/win/run_loop_win.cc b/test/win/run_loop_win.cc
index ee93635..6aa58b2 100644
--- a/test/win/run_loop_win.cc
+++ b/test/win/run_loop_win.cc
@@ -7,18 +7,17 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "test/run_loop.h"
-
-#include <assert.h>
-
#include <Windows.h>
+#include <assert.h>
#include <conio.h>
#include <stdio.h>
+#include "test/run_loop.h"
+
namespace webrtc {
namespace test {
-void PressEnterToContinue(SingleThreadedTaskQueueForTesting &task_queue) {
+void PressEnterToContinue(SingleThreadedTaskQueueForTesting& task_queue) {
puts(">> Press ENTER to continue...");
while (!_kbhit() || _getch() != '\r') {
diff --git a/video/encoder_overshoot_detector_unittest.cc b/video/encoder_overshoot_detector_unittest.cc
index d720d21..7170f49 100644
--- a/video/encoder_overshoot_detector_unittest.cc
+++ b/video/encoder_overshoot_detector_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "video/encoder_overshoot_detector.h"
+
#include "api/units/data_rate.h"
#include "rtc_base/fake_clock.h"
#include "rtc_base/time_utils.h"
diff --git a/video/end_to_end_tests/extended_reports_tests.cc b/video/end_to_end_tests/extended_reports_tests.cc
index 8c5f4fa..efdf6c8 100644
--- a/video/end_to_end_tests/extended_reports_tests.cc
+++ b/video/end_to_end_tests/extended_reports_tests.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <string>
#include <utility>
diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc
index 140c4e1..56da409 100644
--- a/video/end_to_end_tests/multi_codec_receive_tests.cc
+++ b/video/end_to_end_tests/multi_codec_receive_tests.cc
@@ -185,7 +185,7 @@
decoder.decoder_factory = config.decoder_factory;
video_receive_configs_[0].decoders.push_back(decoder);
- }
+ }
}
void MultiCodecReceiveTest::ConfigureEncoder(const CodecConfig& config) {
diff --git a/video/end_to_end_tests/multi_stream_tests.cc b/video/end_to_end_tests/multi_stream_tests.cc
index 0f4b997..00e7c44 100644
--- a/video/end_to_end_tests/multi_stream_tests.cc
+++ b/video/end_to_end_tests/multi_stream_tests.cc
@@ -10,6 +10,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <memory>
#include <vector>
diff --git a/video/end_to_end_tests/ssrc_tests.cc b/video/end_to_end_tests/ssrc_tests.cc
index b2fdd30..4d81a57 100644
--- a/video/end_to_end_tests/ssrc_tests.cc
+++ b/video/end_to_end_tests/ssrc_tests.cc
@@ -77,38 +77,38 @@
std::unique_ptr<test::DirectTransport> receive_transport;
std::unique_ptr<PacketInputObserver> input_observer;
- task_queue_.SendTask([this, &send_transport, &receive_transport,
- &input_observer]() {
- CreateCalls();
+ task_queue_.SendTask(
+ [this, &send_transport, &receive_transport, &input_observer]() {
+ CreateCalls();
- send_transport = absl::make_unique<test::DirectTransport>(
- &task_queue_,
- absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
+ send_transport = absl::make_unique<test::DirectTransport>(
+ &task_queue_,
+ absl::make_unique<FakeNetworkPipe>(
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig())),
- sender_call_.get(), payload_type_map_);
- receive_transport = absl::make_unique<test::DirectTransport>(
- &task_queue_,
- absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(
+ sender_call_.get(), payload_type_map_);
+ receive_transport = absl::make_unique<test::DirectTransport>(
+ &task_queue_,
+ absl::make_unique<FakeNetworkPipe>(
+ Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig())),
- receiver_call_.get(), payload_type_map_);
- input_observer =
- absl::make_unique<PacketInputObserver>(receiver_call_->Receiver());
- send_transport->SetReceiver(input_observer.get());
- receive_transport->SetReceiver(sender_call_->Receiver());
+ receiver_call_.get(), payload_type_map_);
+ input_observer =
+ absl::make_unique<PacketInputObserver>(receiver_call_->Receiver());
+ send_transport->SetReceiver(input_observer.get());
+ receive_transport->SetReceiver(sender_call_->Receiver());
- CreateSendConfig(1, 0, 0, send_transport.get());
- CreateMatchingReceiveConfigs(receive_transport.get());
+ CreateSendConfig(1, 0, 0, send_transport.get());
+ CreateMatchingReceiveConfigs(receive_transport.get());
- CreateVideoStreams();
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth,
- kDefaultHeight);
- Start();
+ CreateVideoStreams();
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth,
+ kDefaultHeight);
+ Start();
- receiver_call_->DestroyVideoReceiveStream(video_receive_streams_[0]);
- video_receive_streams_.clear();
- });
+ receiver_call_->DestroyVideoReceiveStream(video_receive_streams_[0]);
+ video_receive_streams_.clear();
+ });
// Wait() waits for a received packet.
EXPECT_TRUE(input_observer->Wait());
diff --git a/video/end_to_end_tests/transport_feedback_tests.cc b/video/end_to_end_tests/transport_feedback_tests.cc
index 95ab6ce..d8ae230 100644
--- a/video/end_to_end_tests/transport_feedback_tests.cc
+++ b/video/end_to_end_tests/transport_feedback_tests.cc
@@ -12,11 +12,10 @@
#include "call/call.h"
#include "call/fake_network_pipe.h"
#include "call/simulated_network.h"
+#include "modules/rtp_rtcp/source/byte_io.h"
#include "test/call_test.h"
#include "test/field_trial.h"
#include "test/gtest.h"
-
-#include "modules/rtp_rtcp/source/byte_io.h"
#include "test/rtcp_packet_parser.h"
#include "video/end_to_end_tests/multi_stream_tester.h"
diff --git a/video/frame_dumping_decoder.cc b/video/frame_dumping_decoder.cc
index 09cf3e9..72fc0ff 100644
--- a/video/frame_dumping_decoder.cc
+++ b/video/frame_dumping_decoder.cc
@@ -30,10 +30,9 @@
return decoder_->InitDecode(codec_settings, number_of_cores);
}
-int32_t FrameDumpingDecoder::Decode(
- const EncodedImage& input_image,
- bool missing_frames,
- int64_t render_time_ms) {
+int32_t FrameDumpingDecoder::Decode(const EncodedImage& input_image,
+ bool missing_frames,
+ int64_t render_time_ms) {
int32_t ret = decoder_->Decode(input_image, missing_frames, render_time_ms);
writer_->WriteFrame(input_image, codec_type_);
diff --git a/video/frame_dumping_decoder.h b/video/frame_dumping_decoder.h
index 5bb2271..8235a1e 100644
--- a/video/frame_dumping_decoder.h
+++ b/video/frame_dumping_decoder.h
@@ -12,6 +12,7 @@
#define VIDEO_FRAME_DUMPING_DECODER_H_
#include <stdint.h>
+
#include <memory>
#include "api/video/encoded_image.h"
diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc
index bf8bf21..de05628 100644
--- a/video/full_stack_tests.cc
+++ b/video/full_stack_tests.cc
@@ -290,9 +290,8 @@
30000, 500000, 2000000, false,
"VP8", 1, 0, 0,
false, false, true, ClipNameToClipPath("foreman_cif")};
- foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0",
- 0.0, 0.0,
- kFullStackTestDurationSecs};
+ foreman_cif.analyzer = {"foreman_cif_link_150kbps_net_delay_0_0_plr_0", 0.0,
+ 0.0, kFullStackTestDurationSecs};
foreman_cif.config->link_capacity_kbps = 150;
fixture->RunWithAnalyzer(foreman_cif);
}
@@ -1243,18 +1242,17 @@
auto fixture = CreateVideoQualityTestFixture();
ParamsWithLogging simulcast;
simulcast.call.send_side_bwe = true;
- simulcast.video[0] = {true, 1920, 1080, 30, 800000,
- 2500000, 2500000, false, "VP8", 3,
- 2, 400000, false, false, false, "Generator"};
+ simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
+ 2500000, false, "VP8", 3, 2, 400000,
+ false, false, false, "Generator"};
simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
kFullStackTestDurationSecs};
simulcast.config->loss_percent = 0;
simulcast.config->queue_delay_ms = 100;
std::vector<VideoStream> streams = {
- VideoQualityTest::DefaultVideoStream(simulcast, 0),
- VideoQualityTest::DefaultVideoStream(simulcast, 0),
- VideoQualityTest::DefaultVideoStream(simulcast, 0)
- };
+ VideoQualityTest::DefaultVideoStream(simulcast, 0),
+ VideoQualityTest::DefaultVideoStream(simulcast, 0),
+ VideoQualityTest::DefaultVideoStream(simulcast, 0)};
simulcast.ss[0] = {
streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
true};
@@ -1550,10 +1548,9 @@
// Screenshare Settings.
dual_streams.screenshare[first_stream] = {true, false, 10};
- dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000,
- 2500000, 2500000, false, "VP8", 3,
- 2, 400000, false, false, false,
- ""};
+ dual_streams.video[first_stream] = {true, 1850, 1110, 5, 800000, 2500000,
+ 2500000, false, "VP8", 3, 2, 400000,
+ false, false, false, ""};
// Video settings.
dual_streams.video[1 - first_stream] = {
true, 1280,
diff --git a/video/overuse_frame_detector_unittest.cc b/video/overuse_frame_detector_unittest.cc
index cb45482..b66d119 100644
--- a/video/overuse_frame_detector_unittest.cc
+++ b/video/overuse_frame_detector_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "video/overuse_frame_detector.h"
+
#include <memory>
#include "absl/memory/memory.h"
@@ -20,12 +22,11 @@
#include "rtc_base/task_queue_for_test.h"
#include "test/gmock.h"
#include "test/gtest.h"
-#include "video/overuse_frame_detector.h"
namespace webrtc {
-using ::testing::InvokeWithoutArgs;
using ::testing::_;
+using ::testing::InvokeWithoutArgs;
namespace {
const int kWidth = 640;
@@ -636,7 +637,8 @@
constexpr int kNumFrames = 500;
constexpr int kEncodeTimesUs[] = {
- 10 * rtc::kNumMicrosecsPerMillisec, 8 * rtc::kNumMicrosecsPerMillisec,
+ 10 * rtc::kNumMicrosecsPerMillisec,
+ 8 * rtc::kNumMicrosecsPerMillisec,
12 * rtc::kNumMicrosecsPerMillisec,
};
constexpr int kIntervalUs = 30 * rtc::kNumMicrosecsPerMillisec;
@@ -981,7 +983,7 @@
// three encoded frames, and the last of those isn't finished until after the
// first encoded frame corresponding to the next input frame.
const int kEncodeTimeUs = 30 * rtc::kNumMicrosecsPerMillisec;
- const int kCaptureTimesMs[] = { 33, 33, 66, 33 };
+ const int kCaptureTimesMs[] = {33, 33, 66, 33};
for (int capture_time_ms : kCaptureTimesMs) {
overuse_detector_->FrameSent(
@@ -998,7 +1000,8 @@
constexpr int kNumFrames = 500;
constexpr int kEncodeTimesUs[] = {
- 10 * rtc::kNumMicrosecsPerMillisec, 8 * rtc::kNumMicrosecsPerMillisec,
+ 10 * rtc::kNumMicrosecsPerMillisec,
+ 8 * rtc::kNumMicrosecsPerMillisec,
12 * rtc::kNumMicrosecsPerMillisec,
};
constexpr int kIntervalUs = 30 * rtc::kNumMicrosecsPerMillisec;
diff --git a/video/receive_statistics_proxy_unittest.cc b/video/receive_statistics_proxy_unittest.cc
index dbd6ccf..276a059 100644
--- a/video/receive_statistics_proxy_unittest.cc
+++ b/video/receive_statistics_proxy_unittest.cc
@@ -495,8 +495,7 @@
EXPECT_STREQ("", statistics_proxy_->GetStats().c_name.c_str());
}
-TEST_F(ReceiveStatisticsProxyTest,
- ReportsLongestTimingFrameInfo) {
+TEST_F(ReceiveStatisticsProxyTest, ReportsLongestTimingFrameInfo) {
const int64_t kShortEndToEndDelay = 10;
const int64_t kMedEndToEndDelay = 20;
const int64_t kLongEndToEndDelay = 100;
diff --git a/video/report_block_stats.h b/video/report_block_stats.h
index b9c09da..bb9ea78 100644
--- a/video/report_block_stats.h
+++ b/video/report_block_stats.h
@@ -12,6 +12,7 @@
#define VIDEO_REPORT_BLOCK_STATS_H_
#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/video/report_block_stats_unittest.cc b/video/report_block_stats_unittest.cc
index a9b7d35..d87c7f7 100644
--- a/video/report_block_stats_unittest.cc
+++ b/video/report_block_stats_unittest.cc
@@ -9,6 +9,7 @@
*/
#include "video/report_block_stats.h"
+
#include "test/gtest.h"
namespace webrtc {
diff --git a/video/rtp_video_stream_receiver_unittest.cc b/video/rtp_video_stream_receiver_unittest.cc
index d30a698..a688351 100644
--- a/video/rtp_video_stream_receiver_unittest.cc
+++ b/video/rtp_video_stream_receiver_unittest.cc
@@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "test/gmock.h"
-#include "test/gtest.h"
+#include "video/rtp_video_stream_receiver.h"
#include "absl/memory/memory.h"
#include "api/video/video_codec_type.h"
@@ -32,7 +31,8 @@
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"
#include "test/field_trial.h"
-#include "video/rtp_video_stream_receiver.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
using ::testing::_;
using ::testing::Invoke;
diff --git a/video/send_delay_stats.h b/video/send_delay_stats.h
index ed4b257..d9fa16a 100644
--- a/video/send_delay_stats.h
+++ b/video/send_delay_stats.h
@@ -13,6 +13,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
#include <memory>
#include <set>
diff --git a/video/stream_synchronization.cc b/video/stream_synchronization.cc
index 8a51039..493ed33 100644
--- a/video/stream_synchronization.cc
+++ b/video/stream_synchronization.cc
@@ -12,6 +12,7 @@
#include <assert.h>
#include <stdlib.h>
+
#include <algorithm>
#include "rtc_base/logging.h"
diff --git a/video/stream_synchronization_unittest.cc b/video/stream_synchronization_unittest.cc
index 2bd7eae..cbd00e8 100644
--- a/video/stream_synchronization_unittest.cc
+++ b/video/stream_synchronization_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "video/stream_synchronization.h"
+
#include <algorithm>
#include "system_wrappers/include/ntp_time.h"
#include "test/gtest.h"
-#include "video/stream_synchronization.h"
namespace webrtc {
diff --git a/video/transport_adapter.h b/video/transport_adapter.h
index a47fde3..95dd308 100644
--- a/video/transport_adapter.h
+++ b/video/transport_adapter.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <atomic>
#include "api/call/transport.h"
diff --git a/video/video_quality_observer.h b/video/video_quality_observer.h
index ecd06f8..83ef0c8 100644
--- a/video/video_quality_observer.h
+++ b/video/video_quality_observer.h
@@ -12,6 +12,7 @@
#define VIDEO_VIDEO_QUALITY_OBSERVER_H_
#include <stdint.h>
+
#include <set>
#include <vector>
diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc
index c2eac81..535c5e9 100644
--- a/video/video_quality_test.cc
+++ b/video/video_quality_test.cc
@@ -10,6 +10,7 @@
#include "video/video_quality_test.h"
#include <stdio.h>
+
#include <algorithm>
#include <deque>
#include <map>
diff --git a/video/video_quality_test.h b/video/video_quality_test.h
index a8bb8a4..711e343 100644
--- a/video/video_quality_test.h
+++ b/video/video_quality_test.h
@@ -33,8 +33,8 @@
namespace webrtc {
-class VideoQualityTest :
- public test::CallTest, public VideoQualityTestFixtureInterface {
+class VideoQualityTest : public test::CallTest,
+ public VideoQualityTestFixtureInterface {
public:
explicit VideoQualityTest(
std::unique_ptr<InjectionComponents> injection_components);
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index 458330d..a530bcf 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <string.h>
+
#include <algorithm>
#include <set>
#include <string>
diff --git a/video/video_receive_stream_unittest.cc b/video/video_receive_stream_unittest.cc
index 005b077..fc1bd78 100644
--- a/video/video_receive_stream_unittest.cc
+++ b/video/video_receive_stream_unittest.cc
@@ -8,13 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "video/video_receive_stream.h"
+
#include <algorithm>
#include <utility>
#include <vector>
-#include "test/gmock.h"
-#include "test/gtest.h"
-
#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/video/function_video_decoder_factory.h"
@@ -30,9 +29,10 @@
#include "system_wrappers/include/clock.h"
#include "test/fake_decoder.h"
#include "test/field_trial.h"
+#include "test/gmock.h"
+#include "test/gtest.h"
#include "test/video_decoder_proxy_factory.h"
#include "video/call_stats.h"
-#include "video/video_receive_stream.h"
namespace webrtc {
namespace {
diff --git a/video/video_send_stream_impl.cc b/video/video_send_stream_impl.cc
index dc52b86..7de991c 100644
--- a/video/video_send_stream_impl.cc
+++ b/video/video_send_stream_impl.cc
@@ -10,6 +10,7 @@
#include "video/video_send_stream_impl.h"
#include <stdio.h>
+
#include <algorithm>
#include <cstdint>
#include <string>
diff --git a/video/video_send_stream_impl.h b/video/video_send_stream_impl.h
index c451576..7f734e9 100644
--- a/video/video_send_stream_impl.h
+++ b/video/video_send_stream_impl.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+
#include <atomic>
#include <map>
#include <memory>
diff --git a/video/video_send_stream_impl_unittest.cc b/video/video_send_stream_impl_unittest.cc
index e6886ae..51e31f7 100644
--- a/video/video_send_stream_impl_unittest.cc
+++ b/video/video_send_stream_impl_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "video/video_send_stream_impl.h"
+
#include <string>
#include "absl/memory/memory.h"
@@ -27,7 +29,6 @@
#include "test/gtest.h"
#include "test/mock_transport.h"
#include "video/test/mock_video_stream_encoder.h"
-#include "video/video_send_stream_impl.h"
namespace webrtc {
namespace internal {
@@ -340,20 +341,20 @@
config_.rtp.ssrcs.emplace_back(2);
EXPECT_CALL(bitrate_allocator_, AddObserver(vss_impl.get(), _))
- .WillRepeatedly(Invoke([&](BitrateAllocatorObserver*,
- MediaStreamAllocationConfig config) {
- EXPECT_EQ(config.min_bitrate_bps,
- static_cast<uint32_t>(low_stream.min_bitrate_bps));
- EXPECT_EQ(config.max_bitrate_bps,
- static_cast<uint32_t>(low_stream.max_bitrate_bps +
- high_stream.max_bitrate_bps));
- if (config.pad_up_bitrate_bps != 0) {
- EXPECT_EQ(
- config.pad_up_bitrate_bps,
- static_cast<uint32_t>(low_stream.target_bitrate_bps +
- 1.25 * high_stream.min_bitrate_bps));
- }
- }));
+ .WillRepeatedly(Invoke(
+ [&](BitrateAllocatorObserver*, MediaStreamAllocationConfig config) {
+ EXPECT_EQ(config.min_bitrate_bps,
+ static_cast<uint32_t>(low_stream.min_bitrate_bps));
+ EXPECT_EQ(config.max_bitrate_bps,
+ static_cast<uint32_t>(low_stream.max_bitrate_bps +
+ high_stream.max_bitrate_bps));
+ if (config.pad_up_bitrate_bps != 0) {
+ EXPECT_EQ(
+ config.pad_up_bitrate_bps,
+ static_cast<uint32_t>(low_stream.target_bitrate_bps +
+ 1.25 * high_stream.min_bitrate_bps));
+ }
+ }));
static_cast<VideoStreamEncoderInterface::EncoderSink*>(vss_impl.get())
->OnEncoderConfigurationChanged(
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index e327ba0..96da991 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -23,6 +23,7 @@
#include "call/fake_network_pipe.h"
#include "call/rtp_transport_controller_send.h"
#include "call/simulated_network.h"
+#include "call/video_send_stream.h"
#include "modules/rtp_rtcp/include/rtp_header_parser.h"
#include "modules/rtp_rtcp/include/rtp_rtcp.h"
#include "modules/rtp_rtcp/source/rtcp_sender.h"
@@ -53,8 +54,6 @@
#include "test/rtcp_packet_parser.h"
#include "test/testsupport/perf_test.h"
#include "test/video_encoder_proxy_factory.h"
-
-#include "call/video_send_stream.h"
#include "video/send_statistics_proxy.h"
#include "video/transport_adapter.h"
#include "video/video_send_stream.h"
diff --git a/video/video_stream_decoder_impl.cc b/video/video_stream_decoder_impl.cc
index 003f230..48733ec 100644
--- a/video/video_stream_decoder_impl.cc
+++ b/video/video_stream_decoder_impl.cc
@@ -34,9 +34,7 @@
"video_stream_decoder_decode_thread",
rtc::kHighestPriority),
timing_(Clock::GetRealTimeClock()),
- frame_buffer_(Clock::GetRealTimeClock(),
- &timing_,
- nullptr),
+ frame_buffer_(Clock::GetRealTimeClock(), &timing_, nullptr),
next_frame_timestamps_index_(0) {
frame_timestamps_.fill({-1, -1, -1});
decode_thread_.Start();
@@ -215,7 +213,7 @@
});
int32_t decode_result = decoder->Decode(frame->EncodedImage(),
- false, // missing_frame
+ false, // missing_frame
frame->RenderTimeMs());
return decode_result == WEBRTC_VIDEO_CODEC_OK ? kOk : kDecodeFailure;