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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 remb_bitrate_bps_(1000000), | 1758 remb_bitrate_bps_(1000000), |
1759 receive_transport_(nullptr), | 1759 receive_transport_(nullptr), |
1760 event_(false, false), | 1760 event_(false, false), |
1761 poller_thread_(&BitrateStatsPollingThread, | 1761 poller_thread_(&BitrateStatsPollingThread, |
1762 this, | 1762 this, |
1763 "BitrateStatsPollingThread"), | 1763 "BitrateStatsPollingThread"), |
1764 state_(kWaitForFirstRampUp) {} | 1764 state_(kWaitForFirstRampUp) {} |
1765 | 1765 |
1766 ~BweObserver() {} | 1766 ~BweObserver() {} |
1767 | 1767 |
1768 test::PacketTransport* CreateReceiveTransport() { | 1768 test::PacketTransport* CreateReceiveTransport() override { |
1769 receive_transport_ = new test::PacketTransport( | 1769 receive_transport_ = new test::PacketTransport( |
1770 nullptr, this, test::PacketTransport::kReceiver, | 1770 nullptr, this, test::PacketTransport::kReceiver, |
1771 FakeNetworkPipe::Config()); | 1771 FakeNetworkPipe::Config()); |
1772 return receive_transport_; | 1772 return receive_transport_; |
1773 } | 1773 } |
1774 | 1774 |
1775 Call::Config GetSenderCallConfig() override { | 1775 Call::Config GetSenderCallConfig() override { |
1776 Call::Config config; | 1776 Call::Config config; |
1777 // Set a high start bitrate to reduce the test completion time. | 1777 // Set a high start bitrate to reduce the test completion time. |
1778 config.bitrate_config.start_bitrate_bps = remb_bitrate_bps_; | 1778 config.bitrate_config.start_bitrate_bps = remb_bitrate_bps_; |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 ++sent_rtcp_rrtr_; | 2238 ++sent_rtcp_rrtr_; |
2239 } | 2239 } |
2240 EXPECT_NE(packet_type, RTCPUtility::RTCPPacketTypes::kSr); | 2240 EXPECT_NE(packet_type, RTCPUtility::RTCPPacketTypes::kSr); |
2241 EXPECT_NE(packet_type, | 2241 EXPECT_NE(packet_type, |
2242 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem); | 2242 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem); |
2243 packet_type = parser.Iterate(); | 2243 packet_type = parser.Iterate(); |
2244 } | 2244 } |
2245 return SEND_PACKET; | 2245 return SEND_PACKET; |
2246 } | 2246 } |
2247 // Send stream should send SR packets (and DLRR packets if enabled). | 2247 // Send stream should send SR packets (and DLRR packets if enabled). |
2248 virtual Action OnSendRtcp(const uint8_t* packet, size_t length) { | 2248 Action OnSendRtcp(const uint8_t* packet, size_t length) override { |
2249 rtc::CritScope lock(&crit_); | 2249 rtc::CritScope lock(&crit_); |
2250 RTCPUtility::RTCPParserV2 parser(packet, length, true); | 2250 RTCPUtility::RTCPParserV2 parser(packet, length, true); |
2251 EXPECT_TRUE(parser.IsValid()); | 2251 EXPECT_TRUE(parser.IsValid()); |
2252 | 2252 |
2253 RTCPUtility::RTCPPacketTypes packet_type = parser.Begin(); | 2253 RTCPUtility::RTCPPacketTypes packet_type = parser.Begin(); |
2254 while (packet_type != RTCPUtility::RTCPPacketTypes::kInvalid) { | 2254 while (packet_type != RTCPUtility::RTCPPacketTypes::kInvalid) { |
2255 if (packet_type == RTCPUtility::RTCPPacketTypes::kSr) { | 2255 if (packet_type == RTCPUtility::RTCPPacketTypes::kSr) { |
2256 ++sent_rtcp_sr_; | 2256 ++sent_rtcp_sr_; |
2257 } else if (packet_type == | 2257 } else if (packet_type == |
2258 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem) { | 2258 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem) { |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3498 private: | 3498 private: |
3499 bool video_observed_; | 3499 bool video_observed_; |
3500 bool audio_observed_; | 3500 bool audio_observed_; |
3501 SequenceNumberUnwrapper unwrapper_; | 3501 SequenceNumberUnwrapper unwrapper_; |
3502 std::set<int64_t> received_packet_ids_; | 3502 std::set<int64_t> received_packet_ids_; |
3503 } test; | 3503 } test; |
3504 | 3504 |
3505 RunBaseTest(&test); | 3505 RunBaseTest(&test); |
3506 } | 3506 } |
3507 } // namespace webrtc | 3507 } // namespace webrtc |
OLD | NEW |