Chromium Code Reviews| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 } else { | 184 } else { | 
| 185 resampled_last_output_frame_ = false; | 185 resampled_last_output_frame_ = false; | 
| 186 // We might end up here ONLY if codec is changed. | 186 // We might end up here ONLY if codec is changed. | 
| 187 } | 187 } | 
| 188 | 188 | 
| 189 // Store current audio in |last_audio_buffer_| for next time. | 189 // Store current audio in |last_audio_buffer_| for next time. | 
| 190 memcpy(last_audio_buffer_.get(), audio_frame->data_, | 190 memcpy(last_audio_buffer_.get(), audio_frame->data_, | 
| 191 sizeof(int16_t) * audio_frame->samples_per_channel_ * | 191 sizeof(int16_t) * audio_frame->samples_per_channel_ * | 
| 192 audio_frame->num_channels_); | 192 audio_frame->num_channels_); | 
| 193 | 193 | 
| 194 call_stats_.DecodedByNetEq(audio_frame->speech_type_); | 194 call_stats_.DecodedByNetEq(audio_frame->speech_type_, *muted); | 
| 
 
the sun
2016/09/16 17:18:36
nit: DCHECK the pointer at function entry, since n
 
hlundin-webrtc
2016/09/20 07:48:37
Done.
 
 | |
| 195 return 0; | 195 return 0; | 
| 196 } | 196 } | 
| 197 | 197 | 
| 198 int32_t AcmReceiver::AddCodec(int acm_codec_id, | 198 int32_t AcmReceiver::AddCodec(int acm_codec_id, | 
| 199 uint8_t payload_type, | 199 uint8_t payload_type, | 
| 200 size_t channels, | 200 size_t channels, | 
| 201 int sample_rate_hz, | 201 int sample_rate_hz, | 
| 202 AudioDecoder* audio_decoder, | 202 AudioDecoder* audio_decoder, | 
| 203 const std::string& name) { | 203 const std::string& name) { | 
| 204 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { | 204 const auto neteq_decoder = [acm_codec_id, channels]() -> NetEqDecoder { | 
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 | 415 | 
| 416 void AcmReceiver::GetDecodingCallStatistics( | 416 void AcmReceiver::GetDecodingCallStatistics( | 
| 417 AudioDecodingCallStats* stats) const { | 417 AudioDecodingCallStats* stats) const { | 
| 418 rtc::CritScope lock(&crit_sect_); | 418 rtc::CritScope lock(&crit_sect_); | 
| 419 *stats = call_stats_.GetDecodingStatistics(); | 419 *stats = call_stats_.GetDecodingStatistics(); | 
| 420 } | 420 } | 
| 421 | 421 | 
| 422 } // namespace acm2 | 422 } // namespace acm2 | 
| 423 | 423 | 
| 424 } // namespace webrtc | 424 } // namespace webrtc | 
| OLD | NEW |