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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_test.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 | « webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc ('k') | no next file » | 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 while (!input_->ended()) { 64 while (!input_->ended()) {
65 // Advance time to next event. 65 // Advance time to next event.
66 RTC_DCHECK(input_->NextEventTime()); 66 RTC_DCHECK(input_->NextEventTime());
67 time_now_ms = *input_->NextEventTime(); 67 time_now_ms = *input_->NextEventTime();
68 // Check if it is time to insert packet. 68 // Check if it is time to insert packet.
69 if (input_->NextPacketTime() && time_now_ms >= *input_->NextPacketTime()) { 69 if (input_->NextPacketTime() && time_now_ms >= *input_->NextPacketTime()) {
70 std::unique_ptr<NetEqInput::PacketData> packet_data = input_->PopPacket(); 70 std::unique_ptr<NetEqInput::PacketData> packet_data = input_->PopPacket();
71 RTC_CHECK(packet_data); 71 RTC_CHECK(packet_data);
72 int error = neteq_->InsertPacket( 72 int error = neteq_->InsertPacket(
73 packet_data->header, 73 packet_data->header.header,
74 rtc::ArrayView<const uint8_t>(packet_data->payload), 74 rtc::ArrayView<const uint8_t>(packet_data->payload),
75 static_cast<uint32_t>(packet_data->time_ms * sample_rate_hz_ / 1000)); 75 static_cast<uint32_t>(packet_data->time_ms * sample_rate_hz_ / 1000));
76 if (error != NetEq::kOK && error_callback_) { 76 if (error != NetEq::kOK && error_callback_) {
77 error_callback_->OnInsertPacketError(neteq_->LastError(), *packet_data); 77 error_callback_->OnInsertPacketError(neteq_->LastError(), *packet_data);
78 } 78 }
79 } 79 }
80 80
81 // Check if it is time to get output audio. 81 // Check if it is time to get output audio.
82 if (input_->NextOutputEventTime() && 82 if (input_->NextOutputEventTime() &&
83 time_now_ms >= *input_->NextOutputEventTime()) { 83 time_now_ms >= *input_->NextOutputEventTime()) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 neteq_->RegisterExternalDecoder(c.second.decoder, c.second.codec, 127 neteq_->RegisterExternalDecoder(c.second.decoder, c.second.codec,
128 c.second.codec_name, c.first), 128 c.second.codec_name, c.first),
129 NetEq::kOK) 129 NetEq::kOK)
130 << "Cannot register " << c.second.codec_name << " to payload type " 130 << "Cannot register " << c.second.codec_name << " to payload type "
131 << c.first; 131 << c.first;
132 } 132 }
133 } 133 }
134 134
135 } // namespace test 135 } // namespace test
136 } // namespace webrtc 136 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698