OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 EXPECT_EQ(2u, counters.transmitted.packets); | 150 EXPECT_EQ(2u, counters.transmitted.packets); |
151 } | 151 } |
152 | 152 |
153 TEST_F(ReceiveStatisticsTest, RtcpCallbacks) { | 153 TEST_F(ReceiveStatisticsTest, RtcpCallbacks) { |
154 class TestCallback : public RtcpStatisticsCallback { | 154 class TestCallback : public RtcpStatisticsCallback { |
155 public: | 155 public: |
156 TestCallback() | 156 TestCallback() |
157 : RtcpStatisticsCallback(), num_calls_(0), ssrc_(0), stats_() {} | 157 : RtcpStatisticsCallback(), num_calls_(0), ssrc_(0), stats_() {} |
158 virtual ~TestCallback() {} | 158 virtual ~TestCallback() {} |
159 | 159 |
160 void StatisticsUpdated(const RtcpStatistics& statistics, | 160 virtual void StatisticsUpdated(const RtcpStatistics& statistics, |
161 uint32_t ssrc) override { | 161 uint32_t ssrc) { |
162 ssrc_ = ssrc; | 162 ssrc_ = ssrc; |
163 stats_ = statistics; | 163 stats_ = statistics; |
164 ++num_calls_; | 164 ++num_calls_; |
165 } | 165 } |
166 | 166 |
167 void CNameChanged(const char* cname, uint32_t ssrc) override {} | 167 void CNameChanged(const char* cname, uint32_t ssrc) override {} |
168 | 168 |
169 uint32_t num_calls_; | 169 uint32_t num_calls_; |
170 uint32_t ssrc_; | 170 uint32_t ssrc_; |
171 RtcpStatistics stats_; | 171 RtcpStatistics stats_; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 callback.Matches(1, kSsrc1, expected); | 373 callback.Matches(1, kSsrc1, expected); |
374 | 374 |
375 receive_statistics_->FecPacketReceived(header1_, | 375 receive_statistics_->FecPacketReceived(header1_, |
376 kPacketSize1 + kHeaderLength); | 376 kPacketSize1 + kHeaderLength); |
377 expected.fec.payload_bytes = kPacketSize1; | 377 expected.fec.payload_bytes = kPacketSize1; |
378 expected.fec.header_bytes = kHeaderLength; | 378 expected.fec.header_bytes = kHeaderLength; |
379 expected.fec.packets = 1; | 379 expected.fec.packets = 1; |
380 callback.Matches(2, kSsrc1, expected); | 380 callback.Matches(2, kSsrc1, expected); |
381 } | 381 } |
382 } // namespace webrtc | 382 } // namespace webrtc |
OLD | NEW |