| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 "webrtc/test/call_test.h" | 10 #include "webrtc/test/call_test.h" |
| 11 #include "webrtc/test/encoder_settings.h" | 11 #include "webrtc/test/encoder_settings.h" |
| 12 | 12 |
| 13 namespace webrtc { | 13 namespace webrtc { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 const int kVideoRotationRtpExtensionId = 4; | 17 const int kVideoRotationRtpExtensionId = 4; |
| 18 const int kTWSExtensionId = 5; |
| 18 } | 19 } |
| 19 | 20 |
| 20 CallTest::CallTest() | 21 CallTest::CallTest() |
| 21 : clock_(Clock::GetRealTimeClock()), | 22 : clock_(Clock::GetRealTimeClock()), |
| 22 send_stream_(NULL), | 23 send_stream_(NULL), |
| 23 fake_encoder_(clock_) { | 24 fake_encoder_(clock_) { |
| 24 } | 25 } |
| 25 | 26 |
| 26 CallTest::~CallTest() { | 27 CallTest::~CallTest() { |
| 27 } | 28 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 send_config_.encoder_settings.encoder = &fake_encoder_; | 95 send_config_.encoder_settings.encoder = &fake_encoder_; |
| 95 send_config_.encoder_settings.payload_name = "FAKE"; | 96 send_config_.encoder_settings.payload_name = "FAKE"; |
| 96 send_config_.encoder_settings.payload_type = kFakeSendPayloadType; | 97 send_config_.encoder_settings.payload_type = kFakeSendPayloadType; |
| 97 send_config_.rtp.extensions.push_back( | 98 send_config_.rtp.extensions.push_back( |
| 98 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId)); | 99 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId)); |
| 99 encoder_config_.streams = test::CreateVideoStreams(num_streams); | 100 encoder_config_.streams = test::CreateVideoStreams(num_streams); |
| 100 for (size_t i = 0; i < num_streams; ++i) | 101 for (size_t i = 0; i < num_streams; ++i) |
| 101 send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]); | 102 send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]); |
| 102 send_config_.rtp.extensions.push_back( | 103 send_config_.rtp.extensions.push_back( |
| 103 RtpExtension(RtpExtension::kVideoRotation, kVideoRotationRtpExtensionId)); | 104 RtpExtension(RtpExtension::kVideoRotation, kVideoRotationRtpExtensionId)); |
| 105 send_config_.rtp.extensions.push_back( |
| 106 RtpExtension(RtpExtension::kTransportSequenceNumber, kTWSExtensionId)); |
| 104 } | 107 } |
| 105 | 108 |
| 106 void CallTest::CreateMatchingReceiveConfigs() { | 109 void CallTest::CreateMatchingReceiveConfigs() { |
| 107 assert(!send_config_.rtp.ssrcs.empty()); | 110 assert(!send_config_.rtp.ssrcs.empty()); |
| 108 assert(receive_configs_.empty()); | 111 assert(receive_configs_.empty()); |
| 109 assert(allocated_decoders_.empty()); | 112 assert(allocated_decoders_.empty()); |
| 110 VideoReceiveStream::Config config; | 113 VideoReceiveStream::Config config; |
| 111 config.rtp.remb = true; | 114 config.rtp.remb = true; |
| 112 config.rtp.local_ssrc = kReceiverLocalSsrc; | 115 config.rtp.local_ssrc = kReceiverLocalSsrc; |
| 113 for (const RtpExtension& extension : send_config_.rtp.extensions) | 116 for (const RtpExtension& extension : send_config_.rtp.extensions) |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 const FakeNetworkPipe::Config& config) | 233 const FakeNetworkPipe::Config& config) |
| 231 : BaseTest(timeout_ms, config) { | 234 : BaseTest(timeout_ms, config) { |
| 232 } | 235 } |
| 233 | 236 |
| 234 bool EndToEndTest::ShouldCreateReceivers() const { | 237 bool EndToEndTest::ShouldCreateReceivers() const { |
| 235 return true; | 238 return true; |
| 236 } | 239 } |
| 237 | 240 |
| 238 } // namespace test | 241 } // namespace test |
| 239 } // namespace webrtc | 242 } // namespace webrtc |
| OLD | NEW |