OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 last_increased_sequence_number_ms_(0), | 127 last_increased_sequence_number_ms_(0), |
128 stats_callback_(nullptr), | 128 stats_callback_(nullptr), |
129 packet_type_counter_observer_(packet_type_counter_observer), | 129 packet_type_counter_observer_(packet_type_counter_observer), |
130 num_skipped_packets_(0), | 130 num_skipped_packets_(0), |
131 last_skipped_packets_warning_ms_(clock->TimeInMilliseconds()) { | 131 last_skipped_packets_warning_ms_(clock->TimeInMilliseconds()) { |
132 RTC_DCHECK(owner); | 132 RTC_DCHECK(owner); |
133 } | 133 } |
134 | 134 |
135 RTCPReceiver::~RTCPReceiver() {} | 135 RTCPReceiver::~RTCPReceiver() {} |
136 | 136 |
137 bool RTCPReceiver::IncomingPacket(const uint8_t* packet, size_t packet_size) { | 137 void RTCPReceiver::IncomingPacket(const uint8_t* packet, size_t packet_size) { |
138 if (packet_size == 0) { | 138 if (packet_size == 0) { |
139 LOG(LS_WARNING) << "Incoming empty RTCP packet"; | 139 LOG(LS_WARNING) << "Incoming empty RTCP packet"; |
140 return false; | 140 return; |
141 } | 141 } |
142 | 142 |
143 PacketInformation packet_information; | 143 PacketInformation packet_information; |
144 if (!ParseCompoundPacket(packet, packet + packet_size, &packet_information)) | 144 if (!ParseCompoundPacket(packet, packet + packet_size, &packet_information)) |
145 return false; | 145 return; |
146 TriggerCallbacksFromRtcpPacket(packet_information); | 146 TriggerCallbacksFromRtcpPacket(packet_information); |
147 return true; | |
148 } | 147 } |
149 | 148 |
150 int64_t RTCPReceiver::LastReceivedReceiverReport() const { | 149 int64_t RTCPReceiver::LastReceivedReceiverReport() const { |
151 rtc::CritScope lock(&rtcp_receiver_lock_); | 150 rtc::CritScope lock(&rtcp_receiver_lock_); |
152 return last_received_rr_ms_; | 151 return last_received_rr_ms_; |
153 } | 152 } |
154 | 153 |
155 void RTCPReceiver::SetRemoteSSRC(uint32_t ssrc) { | 154 void RTCPReceiver::SetRemoteSSRC(uint32_t ssrc) { |
156 rtc::CritScope lock(&rtcp_receiver_lock_); | 155 rtc::CritScope lock(&rtcp_receiver_lock_); |
157 // New SSRC reset old reports. | 156 // New SSRC reset old reports. |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 } else { | 1040 } else { |
1042 candidates.push_back(it->second.tmmbr_item); | 1041 candidates.push_back(it->second.tmmbr_item); |
1043 ++it; | 1042 ++it; |
1044 } | 1043 } |
1045 } | 1044 } |
1046 } | 1045 } |
1047 return candidates; | 1046 return candidates; |
1048 } | 1047 } |
1049 | 1048 |
1050 } // namespace webrtc | 1049 } // namespace webrtc |
OLD | NEW |