| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 _remoteSSRC = ssrc; | 164 _remoteSSRC = ssrc; |
| 165 } | 165 } |
| 166 | 166 |
| 167 uint32_t RTCPReceiver::RemoteSSRC() const { | 167 uint32_t RTCPReceiver::RemoteSSRC() const { |
| 168 rtc::CritScope lock(&_criticalSectionRTCPReceiver); | 168 rtc::CritScope lock(&_criticalSectionRTCPReceiver); |
| 169 return _remoteSSRC; | 169 return _remoteSSRC; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void RTCPReceiver::SetSsrcs(uint32_t main_ssrc, | 172 void RTCPReceiver::SetSsrcs(uint32_t main_ssrc, |
| 173 const std::set<uint32_t>& registered_ssrcs) { | 173 const std::set<uint32_t>& registered_ssrcs) { |
| 174 uint32_t old_ssrc = 0; | 174 rtc::CritScope lock(&_criticalSectionRTCPReceiver); |
| 175 { | 175 main_ssrc_ = main_ssrc; |
| 176 rtc::CritScope lock(&_criticalSectionRTCPReceiver); | 176 registered_ssrcs_ = registered_ssrcs; |
| 177 old_ssrc = main_ssrc_; | |
| 178 main_ssrc_ = main_ssrc; | |
| 179 registered_ssrcs_ = registered_ssrcs; | |
| 180 } | |
| 181 { | |
| 182 if (_cbRtcpIntraFrameObserver && old_ssrc != main_ssrc) { | |
| 183 _cbRtcpIntraFrameObserver->OnLocalSsrcChanged(old_ssrc, main_ssrc); | |
| 184 } | |
| 185 } | |
| 186 } | 177 } |
| 187 | 178 |
| 188 int32_t RTCPReceiver::RTT(uint32_t remote_ssrc, | 179 int32_t RTCPReceiver::RTT(uint32_t remote_ssrc, |
| 189 int64_t* last_rtt_ms, | 180 int64_t* last_rtt_ms, |
| 190 int64_t* avg_rtt_ms, | 181 int64_t* avg_rtt_ms, |
| 191 int64_t* min_rtt_ms, | 182 int64_t* min_rtt_ms, |
| 192 int64_t* max_rtt_ms) const { | 183 int64_t* max_rtt_ms) const { |
| 193 rtc::CritScope lock(&_criticalSectionRTCPReceiver); | 184 rtc::CritScope lock(&_criticalSectionRTCPReceiver); |
| 194 | 185 |
| 195 auto it = received_report_blocks_.find(main_ssrc_); | 186 auto it = received_report_blocks_.find(main_ssrc_); |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 } else { | 1065 } else { |
| 1075 candidates.push_back(it->second.tmmbr_item); | 1066 candidates.push_back(it->second.tmmbr_item); |
| 1076 ++it; | 1067 ++it; |
| 1077 } | 1068 } |
| 1078 } | 1069 } |
| 1079 } | 1070 } |
| 1080 return candidates; | 1071 return candidates; |
| 1081 } | 1072 } |
| 1082 | 1073 |
| 1083 } // namespace webrtc | 1074 } // namespace webrtc |
| OLD | NEW |