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 | |
186 int32_t AcmReceiver::AddCodec(int acm_codec_id, | 182 int32_t AcmReceiver::AddCodec(int acm_codec_id, |
187 uint8_t payload_type, | 183 uint8_t payload_type, |
188 size_t channels, | 184 size_t channels, |
189 int /*sample_rate_hz*/, | 185 int /*sample_rate_hz*/, |
190 AudioDecoder* audio_decoder, | 186 AudioDecoder* audio_decoder, |
191 const std::string& name) { | 187 const std::string& name) { |
192 // TODO(kwiberg): This function has been ignoring the |sample_rate_hz| | 188 // TODO(kwiberg): This function has been ignoring the |sample_rate_hz| |
193 // argument for a long time. Arguably, it should simply be removed. | 189 // argument for a long time. Arguably, it should simply be removed. |
194 | 190 |
195 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { | 191 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 388 |
393 void AcmReceiver::GetDecodingCallStatistics( | 389 void AcmReceiver::GetDecodingCallStatistics( |
394 AudioDecodingCallStats* stats) const { | 390 AudioDecodingCallStats* stats) const { |
395 rtc::CritScope lock(&crit_sect_); | 391 rtc::CritScope lock(&crit_sect_); |
396 *stats = call_stats_.GetDecodingStatistics(); | 392 *stats = call_stats_.GetDecodingStatistics(); |
397 } | 393 } |
398 | 394 |
399 } // namespace acm2 | 395 } // namespace acm2 |
400 | 396 |
401 } // namespace webrtc | 397 } // namespace webrtc |
OLD | NEW |