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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if (STR_CASE_CMP(ci->plname, "cn") == 0) { | 93 if (STR_CASE_CMP(ci->plname, "cn") == 0) { |
94 if (last_audio_decoder_ && last_audio_decoder_->channels > 1) { | 94 if (last_audio_decoder_ && last_audio_decoder_->channels > 1) { |
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_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); | 101 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); |
102 } | 102 } |
103 | |
104 } // |crit_sect_| is released. | 103 } // |crit_sect_| is released. |
105 | 104 |
106 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < | 105 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < |
107 0) { | 106 0) { |
108 LOG(LERROR) << "AcmReceiver::InsertPacket " | 107 LOG(LERROR) << "AcmReceiver::InsertPacket " |
109 << static_cast<int>(header->payloadType) | 108 << static_cast<int>(header->payloadType) |
110 << " Failed to insert packet"; | 109 << " Failed to insert packet"; |
111 return -1; | 110 return -1; |
112 } | 111 } |
113 return 0; | 112 return 0; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 353 |
355 void AcmReceiver::GetDecodingCallStatistics( | 354 void AcmReceiver::GetDecodingCallStatistics( |
356 AudioDecodingCallStats* stats) const { | 355 AudioDecodingCallStats* stats) const { |
357 rtc::CritScope lock(&crit_sect_); | 356 rtc::CritScope lock(&crit_sect_); |
358 *stats = call_stats_.GetDecodingStatistics(); | 357 *stats = call_stats_.GetDecodingStatistics(); |
359 } | 358 } |
360 | 359 |
361 } // namespace acm2 | 360 } // namespace acm2 |
362 | 361 |
363 } // namespace webrtc | 362 } // namespace webrtc |
OLD | NEW |