OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // This is a CNG and the audio codec is not mono, so skip pushing in | 95 // This is a CNG and the audio codec is not mono, so skip pushing in |
96 // packets into NetEq. | 96 // packets into NetEq. |
97 return 0; | 97 return 0; |
98 } | 98 } |
99 } else { | 99 } else { |
100 last_audio_decoder_ = ci; | 100 last_audio_decoder_ = ci; |
101 last_audio_format_ = neteq_->GetDecoderFormat(ci->pltype); | 101 last_audio_format_ = neteq_->GetDecoderFormat(ci->pltype); |
102 RTC_DCHECK(last_audio_format_); | 102 RTC_DCHECK(last_audio_format_); |
103 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); | 103 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); |
104 } | 104 } |
105 | |
106 } // |crit_sect_| is released. | 105 } // |crit_sect_| is released. |
107 | 106 |
108 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < | 107 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < |
109 0) { | 108 0) { |
110 LOG(LERROR) << "AcmReceiver::InsertPacket " | 109 LOG(LERROR) << "AcmReceiver::InsertPacket " |
111 << static_cast<int>(header->payloadType) | 110 << static_cast<int>(header->payloadType) |
112 << " Failed to insert packet"; | 111 << " Failed to insert packet"; |
113 return -1; | 112 return -1; |
114 } | 113 } |
115 return 0; | 114 return 0; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 387 |
389 void AcmReceiver::GetDecodingCallStatistics( | 388 void AcmReceiver::GetDecodingCallStatistics( |
390 AudioDecodingCallStats* stats) const { | 389 AudioDecodingCallStats* stats) const { |
391 rtc::CritScope lock(&crit_sect_); | 390 rtc::CritScope lock(&crit_sect_); |
392 *stats = call_stats_.GetDecodingStatistics(); | 391 *stats = call_stats_.GetDecodingStatistics(); |
393 } | 392 } |
394 | 393 |
395 } // namespace acm2 | 394 } // namespace acm2 |
396 | 395 |
397 } // namespace webrtc | 396 } // namespace webrtc |
OLD | NEW |