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

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

Issue 2807273004: Change NetEq::InsertPacket to take an RTPHeader (Closed)
Patch Set: git cl format Created 3 years, 8 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 | « no previous file | webrtc/modules/audio_coding/neteq/include/neteq.h » ('j') | 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // |crit_sect_| is released. 105 } // |crit_sect_| is released.
106 106
107 if (neteq_->InsertPacket(rtp_header, incoming_payload, receive_timestamp) < 107 if (neteq_->InsertPacket(rtp_header.header, incoming_payload,
108 0) { 108 receive_timestamp) < 0) {
109 LOG(LERROR) << "AcmReceiver::InsertPacket " 109 LOG(LERROR) << "AcmReceiver::InsertPacket "
110 << static_cast<int>(header->payloadType) 110 << static_cast<int>(header->payloadType)
111 << " Failed to insert packet"; 111 << " Failed to insert packet";
112 return -1; 112 return -1;
113 } 113 }
114 return 0; 114 return 0;
115 } 115 }
116 116
117 int AcmReceiver::GetAudio(int desired_freq_hz, 117 int AcmReceiver::GetAudio(int desired_freq_hz,
118 AudioFrame* audio_frame, 118 AudioFrame* audio_frame,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 void AcmReceiver::GetDecodingCallStatistics( 392 void AcmReceiver::GetDecodingCallStatistics(
393 AudioDecodingCallStats* stats) const { 393 AudioDecodingCallStats* stats) const {
394 rtc::CritScope lock(&crit_sect_); 394 rtc::CritScope lock(&crit_sect_);
395 *stats = call_stats_.GetDecodingStatistics(); 395 *stats = call_stats_.GetDecodingStatistics();
396 } 396 }
397 397
398 } // namespace acm2 398 } // namespace acm2
399 399
400 } // namespace webrtc 400 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/neteq/include/neteq.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698