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> // max | 10 #include <algorithm> // max |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 EXPECT_TRUE(Wait()) << "Timed out while waiting for a single RTP packet."; | 205 EXPECT_TRUE(Wait()) << "Timed out while waiting for a single RTP packet."; |
206 } | 206 } |
207 | 207 |
208 test::DelayedEncoder encoder_; | 208 test::DelayedEncoder encoder_; |
209 } test; | 209 } test; |
210 | 210 |
211 RunBaseTest(&test); | 211 RunBaseTest(&test); |
212 } | 212 } |
213 | 213 |
214 TEST_F(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) { | 214 TEST_F(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) { |
215 static const uint8_t kExtensionId = 13; | 215 static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId; |
216 class TransportWideSequenceNumberObserver : public test::SendTest { | 216 class TransportWideSequenceNumberObserver : public test::SendTest { |
217 public: | 217 public: |
218 TransportWideSequenceNumberObserver() | 218 TransportWideSequenceNumberObserver() |
219 : SendTest(kDefaultTimeoutMs), encoder_(Clock::GetRealTimeClock()) { | 219 : SendTest(kDefaultTimeoutMs), encoder_(Clock::GetRealTimeClock()) { |
220 EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( | 220 EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( |
221 kRtpExtensionTransportSequenceNumber, kExtensionId)); | 221 kRtpExtensionTransportSequenceNumber, kExtensionId)); |
222 } | 222 } |
223 | 223 |
224 private: | 224 private: |
225 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 225 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 VideoSendStream* stream_; | 1208 VideoSendStream* stream_; |
1209 bool bitrate_capped_; | 1209 bool bitrate_capped_; |
1210 } test; | 1210 } test; |
1211 | 1211 |
1212 RunBaseTest(&test); | 1212 RunBaseTest(&test); |
1213 } | 1213 } |
1214 | 1214 |
1215 TEST_F(VideoSendStreamTest, ChangingNetworkRoute) { | 1215 TEST_F(VideoSendStreamTest, ChangingNetworkRoute) { |
1216 static const int kStartBitrateBps = 300000; | 1216 static const int kStartBitrateBps = 300000; |
1217 static const int kNewMaxBitrateBps = 1234567; | 1217 static const int kNewMaxBitrateBps = 1234567; |
1218 static const uint8_t kExtensionId = 13; | 1218 static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId; |
1219 class ChangingNetworkRouteTest : public test::EndToEndTest { | 1219 class ChangingNetworkRouteTest : public test::EndToEndTest { |
1220 public: | 1220 public: |
1221 ChangingNetworkRouteTest() | 1221 ChangingNetworkRouteTest() |
1222 : EndToEndTest(test::CallTest::kDefaultTimeoutMs), call_(nullptr) { | 1222 : EndToEndTest(test::CallTest::kDefaultTimeoutMs), call_(nullptr) { |
1223 EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( | 1223 EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( |
1224 kRtpExtensionTransportSequenceNumber, kExtensionId)); | 1224 kRtpExtensionTransportSequenceNumber, kExtensionId)); |
1225 } | 1225 } |
1226 | 1226 |
1227 void OnCallsCreated(Call* sender_call, Call* receiver_call) override { | 1227 void OnCallsCreated(Call* sender_call, Call* receiver_call) override { |
1228 call_ = sender_call; | 1228 call_ = sender_call; |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 observation_complete_.Set(); | 2888 observation_complete_.Set(); |
2889 } | 2889 } |
2890 } | 2890 } |
2891 } test; | 2891 } test; |
2892 | 2892 |
2893 RunBaseTest(&test); | 2893 RunBaseTest(&test); |
2894 } | 2894 } |
2895 #endif // !defined(RTC_DISABLE_VP9) | 2895 #endif // !defined(RTC_DISABLE_VP9) |
2896 | 2896 |
2897 } // namespace webrtc | 2897 } // namespace webrtc |
OLD | NEW |