Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -39,9 +39,8 @@ RTPHeader CreateRtpHeader(uint32_t ssrc) {
class ReceiveStatisticsTest : public ::testing::Test {
public:
ReceiveStatisticsTest() :
clock_(0),
receive_statistics_(ReceiveStatistics::Create(&clock_)) {
ReceiveStatisticsTest()
: clock_(0), receive_statistics_(ReceiveStatistics::Create(&clock_)) {
header1_ = CreateRtpHeader(kSsrc1);
header2_ = CreateRtpHeader(kSsrc2);
}
@ -74,8 +73,7 @@ TEST_F(ReceiveStatisticsTest, TwoIncomingSsrcs) {
EXPECT_EQ(200u, bytes_received);
EXPECT_EQ(2u, packets_received);
statistician =
receive_statistics_->GetStatistician(kSsrc2);
statistician = receive_statistics_->GetStatistician(kSsrc2);
ASSERT_TRUE(statistician != NULL);
EXPECT_GT(statistician->BitrateReceived(), 0u);
statistician->GetDataCounters(&bytes_received, &packets_received);
@ -236,8 +234,8 @@ TEST_F(ReceiveStatisticsTest, RtcpCallbacks) {
// Call GetStatistics, simulating a timed rtcp sender thread.
RtcpStatistics statistics;
receive_statistics_->GetStatistician(kSsrc1)
->GetStatistics(&statistics, true);
receive_statistics_->GetStatistician(kSsrc1)->GetStatistics(&statistics,
true);
EXPECT_EQ(1u, callback.num_calls_);
EXPECT_EQ(callback.ssrc_, kSsrc1);
@ -272,8 +270,8 @@ TEST_F(ReceiveStatisticsTest, RtcpCallbacks) {
receive_statistics_->IncomingPacket(header1_, kPacketSize1, false);
++header1_.sequenceNumber;
receive_statistics_->GetStatistician(kSsrc1)
->GetStatistics(&statistics, true);
receive_statistics_->GetStatistician(kSsrc1)->GetStatistics(&statistics,
true);
// Should not have been called after deregister.
EXPECT_EQ(1u, callback.num_calls_);
@ -324,8 +322,8 @@ TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
// One packet of size kPacketSize1.
header1_.headerLength = kHeaderLength;
receive_statistics_->IncomingPacket(
header1_, kPacketSize1 + kHeaderLength, false);
receive_statistics_->IncomingPacket(header1_, kPacketSize1 + kHeaderLength,
false);
StreamDataCounters expected;
expected.transmitted.payload_bytes = kPacketSize1;
expected.transmitted.header_bytes = kHeaderLength;
@ -368,8 +366,8 @@ TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
++header1_.sequenceNumber;
clock_.AdvanceTimeMilliseconds(5);
// One FEC packet.
receive_statistics_->IncomingPacket(
header1_, kPacketSize1 + kHeaderLength, false);
receive_statistics_->IncomingPacket(header1_, kPacketSize1 + kHeaderLength,
false);
receive_statistics_->FecPacketReceived(header1_,
kPacketSize1 + kHeaderLength);
expected.transmitted.payload_bytes = kPacketSize1 * 4;
@ -385,8 +383,8 @@ TEST_F(ReceiveStatisticsTest, RtpCallbacks) {
// New stats, but callback should not be called.
++header1_.sequenceNumber;
clock_.AdvanceTimeMilliseconds(5);
receive_statistics_->IncomingPacket(
header1_, kPacketSize1 + kHeaderLength, true);
receive_statistics_->IncomingPacket(header1_, kPacketSize1 + kHeaderLength,
true);
callback.Matches(5, kSsrc1, expected);
}
@ -402,8 +400,8 @@ TEST_F(ReceiveStatisticsTest, RtpCallbacksFecFirst) {
kPacketSize1 + kHeaderLength);
EXPECT_EQ(0u, callback.num_calls_);
receive_statistics_->IncomingPacket(
header1_, kPacketSize1 + kHeaderLength, false);
receive_statistics_->IncomingPacket(header1_, kPacketSize1 + kHeaderLength,
false);
StreamDataCounters expected;
expected.transmitted.payload_bytes = kPacketSize1;
expected.transmitted.header_bytes = kHeaderLength;