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 |
11 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" |
14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
15 #include "webrtc/system_wrappers/include/clock.h" | 15 #include "webrtc/system_wrappers/include/clock.h" |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 | 18 |
19 SendTimeHistory::SendTimeHistory(Clock* clock, int64_t packet_age_limit_ms) | 19 SendTimeHistory::SendTimeHistory(const Clock* clock, |
| 20 int64_t packet_age_limit_ms) |
20 : clock_(clock), packet_age_limit_ms_(packet_age_limit_ms) {} | 21 : clock_(clock), packet_age_limit_ms_(packet_age_limit_ms) {} |
21 | 22 |
22 SendTimeHistory::~SendTimeHistory() {} | 23 SendTimeHistory::~SendTimeHistory() {} |
23 | 24 |
24 void SendTimeHistory::Clear() { | 25 void SendTimeHistory::Clear() { |
25 history_.clear(); | 26 history_.clear(); |
26 } | 27 } |
27 | 28 |
28 void SendTimeHistory::AddAndRemoveOld(uint16_t sequence_number, | 29 void SendTimeHistory::AddAndRemoveOld(uint16_t sequence_number, |
29 size_t payload_size, | 30 size_t payload_size, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 int64_t arrival_time_ms = packet_feedback->arrival_time_ms; | 72 int64_t arrival_time_ms = packet_feedback->arrival_time_ms; |
72 *packet_feedback = it->second; | 73 *packet_feedback = it->second; |
73 packet_feedback->arrival_time_ms = arrival_time_ms; | 74 packet_feedback->arrival_time_ms = arrival_time_ms; |
74 | 75 |
75 if (remove) | 76 if (remove) |
76 history_.erase(it); | 77 history_.erase(it); |
77 return true; | 78 return true; |
78 } | 79 } |
79 | 80 |
80 } // namespace webrtc | 81 } // namespace webrtc |
OLD | NEW |