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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc

Issue 1484343003: NetEq: Add codec name and RTP timestamp rate to DecoderInfo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // Previous packet was not received. 285 // Previous packet was not received.
286 uniform_loss_model_->set_loss_rate(prob_trans_11_); 286 uniform_loss_model_->set_loss_rate(prob_trans_11_);
287 return lost_last_ = uniform_loss_model_->Lost(); 287 return lost_last_ = uniform_loss_model_->Lost();
288 } else { 288 } else {
289 uniform_loss_model_->set_loss_rate(prob_trans_01_); 289 uniform_loss_model_->set_loss_rate(prob_trans_01_);
290 return lost_last_ = uniform_loss_model_->Lost(); 290 return lost_last_ = uniform_loss_model_->Lost();
291 } 291 }
292 } 292 }
293 293
294 void NetEqQualityTest::SetUp() { 294 void NetEqQualityTest::SetUp() {
295 ASSERT_EQ(0, neteq_->RegisterPayloadType(decoder_type_, kPayloadType)); 295 ASSERT_EQ(0,
296 neteq_->RegisterPayloadType(decoder_type_, "noname", kPayloadType));
296 rtp_generator_->set_drift_factor(drift_factor_); 297 rtp_generator_->set_drift_factor(drift_factor_);
297 298
298 int units = block_duration_ms_ / kPacketLossTimeUnitMs; 299 int units = block_duration_ms_ / kPacketLossTimeUnitMs;
299 switch (FLAGS_random_loss_mode) { 300 switch (FLAGS_random_loss_mode) {
300 case 1: { 301 case 1: {
301 // |unit_loss_rate| is the packet loss rate for each unit time interval 302 // |unit_loss_rate| is the packet loss rate for each unit time interval
302 // (kPacketLossTimeUnitMs). Since a packet loss event is generated if any 303 // (kPacketLossTimeUnitMs). Since a packet loss event is generated if any
303 // of |block_duration_ms_ / kPacketLossTimeUnitMs| unit time intervals of 304 // of |block_duration_ms_ / kPacketLossTimeUnitMs| unit time intervals of
304 // a full packet duration is drawn with a loss, |unit_loss_rate| fulfills 305 // a full packet duration is drawn with a loss, |unit_loss_rate| fulfills
305 // (1 - unit_loss_rate) ^ (block_duration_ms_ / kPacketLossTimeUnitMs) == 306 // (1 - unit_loss_rate) ^ (block_duration_ms_ / kPacketLossTimeUnitMs) ==
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 428 }
428 } 429 }
429 Log() << "Average bit rate was " 430 Log() << "Average bit rate was "
430 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms 431 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms
431 << " kbps" 432 << " kbps"
432 << std::endl; 433 << std::endl;
433 } 434 }
434 435
435 } // namespace test 436 } // namespace test
436 } // namespace webrtc 437 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698