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

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, 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) 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_audio_format_ = neteq_->GetDecoderFormat(ci->pltype); 101 last_audio_format_ = neteq_->GetDecoderFormat(ci->pltype);
102 RTC_DCHECK(last_audio_format_); 102 RTC_DCHECK(last_audio_format_);
103 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq); 103 last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq);
104 } 104 }
105
106 } // |crit_sect_| is released. 105 } // |crit_sect_| is released.
107 106
108 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < 107 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) <
109 0) { 108 0) {
110 LOG(LERROR) << "AcmReceiver::InsertPacket " 109 LOG(LERROR) << "AcmReceiver::InsertPacket "
111 << static_cast<int>(header->payloadType) 110 << static_cast<int>(header->payloadType)
112 << " Failed to insert packet"; 111 << " Failed to insert packet";
113 return -1; 112 return -1;
114 } 113 }
115 return 0; 114 return 0;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 387
389 void AcmReceiver::GetDecodingCallStatistics( 388 void AcmReceiver::GetDecodingCallStatistics(
390 AudioDecodingCallStats* stats) const { 389 AudioDecodingCallStats* stats) const {
391 rtc::CritScope lock(&crit_sect_); 390 rtc::CritScope lock(&crit_sect_);
392 *stats = call_stats_.GetDecodingStatistics(); 391 *stats = call_stats_.GetDecodingStatistics();
393 } 392 }
394 393
395 } // namespace acm2 394 } // namespace acm2
396 395
397 } // namespace webrtc 396 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_receive_test.cc ('k') | webrtc/modules/audio_coding/acm2/rent_a_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698