Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Side by Side Diff: webrtc/modules/audio_coding/acm2/acm_receiver.cc

Issue 2027993002: NetEq: Ask AudioDecoder for sample rate instead of passing it as an argument (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@samprate1
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 decoders_.erase(it); 237 decoders_.erase(it);
238 } 238 }
239 239
240 int ret_val; 240 int ret_val;
241 if (!audio_decoder) { 241 if (!audio_decoder) {
242 ret_val = neteq_->RegisterPayloadType(neteq_decoder, name, payload_type); 242 ret_val = neteq_->RegisterPayloadType(neteq_decoder, name, payload_type);
243 } else { 243 } else {
244 ret_val = neteq_->RegisterExternalDecoder( 244 ret_val = neteq_->RegisterExternalDecoder(
245 audio_decoder, neteq_decoder, name, payload_type, sample_rate_hz); 245 audio_decoder, neteq_decoder, name, payload_type);
246 } 246 }
247 if (ret_val != NetEq::kOK) { 247 if (ret_val != NetEq::kOK) {
248 LOG(LERROR) << "AcmReceiver::AddCodec " << acm_codec_id 248 LOG(LERROR) << "AcmReceiver::AddCodec " << acm_codec_id
249 << static_cast<int>(payload_type) 249 << static_cast<int>(payload_type)
250 << " channels: " << channels; 250 << " channels: " << channels;
251 return -1; 251 return -1;
252 } 252 }
253 253
254 Decoder decoder; 254 Decoder decoder;
255 decoder.acm_codec_id = acm_codec_id; 255 decoder.acm_codec_id = acm_codec_id;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 void AcmReceiver::GetDecodingCallStatistics( 412 void AcmReceiver::GetDecodingCallStatistics(
413 AudioDecodingCallStats* stats) const { 413 AudioDecodingCallStats* stats) const {
414 rtc::CritScope lock(&crit_sect_); 414 rtc::CritScope lock(&crit_sect_);
415 *stats = call_stats_.GetDecodingStatistics(); 415 *stats = call_stats_.GetDecodingStatistics();
416 } 416 }
417 417
418 } // namespace acm2 418 } // namespace acm2
419 419
420 } // namespace webrtc 420 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698