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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 2337473002: Multi frequency DTMF support - receiver side (Closed)
Patch Set: rebase Created 4 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
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 return rtc::Optional<CodecInst>(); 473 return rtc::Optional<CodecInst>();
474 } 474 }
475 475
476 // Create a CodecInst with some fields set. The remaining fields are zeroed, 476 // Create a CodecInst with some fields set. The remaining fields are zeroed,
477 // but we tell MSan to consider them uninitialized. 477 // but we tell MSan to consider them uninitialized.
478 CodecInst ci = {0}; 478 CodecInst ci = {0};
479 rtc::MsanMarkUninitialized(rtc::MakeArrayView(&ci, 1)); 479 rtc::MsanMarkUninitialized(rtc::MakeArrayView(&ci, 1));
480 ci.pltype = payload_type; 480 ci.pltype = payload_type;
481 std::strncpy(ci.plname, di->get_name().c_str(), sizeof(ci.plname)); 481 std::strncpy(ci.plname, di->get_name().c_str(), sizeof(ci.plname));
482 ci.plname[sizeof(ci.plname) - 1] = '\0'; 482 ci.plname[sizeof(ci.plname) - 1] = '\0';
483 ci.plfreq = di->IsRed() || di->IsDtmf() ? 8000 : di->SampleRateHz(); 483 ci.plfreq = di->IsRed() ? 8000 : di->SampleRateHz();
484 AudioDecoder* const decoder = di->GetDecoder(); 484 AudioDecoder* const decoder = di->GetDecoder();
485 ci.channels = decoder ? decoder->Channels() : 1; 485 ci.channels = decoder ? decoder->Channels() : 1;
486 return rtc::Optional<CodecInst>(ci); 486 return rtc::Optional<CodecInst>(ci);
487 } 487 }
488 488
489 rtc::Optional<SdpAudioFormat> NetEqImpl::GetDecoderFormat( 489 rtc::Optional<SdpAudioFormat> NetEqImpl::GetDecoderFormat(
490 int payload_type) const { 490 int payload_type) const {
491 rtc::CritScope lock(&crit_sect_); 491 rtc::CritScope lock(&crit_sect_);
492 const DecoderDatabase::DecoderInfo* const di = 492 const DecoderDatabase::DecoderInfo* const di =
493 decoder_database_->GetDecoderInfo(payload_type); 493 decoder_database_->GetDecoderInfo(payload_type);
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 } 2126 }
2127 } 2127 }
2128 2128
2129 void NetEqImpl::CreateDecisionLogic() { 2129 void NetEqImpl::CreateDecisionLogic() {
2130 decision_logic_.reset(DecisionLogic::Create( 2130 decision_logic_.reset(DecisionLogic::Create(
2131 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), 2131 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(),
2132 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), 2132 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(),
2133 tick_timer_.get())); 2133 tick_timer_.get()));
2134 } 2134 }
2135 } // namespace webrtc 2135 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/decoder_database.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698