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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc

Issue 1213603002: Remove ResetStatistics from RTP feedback. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: comment + rebase Created 5 years, 5 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) 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // kRtpNoRtp against NetEq speech_type kOutputPLCtoCNG. 221 // kRtpNoRtp against NetEq speech_type kOutputPLCtoCNG.
222 if (last_payload_length < 10) { // our CNG is 9 bytes 222 if (last_payload_length < 10) { // our CNG is 9 bytes
223 return kRtpNoRtp; 223 return kRtpNoRtp;
224 } else { 224 } else {
225 return kRtpDead; 225 return kRtpDead;
226 } 226 }
227 } 227 }
228 228
229 void RTPReceiverAudio::CheckPayloadChanged(int8_t payload_type, 229 void RTPReceiverAudio::CheckPayloadChanged(int8_t payload_type,
230 PayloadUnion* specific_payload, 230 PayloadUnion* specific_payload,
231 bool* should_reset_statistics,
232 bool* should_discard_changes) { 231 bool* should_discard_changes) {
233 *should_discard_changes = false; 232 *should_discard_changes = false;
234 *should_reset_statistics = false;
235 233
236 if (TelephoneEventPayloadType(payload_type)) { 234 if (TelephoneEventPayloadType(payload_type)) {
237 // Don't do callbacks for DTMF packets. 235 // Don't do callbacks for DTMF packets.
238 *should_discard_changes = true; 236 *should_discard_changes = true;
239 return; 237 return;
240 } 238 }
241 // frequency is updated for CNG 239 // frequency is updated for CNG
242 bool cng_payload_type_has_changed = false; 240 bool cng_payload_type_has_changed = false;
243 bool is_cng_payload_type = CNGPayloadType(payload_type, 241 bool is_cng_payload_type = CNGPayloadType(payload_type,
244 &specific_payload->Audio.frequency, 242 &specific_payload->Audio.frequency,
245 &cng_payload_type_has_changed); 243 &cng_payload_type_has_changed);
246 244
247 *should_reset_statistics = cng_payload_type_has_changed;
248
249 if (is_cng_payload_type) { 245 if (is_cng_payload_type) {
250 // Don't do callbacks for DTMF packets. 246 // Don't do callbacks for DTMF packets.
251 *should_discard_changes = true; 247 *should_discard_changes = true;
252 return; 248 return;
253 } 249 }
254 } 250 }
255 251
256 int RTPReceiverAudio::Energy(uint8_t array_of_energy[kRtpCsrcSize]) const { 252 int RTPReceiverAudio::Energy(uint8_t array_of_energy[kRtpCsrcSize]) const {
257 CriticalSectionScoped cs(crit_sect_.get()); 253 CriticalSectionScoped cs(crit_sect_.get());
258 254
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // only one frame in the RED strip the one byte to help NetEq 381 // only one frame in the RED strip the one byte to help NetEq
386 return data_callback_->OnReceivedPayloadData( 382 return data_callback_->OnReceivedPayloadData(
387 payload_data + 1, payload_length - 1, rtp_header); 383 payload_data + 1, payload_length - 1, rtp_header);
388 } 384 }
389 385
390 rtp_header->type.Audio.channel = audio_specific.channels; 386 rtp_header->type.Audio.channel = audio_specific.channels;
391 return data_callback_->OnReceivedPayloadData( 387 return data_callback_->OnReceivedPayloadData(
392 payload_data, payload_length, rtp_header); 388 payload_data, payload_length, rtp_header);
393 } 389 }
394 } // namespace webrtc 390 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698