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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 size_t payload_size, | 45 size_t payload_size, |
46 const RTPHeader& header, | 46 const RTPHeader& header, |
47 bool was_paced) { | 47 bool was_paced) { |
48 if (!header.extension.hasTransportSequenceNumber) { | 48 if (!header.extension.hasTransportSequenceNumber) { |
49 LOG(LS_WARNING) << "RemoteEstimatorProxy: Incoming packet " | 49 LOG(LS_WARNING) << "RemoteEstimatorProxy: Incoming packet " |
50 "is missing the transport sequence number extension!"; | 50 "is missing the transport sequence number extension!"; |
51 return; | 51 return; |
52 } | 52 } |
53 rtc::CritScope cs(&lock_); | 53 rtc::CritScope cs(&lock_); |
54 media_ssrc_ = header.ssrc; | 54 media_ssrc_ = header.ssrc; |
| 55 |
55 OnPacketArrival(header.extension.transportSequenceNumber, arrival_time_ms); | 56 OnPacketArrival(header.extension.transportSequenceNumber, arrival_time_ms); |
56 } | 57 } |
57 | 58 |
58 void RemoteEstimatorProxy::RemoveStream(unsigned int ssrc) {} | |
59 | |
60 bool RemoteEstimatorProxy::LatestEstimate(std::vector<unsigned int>* ssrcs, | 59 bool RemoteEstimatorProxy::LatestEstimate(std::vector<unsigned int>* ssrcs, |
61 unsigned int* bitrate_bps) const { | 60 unsigned int* bitrate_bps) const { |
62 return false; | 61 return false; |
63 } | 62 } |
64 | 63 |
65 bool RemoteEstimatorProxy::GetStats( | |
66 ReceiveBandwidthEstimatorStats* output) const { | |
67 return false; | |
68 } | |
69 | |
70 | |
71 int64_t RemoteEstimatorProxy::TimeUntilNextProcess() { | 64 int64_t RemoteEstimatorProxy::TimeUntilNextProcess() { |
72 int64_t now = clock_->TimeInMilliseconds(); | 65 int64_t now = clock_->TimeInMilliseconds(); |
73 int64_t time_until_next = 0; | 66 int64_t time_until_next = 0; |
74 if (last_process_time_ms_ != -1 && | 67 if (last_process_time_ms_ != -1 && |
75 now - last_process_time_ms_ < kDefaultProcessIntervalMs) { | 68 now - last_process_time_ms_ < kDefaultProcessIntervalMs) { |
76 time_until_next = (last_process_time_ms_ + kDefaultProcessIntervalMs - now); | 69 time_until_next = (last_process_time_ms_ + kDefaultProcessIntervalMs - now); |
77 } | 70 } |
78 return time_until_next; | 71 return time_until_next; |
79 } | 72 } |
80 | 73 |
(...skipping 30 matching lines...) Expand all Loading... |
111 arrival_time - it->second >= kBackWindowMs;) { | 104 arrival_time - it->second >= kBackWindowMs;) { |
112 auto delete_it = it; | 105 auto delete_it = it; |
113 ++it; | 106 ++it; |
114 packet_arrival_times_.erase(delete_it); | 107 packet_arrival_times_.erase(delete_it); |
115 } | 108 } |
116 } else if (seq < window_start_seq_) { | 109 } else if (seq < window_start_seq_) { |
117 window_start_seq_ = seq; | 110 window_start_seq_ = seq; |
118 } | 111 } |
119 | 112 |
120 RTC_DCHECK(packet_arrival_times_.end() == packet_arrival_times_.find(seq)); | 113 RTC_DCHECK(packet_arrival_times_.end() == packet_arrival_times_.find(seq)); |
| 114 |
121 packet_arrival_times_[seq] = arrival_time; | 115 packet_arrival_times_[seq] = arrival_time; |
122 } | 116 } |
123 | 117 |
124 bool RemoteEstimatorProxy::BuildFeedbackPacket( | 118 bool RemoteEstimatorProxy::BuildFeedbackPacket( |
125 rtcp::TransportFeedback* feedback_packet) { | 119 rtcp::TransportFeedback* feedback_packet) { |
126 rtc::CritScope cs(&lock_); | 120 rtc::CritScope cs(&lock_); |
127 if (window_start_seq_ == -1) | 121 if (window_start_seq_ == -1) |
128 return false; | 122 return false; |
129 | 123 |
130 // window_start_seq_ is the first sequence number to include in the current | 124 // window_start_seq_ is the first sequence number to include in the current |
(...skipping 24 matching lines...) Expand all Loading... |
155 // they need to be re-sent after a reordering. Removal will be handled | 149 // they need to be re-sent after a reordering. Removal will be handled |
156 // by OnPacketArrival once packets are too old. | 150 // by OnPacketArrival once packets are too old. |
157 } | 151 } |
158 if (it == packet_arrival_times_.end()) | 152 if (it == packet_arrival_times_.end()) |
159 window_start_seq_ = -1; | 153 window_start_seq_ = -1; |
160 | 154 |
161 return true; | 155 return true; |
162 } | 156 } |
163 | 157 |
164 } // namespace webrtc | 158 } // namespace webrtc |
OLD | NEW |