| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 | 10 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 while (true) { | 198 while (true) { |
| 199 Packet packet; | 199 Packet packet; |
| 200 { | 200 { |
| 201 webrtc::CriticalSectionScoped lock(pq_crit_.get()); | 201 webrtc::CriticalSectionScoped lock(pq_crit_.get()); |
| 202 if (packet_queue_.empty()) | 202 if (packet_queue_.empty()) |
| 203 break; | 203 break; |
| 204 packet = packet_queue_.front(); | 204 packet = packet_queue_.front(); |
| 205 packet_queue_.pop_front(); | 205 packet_queue_.pop_front(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 int32 elapsed_time_ms = rtc::TimeSince(packet.send_time_ms_); | 208 int32_t elapsed_time_ms = rtc::TimeSince(packet.send_time_ms_); |
| 209 int32 sleep_ms = rtt_ms_ / 2 - elapsed_time_ms; | 209 int32_t sleep_ms = rtt_ms_ / 2 - elapsed_time_ms; |
| 210 if (sleep_ms > 0) { | 210 if (sleep_ms > 0) { |
| 211 // Every packet should be delayed by half of RTT. | 211 // Every packet should be delayed by half of RTT. |
| 212 webrtc::SleepMs(sleep_ms); | 212 webrtc::SleepMs(sleep_ms); |
| 213 } | 213 } |
| 214 | 214 |
| 215 SendPacket(packet); | 215 SendPacket(packet); |
| 216 } | 216 } |
| 217 return true; | 217 return true; |
| 218 } | 218 } |
| 219 | 219 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 bool ConferenceTransport::GetReceiverStatistics(unsigned int id, | 279 bool ConferenceTransport::GetReceiverStatistics(unsigned int id, |
| 280 webrtc::CallStatistics* stats) { | 280 webrtc::CallStatistics* stats) { |
| 281 int dst = GetReceiverChannelForSsrc(id); | 281 int dst = GetReceiverChannelForSsrc(id); |
| 282 if (dst == -1) { | 282 if (dst == -1) { |
| 283 return false; | 283 return false; |
| 284 } | 284 } |
| 285 EXPECT_EQ(0, local_rtp_rtcp_->GetRTCPStatistics(dst, *stats)); | 285 EXPECT_EQ(0, local_rtp_rtcp_->GetRTCPStatistics(dst, *stats)); |
| 286 return true; | 286 return true; |
| 287 } | 287 } |
| 288 } // namespace voetest | 288 } // namespace voetest |
| OLD | NEW |