| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Store current audio in |last_audio_buffer_| for next time. | 173 // Store current audio in |last_audio_buffer_| for next time. |
| 174 memcpy(last_audio_buffer_.get(), audio_frame->data_, | 174 memcpy(last_audio_buffer_.get(), audio_frame->data_, |
| 175 sizeof(int16_t) * audio_frame->samples_per_channel_ * | 175 sizeof(int16_t) * audio_frame->samples_per_channel_ * |
| 176 audio_frame->num_channels_); | 176 audio_frame->num_channels_); |
| 177 | 177 |
| 178 call_stats_.DecodedByNetEq(audio_frame->speech_type_, *muted); | 178 call_stats_.DecodedByNetEq(audio_frame->speech_type_, *muted); |
| 179 return 0; | 179 return 0; |
| 180 } | 180 } |
| 181 | 181 |
| 182 void AcmReceiver::SetCodecs(const std::map<int, SdpAudioFormat>& codecs) { |
| 183 neteq_->SetCodecs(codecs); |
| 184 } |
| 185 |
| 182 int32_t AcmReceiver::AddCodec(int acm_codec_id, | 186 int32_t AcmReceiver::AddCodec(int acm_codec_id, |
| 183 uint8_t payload_type, | 187 uint8_t payload_type, |
| 184 size_t channels, | 188 size_t channels, |
| 185 int /*sample_rate_hz*/, | 189 int /*sample_rate_hz*/, |
| 186 AudioDecoder* audio_decoder, | 190 AudioDecoder* audio_decoder, |
| 187 const std::string& name) { | 191 const std::string& name) { |
| 188 // TODO(kwiberg): This function has been ignoring the |sample_rate_hz| | 192 // TODO(kwiberg): This function has been ignoring the |sample_rate_hz| |
| 189 // argument for a long time. Arguably, it should simply be removed. | 193 // argument for a long time. Arguably, it should simply be removed. |
| 190 | 194 |
| 191 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { | 195 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 392 |
| 389 void AcmReceiver::GetDecodingCallStatistics( | 393 void AcmReceiver::GetDecodingCallStatistics( |
| 390 AudioDecodingCallStats* stats) const { | 394 AudioDecodingCallStats* stats) const { |
| 391 rtc::CritScope lock(&crit_sect_); | 395 rtc::CritScope lock(&crit_sect_); |
| 392 *stats = call_stats_.GetDecodingStatistics(); | 396 *stats = call_stats_.GetDecodingStatistics(); |
| 393 } | 397 } |
| 394 | 398 |
| 395 } // namespace acm2 | 399 } // namespace acm2 |
| 396 | 400 |
| 397 } // namespace webrtc | 401 } // namespace webrtc |
| OLD | NEW |