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() override { | 1768 test::PacketTransport* CreateReceiveTransport() { |
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 ++sent_rtcp_rrtr_; | 2241 ++sent_rtcp_rrtr_; |
2242 } | 2242 } |
2243 EXPECT_NE(packet_type, RTCPUtility::RTCPPacketTypes::kSr); | 2243 EXPECT_NE(packet_type, RTCPUtility::RTCPPacketTypes::kSr); |
2244 EXPECT_NE(packet_type, | 2244 EXPECT_NE(packet_type, |
2245 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem); | 2245 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem); |
2246 packet_type = parser.Iterate(); | 2246 packet_type = parser.Iterate(); |
2247 } | 2247 } |
2248 return SEND_PACKET; | 2248 return SEND_PACKET; |
2249 } | 2249 } |
2250 // Send stream should send SR packets (and DLRR packets if enabled). | 2250 // Send stream should send SR packets (and DLRR packets if enabled). |
2251 Action OnSendRtcp(const uint8_t* packet, size_t length) override { | 2251 virtual Action OnSendRtcp(const uint8_t* packet, size_t length) { |
2252 rtc::CritScope lock(&crit_); | 2252 rtc::CritScope lock(&crit_); |
2253 RTCPUtility::RTCPParserV2 parser(packet, length, true); | 2253 RTCPUtility::RTCPParserV2 parser(packet, length, true); |
2254 EXPECT_TRUE(parser.IsValid()); | 2254 EXPECT_TRUE(parser.IsValid()); |
2255 | 2255 |
2256 RTCPUtility::RTCPPacketTypes packet_type = parser.Begin(); | 2256 RTCPUtility::RTCPPacketTypes packet_type = parser.Begin(); |
2257 while (packet_type != RTCPUtility::RTCPPacketTypes::kInvalid) { | 2257 while (packet_type != RTCPUtility::RTCPPacketTypes::kInvalid) { |
2258 if (packet_type == RTCPUtility::RTCPPacketTypes::kSr) { | 2258 if (packet_type == RTCPUtility::RTCPPacketTypes::kSr) { |
2259 ++sent_rtcp_sr_; | 2259 ++sent_rtcp_sr_; |
2260 } else if (packet_type == | 2260 } else if (packet_type == |
2261 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem) { | 2261 RTCPUtility::RTCPPacketTypes::kXrDlrrReportBlockItem) { |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3501 private: | 3501 private: |
3502 bool video_observed_; | 3502 bool video_observed_; |
3503 bool audio_observed_; | 3503 bool audio_observed_; |
3504 SequenceNumberUnwrapper unwrapper_; | 3504 SequenceNumberUnwrapper unwrapper_; |
3505 std::set<int64_t> received_packet_ids_; | 3505 std::set<int64_t> received_packet_ids_; |
3506 } test; | 3506 } test; |
3507 | 3507 |
3508 RunBaseTest(&test); | 3508 RunBaseTest(&test); |
3509 } | 3509 } |
3510 } // namespace webrtc | 3510 } // namespace webrtc |
OLD | NEW |