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

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

Issue 1764623002: Remove the ID from AcmReceiver (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 | « webrtc/modules/audio_coding/acm2/acm_receiver.cc ('k') | no next file » | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 // Initialize receiver, resets codec database etc. 537 // Initialize receiver, resets codec database etc.
538 int AudioCodingModuleImpl::InitializeReceiverSafe() { 538 int AudioCodingModuleImpl::InitializeReceiverSafe() {
539 // If the receiver is already initialized then we want to destroy any 539 // If the receiver is already initialized then we want to destroy any
540 // existing decoders. After a call to this function, we should have a clean 540 // existing decoders. After a call to this function, we should have a clean
541 // start-up. 541 // start-up.
542 if (receiver_initialized_) { 542 if (receiver_initialized_) {
543 if (receiver_.RemoveAllCodecs() < 0) 543 if (receiver_.RemoveAllCodecs() < 0)
544 return -1; 544 return -1;
545 } 545 }
546 receiver_.set_id(id_);
547 receiver_.ResetInitialDelay(); 546 receiver_.ResetInitialDelay();
548 receiver_.SetMinimumDelay(0); 547 receiver_.SetMinimumDelay(0);
549 receiver_.SetMaximumDelay(0); 548 receiver_.SetMaximumDelay(0);
550 receiver_.FlushBuffers(); 549 receiver_.FlushBuffers();
551 550
552 // Register RED and CN. 551 // Register RED and CN.
553 auto db = RentACodec::Database(); 552 auto db = RentACodec::Database();
554 for (size_t i = 0; i < db.size(); i++) { 553 for (size_t i = 0; i < db.size(); i++) {
555 if (IsCodecRED(db[i]) || IsCodecCN(db[i])) { 554 if (IsCodecRED(db[i]) || IsCodecCN(db[i])) {
556 if (receiver_.AddCodec(static_cast<int>(i), 555 if (receiver_.AddCodec(static_cast<int>(i),
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 return receiver_.LeastRequiredDelayMs(); 815 return receiver_.LeastRequiredDelayMs();
817 } 816 }
818 817
819 void AudioCodingModuleImpl::GetDecodingCallStatistics( 818 void AudioCodingModuleImpl::GetDecodingCallStatistics(
820 AudioDecodingCallStats* call_stats) const { 819 AudioDecodingCallStats* call_stats) const {
821 receiver_.GetDecodingCallStatistics(call_stats); 820 receiver_.GetDecodingCallStatistics(call_stats);
822 } 821 }
823 822
824 } // namespace acm2 823 } // namespace acm2
825 } // namespace webrtc 824 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_receiver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698