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

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

Issue 2337473002: Multi frequency DTMF support - receiver side (Closed)
Patch Set: rebase Created 4 years, 2 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (STR_CASE_CMP(ci->plname, "cn") == 0) { 93 if (STR_CASE_CMP(ci->plname, "cn") == 0) {
94 if (last_audio_decoder_ && last_audio_decoder_->channels > 1) { 94 if (last_audio_decoder_ && last_audio_decoder_->channels > 1) {
95 // This is a CNG and the audio codec is not mono, so skip pushing in 95 // This is a CNG and the audio codec is not mono, so skip pushing in
96 // packets into NetEq. 96 // packets into NetEq.
97 return 0; 97 return 0;
98 } 98 }
99 } else { 99 } else {
100 last_audio_decoder_ = ci; 100 last_audio_decoder_ = ci;
101 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); 101 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq);
102 } 102 }
103
104 } // |crit_sect_| is released. 103 } // |crit_sect_| is released.
105 104
106 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < 105 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) <
107 0) { 106 0) {
108 LOG(LERROR) << "AcmReceiver::InsertPacket " 107 LOG(LERROR) << "AcmReceiver::InsertPacket "
109 << static_cast<int>(header->payloadType) 108 << static_cast<int>(header->payloadType)
110 << " Failed to insert packet"; 109 << " Failed to insert packet";
111 return -1; 110 return -1;
112 } 111 }
113 return 0; 112 return 0;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 353
355 void AcmReceiver::GetDecodingCallStatistics( 354 void AcmReceiver::GetDecodingCallStatistics(
356 AudioDecodingCallStats* stats) const { 355 AudioDecodingCallStats* stats) const {
357 rtc::CritScope lock(&crit_sect_); 356 rtc::CritScope lock(&crit_sect_);
358 *stats = call_stats_.GetDecodingStatistics(); 357 *stats = call_stats_.GetDecodingStatistics();
359 } 358 }
360 359
361 } // namespace acm2 360 } // namespace acm2
362 361
363 } // namespace webrtc 362 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698