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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1917913002: NetEq: Use TickTimer in PacketBuffer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@add-tick-timer-to-neteq
Patch Set: Remove superfluous comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_impl.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index ef470e5d4eaa48b1304c082052016f17cb760b62..cca1c4c9e9400214716a75bfaeb5442242cb9c7f 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -536,7 +536,8 @@ int NetEqImpl::InsertPacketInternal(const WebRtcRTPHeader& rtp_header,
packet->header.numCSRCs = 0;
packet->payload_length = payload.size();
packet->primary = true;
- packet->waiting_time = 0;
+ // Waiting time will be set upon inserting the packet in the buffer.
+ RTC_DCHECK(!packet->waiting_time);
packet->payload = new uint8_t[packet->payload_length];
packet->sync_packet = is_sync_packet;
if (!packet->payload) {
@@ -1002,7 +1003,6 @@ int NetEqImpl::GetDecision(Operations* operation,
*operation = kUndefined;
// Increment time counters.
- packet_buffer_->IncrementWaitingTimes();
stats_.IncreaseCounter(output_size_samples_, fs_hz_);
assert(sync_buffer_.get());
@@ -1931,8 +1931,7 @@ int NetEqImpl::ExtractPackets(size_t required_samples,
return -1;
}
stats_.PacketsDiscarded(discard_count);
- // Store waiting time in ms; packets->waiting_time is in "output blocks".
- stats_.StoreWaitingTime(packet->waiting_time * kOutputSizeMs);
+ stats_.StoreWaitingTime(packet->waiting_time->ElapsedMs());
assert(packet->payload_length > 0);
packet_list->push_back(packet); // Store packet in list.
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq.gypi ('k') | webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698