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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1525423004: Add tracing to NetEqImpl::InsertPacket (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | 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) 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
11 #include "webrtc/modules/audio_coding/neteq/neteq_impl.h" 11 #include "webrtc/modules/audio_coding/neteq/neteq_impl.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <memory.h> // memset 14 #include <memory.h> // memset
15 15
16 #include <algorithm> 16 #include <algorithm>
17 17
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/logging.h" 19 #include "webrtc/base/logging.h"
20 #include "webrtc/base/safe_conversions.h" 20 #include "webrtc/base/safe_conversions.h"
21 #include "webrtc/base/trace_event.h"
21 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h"
22 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" 23 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
23 #include "webrtc/modules/audio_coding/neteq/accelerate.h" 24 #include "webrtc/modules/audio_coding/neteq/accelerate.h"
24 #include "webrtc/modules/audio_coding/neteq/background_noise.h" 25 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
25 #include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h" 26 #include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h"
26 #include "webrtc/modules/audio_coding/neteq/comfort_noise.h" 27 #include "webrtc/modules/audio_coding/neteq/comfort_noise.h"
27 #include "webrtc/modules/audio_coding/neteq/decision_logic.h" 28 #include "webrtc/modules/audio_coding/neteq/decision_logic.h"
28 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" 29 #include "webrtc/modules/audio_coding/neteq/decoder_database.h"
29 #include "webrtc/modules/audio_coding/neteq/defines.h" 30 #include "webrtc/modules/audio_coding/neteq/defines.h"
30 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" 31 #include "webrtc/modules/audio_coding/neteq/delay_manager.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 if (config.enable_post_decode_vad) { 118 if (config.enable_post_decode_vad) {
118 vad_->Enable(); 119 vad_->Enable();
119 } 120 }
120 } 121 }
121 122
122 NetEqImpl::~NetEqImpl() = default; 123 NetEqImpl::~NetEqImpl() = default;
123 124
124 int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header, 125 int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header,
125 rtc::ArrayView<const uint8_t> payload, 126 rtc::ArrayView<const uint8_t> payload,
126 uint32_t receive_timestamp) { 127 uint32_t receive_timestamp) {
128 TRACE_EVENT0("webrtc", "NetEqImpl::InsertPacket");
127 CriticalSectionScoped lock(crit_sect_.get()); 129 CriticalSectionScoped lock(crit_sect_.get());
128 int error = 130 int error =
129 InsertPacketInternal(rtp_header, payload, receive_timestamp, false); 131 InsertPacketInternal(rtp_header, payload, receive_timestamp, false);
130 if (error != 0) { 132 if (error != 0) {
131 error_code_ = error; 133 error_code_ = error;
132 return kFail; 134 return kFail;
133 } 135 }
134 return kOK; 136 return kOK;
135 } 137 }
136 138
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 2044
2043 void NetEqImpl::CreateDecisionLogic() { 2045 void NetEqImpl::CreateDecisionLogic() {
2044 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, 2046 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_,
2045 playout_mode_, 2047 playout_mode_,
2046 decoder_database_.get(), 2048 decoder_database_.get(),
2047 *packet_buffer_.get(), 2049 *packet_buffer_.get(),
2048 delay_manager_.get(), 2050 delay_manager_.get(),
2049 buffer_level_filter_.get())); 2051 buffer_level_filter_.get()));
2050 } 2052 }
2051 } // namespace webrtc 2053 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698