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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module.cc

Issue 3011623002: Add new ANA stats to GetStats() to count the number of actions taken by each controller. (Closed)
Patch Set: Fix for failing test. Created 3 years, 3 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 int UnregisterReceiveCodec(uint8_t payload_type) override; 197 int UnregisterReceiveCodec(uint8_t payload_type) override;
198 198
199 int EnableNack(size_t max_nack_list_size) override; 199 int EnableNack(size_t max_nack_list_size) override;
200 200
201 void DisableNack() override; 201 void DisableNack() override;
202 202
203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override; 203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override;
204 204
205 void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const override; 205 void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const override;
206 206
207 ANAStats GetANAStats() const override;
208
207 private: 209 private:
208 struct InputData { 210 struct InputData {
209 uint32_t input_timestamp; 211 uint32_t input_timestamp;
210 const int16_t* audio; 212 const int16_t* audio;
211 size_t length_per_channel; 213 size_t length_per_channel;
212 size_t audio_channel; 214 size_t audio_channel;
213 // If a re-mix is required (up or down), this buffer will store a re-mixed 215 // If a re-mix is required (up or down), this buffer will store a re-mixed
214 // version of the input. 216 // version of the input.
215 int16_t buffer[WEBRTC_10MS_PCM_AUDIO]; 217 int16_t buffer[WEBRTC_10MS_PCM_AUDIO];
216 }; 218 };
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 1268
1267 int AudioCodingModuleImpl::LeastRequiredDelayMs() const { 1269 int AudioCodingModuleImpl::LeastRequiredDelayMs() const {
1268 return receiver_.LeastRequiredDelayMs(); 1270 return receiver_.LeastRequiredDelayMs();
1269 } 1271 }
1270 1272
1271 void AudioCodingModuleImpl::GetDecodingCallStatistics( 1273 void AudioCodingModuleImpl::GetDecodingCallStatistics(
1272 AudioDecodingCallStats* call_stats) const { 1274 AudioDecodingCallStats* call_stats) const {
1273 receiver_.GetDecodingCallStatistics(call_stats); 1275 receiver_.GetDecodingCallStatistics(call_stats);
1274 } 1276 }
1275 1277
1278 ANAStats AudioCodingModuleImpl::GetANAStats() const {
1279 rtc::CritScope lock(&acm_crit_sect_);
1280 if (encoder_stack_)
1281 return encoder_stack_->GetANAStats();
1282 // If no encoder is set, return default stats.
1283 return ANAStats();
1284 }
1285
1276 } // namespace 1286 } // namespace
1277 1287
1278 AudioCodingModule::Config::Config() 1288 AudioCodingModule::Config::Config()
1279 : id(0), neteq_config(), clock(Clock::GetRealTimeClock()) { 1289 : id(0), neteq_config(), clock(Clock::GetRealTimeClock()) {
1280 // Post-decode VAD is disabled by default in NetEq, however, Audio 1290 // Post-decode VAD is disabled by default in NetEq, however, Audio
1281 // Conference Mixer relies on VAD decisions and fails without them. 1291 // Conference Mixer relies on VAD decisions and fails without them.
1282 neteq_config.enable_post_decode_vad = true; 1292 neteq_config.enable_post_decode_vad = true;
1283 } 1293 }
1284 1294
1285 AudioCodingModule::Config::Config(const Config&) = default; 1295 AudioCodingModule::Config::Config(const Config&) = default;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 1373
1364 // Checks the validity of the parameters of the given codec 1374 // Checks the validity of the parameters of the given codec
1365 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { 1375 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
1366 bool valid = acm2::RentACodec::IsCodecValid(codec); 1376 bool valid = acm2::RentACodec::IsCodecValid(codec);
1367 if (!valid) 1377 if (!valid)
1368 LOG(LS_ERROR) << "Invalid codec setting"; 1378 LOG(LS_ERROR) << "Invalid codec setting";
1369 return valid; 1379 return valid;
1370 } 1380 }
1371 1381
1372 } // namespace webrtc 1382 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698