| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 kRtpExtensionAbsoluteSendTime, test::kAbsSendTimeExtensionId)); | 129 kRtpExtensionAbsoluteSendTime, test::kAbsSendTimeExtensionId)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 132 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
| 133 RTPHeader header; | 133 RTPHeader header; |
| 134 EXPECT_TRUE(parser_->Parse(packet, length, &header)); | 134 EXPECT_TRUE(parser_->Parse(packet, length, &header)); |
| 135 | 135 |
| 136 EXPECT_FALSE(header.extension.hasTransmissionTimeOffset); | 136 EXPECT_FALSE(header.extension.hasTransmissionTimeOffset); |
| 137 EXPECT_TRUE(header.extension.hasAbsoluteSendTime); | 137 EXPECT_TRUE(header.extension.hasAbsoluteSendTime); |
| 138 EXPECT_EQ(header.extension.transmissionTimeOffset, 0); | 138 EXPECT_EQ(header.extension.transmissionTimeOffset, 0); |
| 139 EXPECT_GT(header.extension.absoluteSendTime, 0u); | 139 if (header.extension.absoluteSendTime != 0) { |
| 140 observation_complete_.Set(); | 140 // Wait for at least one packet with a non-zero send time. The send time |
| 141 // is a 16-bit value derived from the system clock, and it is valid |
| 142 // for a packet to have a zero send time. To tell that from an |
| 143 // unpopulated value we'll wait for a packet with non-zero send time. |
| 144 observation_complete_.Set(); |
| 145 } else { |
| 146 LOG(LS_WARNING) << "Got a packet with zero absoluteSendTime, waiting" |
| 147 " for another packet..."; |
| 148 } |
| 141 | 149 |
| 142 return SEND_PACKET; | 150 return SEND_PACKET; |
| 143 } | 151 } |
| 144 | 152 |
| 145 void ModifyVideoConfigs( | 153 void ModifyVideoConfigs( |
| 146 VideoSendStream::Config* send_config, | 154 VideoSendStream::Config* send_config, |
| 147 std::vector<VideoReceiveStream::Config>* receive_configs, | 155 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 148 VideoEncoderConfig* encoder_config) override { | 156 VideoEncoderConfig* encoder_config) override { |
| 149 send_config->rtp.extensions.clear(); | 157 send_config->rtp.extensions.clear(); |
| 150 send_config->rtp.extensions.push_back(RtpExtension( | 158 send_config->rtp.extensions.push_back(RtpExtension( |
| (...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2525 observation_complete_.Set(); | 2533 observation_complete_.Set(); |
| 2526 } | 2534 } |
| 2527 } | 2535 } |
| 2528 } test; | 2536 } test; |
| 2529 | 2537 |
| 2530 RunBaseTest(&test); | 2538 RunBaseTest(&test); |
| 2531 } | 2539 } |
| 2532 #endif // !defined(RTC_DISABLE_VP9) | 2540 #endif // !defined(RTC_DISABLE_VP9) |
| 2533 | 2541 |
| 2534 } // namespace webrtc | 2542 } // namespace webrtc |
| OLD | NEW |