Chromium Code Reviews| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 return false; | 158 return false; |
| 159 } | 159 } |
| 160 | 160 |
| 161 WebRtcRTPHeader webrtc_rtp_header; | 161 WebRtcRTPHeader webrtc_rtp_header; |
| 162 memset(&webrtc_rtp_header, 0, sizeof(webrtc_rtp_header)); | 162 memset(&webrtc_rtp_header, 0, sizeof(webrtc_rtp_header)); |
| 163 webrtc_rtp_header.header = rtp_header; | 163 webrtc_rtp_header.header = rtp_header; |
| 164 CheckCSRC(webrtc_rtp_header); | 164 CheckCSRC(webrtc_rtp_header); |
| 165 | 165 |
| 166 UpdateSources(); | 166 UpdateSources(); |
| 167 | 167 |
| 168 auto source = ssrc_sources_.rbegin(); | |
|
danilchap
2017/08/15 08:18:29
though it is not annotated, it seems ssrc_sources_
Zach Stein
2017/08/15 21:44:59
Done.
| |
| 169 source->update_audio_level( | |
|
danilchap
2017/08/15 08:18:29
minor suggestion to use back() instead of rbegin()
Zach Stein
2017/08/15 21:44:59
Done.
| |
| 170 rtp_header.extension.hasAudioLevel | |
| 171 ? rtc::Optional<uint8_t>(rtp_header.extension.audioLevel) | |
| 172 : rtc::Optional<uint8_t>()); | |
| 173 | |
| 168 size_t payload_data_length = payload_length - rtp_header.paddingLength; | 174 size_t payload_data_length = payload_length - rtp_header.paddingLength; |
| 169 | 175 |
| 170 bool is_first_packet_in_frame = false; | 176 bool is_first_packet_in_frame = false; |
| 171 { | 177 { |
| 172 rtc::CritScope lock(&critical_section_rtp_receiver_); | 178 rtc::CritScope lock(&critical_section_rtp_receiver_); |
| 173 if (HaveReceivedFrame()) { | 179 if (HaveReceivedFrame()) { |
| 174 is_first_packet_in_frame = | 180 is_first_packet_in_frame = |
| 175 last_received_sequence_number_ + 1 == rtp_header.sequenceNumber && | 181 last_received_sequence_number_ + 1 == rtp_header.sequenceNumber && |
| 176 last_received_timestamp_ != rtp_header.timestamp; | 182 last_received_timestamp_ != rtp_header.timestamp; |
| 177 } else { | 183 } else { |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 544 for (vec_it = ssrc_sources_.begin(); vec_it != ssrc_sources_.end(); | 550 for (vec_it = ssrc_sources_.begin(); vec_it != ssrc_sources_.end(); |
| 545 ++vec_it) { | 551 ++vec_it) { |
| 546 if ((now_ms - vec_it->timestamp_ms()) <= kGetSourcesTimeoutMs) { | 552 if ((now_ms - vec_it->timestamp_ms()) <= kGetSourcesTimeoutMs) { |
| 547 break; | 553 break; |
| 548 } | 554 } |
| 549 } | 555 } |
| 550 ssrc_sources_.erase(ssrc_sources_.begin(), vec_it); | 556 ssrc_sources_.erase(ssrc_sources_.begin(), vec_it); |
| 551 } | 557 } |
| 552 | 558 |
| 553 } // namespace webrtc | 559 } // namespace webrtc |
| OLD | NEW |