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

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

Issue 1992763002: Moved injection of AudioDecoderFactory into voe::Channel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-1
Patch Set: Addressed nit. Created 4 years, 7 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/acm_receiver_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 *i == RentACodec::CodecId::kCNWB || 42 *i == RentACodec::CodecId::kCNWB ||
43 *i == RentACodec::CodecId::kCNSWB || 43 *i == RentACodec::CodecId::kCNSWB ||
44 *i == RentACodec::CodecId::kCNFB)); 44 *i == RentACodec::CodecId::kCNFB));
45 } 45 }
46 46
47 } // namespace 47 } // namespace
48 48
49 AcmReceiver::AcmReceiver(const AudioCodingModule::Config& config) 49 AcmReceiver::AcmReceiver(const AudioCodingModule::Config& config)
50 : last_audio_decoder_(nullptr), 50 : last_audio_decoder_(nullptr),
51 last_audio_buffer_(new int16_t[AudioFrame::kMaxDataSizeSamples]), 51 last_audio_buffer_(new int16_t[AudioFrame::kMaxDataSizeSamples]),
52 neteq_(NetEq::Create(config.neteq_config)), 52 neteq_(NetEq::Create(config.neteq_config, config.decoder_factory)),
53 clock_(config.clock), 53 clock_(config.clock),
54 resampled_last_output_frame_(true) { 54 resampled_last_output_frame_(true) {
55 assert(clock_); 55 assert(clock_);
56 memset(last_audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples); 56 memset(last_audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples);
57 } 57 }
58 58
59 AcmReceiver::~AcmReceiver() { 59 AcmReceiver::~AcmReceiver() {
60 delete neteq_; 60 delete neteq_;
61 } 61 }
62 62
(...skipping 348 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/acm_receiver_unittest_oldapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698