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