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

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

Issue 1415313007: Remove unused method AcmReceiver:RedPayloadType (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-recv-vad
Patch Set: Created 5 years, 1 month 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/main/acm2/acm_receiver.h ('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) 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 524 }
525 } 525 }
526 return neteq_->GetPlayoutTimestamp(timestamp); 526 return neteq_->GetPlayoutTimestamp(timestamp);
527 } 527 }
528 528
529 int AcmReceiver::last_audio_codec_id() const { 529 int AcmReceiver::last_audio_codec_id() const {
530 CriticalSectionScoped lock(crit_sect_.get()); 530 CriticalSectionScoped lock(crit_sect_.get());
531 return last_audio_decoder_ ? last_audio_decoder_->acm_codec_id : -1; 531 return last_audio_decoder_ ? last_audio_decoder_->acm_codec_id : -1;
532 } 532 }
533 533
534 int AcmReceiver::RedPayloadType() const {
535 const auto red_index =
536 RentACodec::CodecIndexFromId(RentACodec::CodecId::kRED);
537 if (red_index) {
538 CriticalSectionScoped lock(crit_sect_.get());
539 for (const auto& decoder_pair : decoders_) {
540 const Decoder& decoder = decoder_pair.second;
541 if (decoder.acm_codec_id == *red_index)
542 return decoder.payload_type;
543 }
544 }
545 LOG(WARNING) << "RED is not registered.";
546 return -1;
547 }
548
549 int AcmReceiver::LastAudioCodec(CodecInst* codec) const { 534 int AcmReceiver::LastAudioCodec(CodecInst* codec) const {
550 CriticalSectionScoped lock(crit_sect_.get()); 535 CriticalSectionScoped lock(crit_sect_.get());
551 if (!last_audio_decoder_) { 536 if (!last_audio_decoder_) {
552 return -1; 537 return -1;
553 } 538 }
554 memcpy(codec, &ACMCodecDB::database_[last_audio_decoder_->acm_codec_id], 539 memcpy(codec, &ACMCodecDB::database_[last_audio_decoder_->acm_codec_id],
555 sizeof(CodecInst)); 540 sizeof(CodecInst));
556 codec->pltype = last_audio_decoder_->payload_type; 541 codec->pltype = last_audio_decoder_->payload_type;
557 codec->channels = last_audio_decoder_->channels; 542 codec->channels = last_audio_decoder_->channels;
558 codec->plfreq = last_audio_decoder_->sample_rate_hz; 543 codec->plfreq = last_audio_decoder_->sample_rate_hz;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 704
720 void AcmReceiver::GetDecodingCallStatistics( 705 void AcmReceiver::GetDecodingCallStatistics(
721 AudioDecodingCallStats* stats) const { 706 AudioDecodingCallStats* stats) const {
722 CriticalSectionScoped lock(crit_sect_.get()); 707 CriticalSectionScoped lock(crit_sect_.get());
723 *stats = call_stats_.GetDecodingStatistics(); 708 *stats = call_stats_.GetDecodingStatistics();
724 } 709 }
725 710
726 } // namespace acm2 711 } // namespace acm2
727 712
728 } // namespace webrtc 713 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/acm_receiver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698