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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h

Issue 1203803004: Adding a new ChangeLogger class to handle UMA logging of bitrates (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/base/scoped_ptr.h" 16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/base/thread_annotations.h" 17 #include "webrtc/base/thread_annotations.h"
18 #include "webrtc/common_types.h" 18 #include "webrtc/common_types.h"
19 #include "webrtc/engine_configurations.h" 19 #include "webrtc/engine_configurations.h"
20 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h" 20 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
21 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h" 21 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
22 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h" 22 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
23 #include "webrtc/modules/audio_coding/main/acm2/codec_manager.h" 23 #include "webrtc/modules/audio_coding/main/acm2/codec_manager.h"
24 #include "webrtc/modules/audio_coding/main/acm2/delayed_logger.h"
24 25
25 namespace webrtc { 26 namespace webrtc {
26 27
27 class CriticalSectionWrapper; 28 class CriticalSectionWrapper;
28 class AudioCodingImpl; 29 class AudioCodingImpl;
29 30
30 namespace acm2 { 31 namespace acm2 {
31 32
32 class ACMDTMFDetection; 33 class ACMDTMFDetection;
33 34
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Change required states after starting to receive the codec corresponding 279 // Change required states after starting to receive the codec corresponding
279 // to |index|. 280 // to |index|.
280 int UpdateUponReceivingCodec(int index); 281 int UpdateUponReceivingCodec(int index);
281 282
282 CriticalSectionWrapper* acm_crit_sect_; 283 CriticalSectionWrapper* acm_crit_sect_;
283 int id_; // TODO(henrik.lundin) Make const. 284 int id_; // TODO(henrik.lundin) Make const.
284 uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_); 285 uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_);
285 uint32_t expected_in_ts_ GUARDED_BY(acm_crit_sect_); 286 uint32_t expected_in_ts_ GUARDED_BY(acm_crit_sect_);
286 ACMResampler resampler_ GUARDED_BY(acm_crit_sect_); 287 ACMResampler resampler_ GUARDED_BY(acm_crit_sect_);
287 AcmReceiver receiver_; // AcmReceiver has it's own internal lock. 288 AcmReceiver receiver_; // AcmReceiver has it's own internal lock.
289 DelayedLogger bitrate_logger_ GUARDED_BY(acm_crit_sect_);
288 CodecManager codec_manager_ GUARDED_BY(acm_crit_sect_); 290 CodecManager codec_manager_ GUARDED_BY(acm_crit_sect_);
289 291
290 // This is to keep track of CN instances where we can send DTMFs. 292 // This is to keep track of CN instances where we can send DTMFs.
291 uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_); 293 uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_);
292 294
293 // Used when payloads are pushed into ACM without any RTP info 295 // Used when payloads are pushed into ACM without any RTP info
294 // One example is when pre-encoded bit-stream is pushed from 296 // One example is when pre-encoded bit-stream is pushed from
295 // a file. 297 // a file.
296 // IMPORTANT: this variable is only used in IncomingPayload(), therefore, 298 // IMPORTANT: this variable is only used in IncomingPayload(), therefore,
297 // no lock acquired when interacting with this variable. If it is going to 299 // no lock acquired when interacting with this variable. If it is going to
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 int playout_frequency_hz_; 385 int playout_frequency_hz_;
384 // TODO(henrik.lundin): All members below this line are temporary and should 386 // TODO(henrik.lundin): All members below this line are temporary and should
385 // be removed after refactoring is completed. 387 // be removed after refactoring is completed.
386 rtc::scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_; 388 rtc::scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_;
387 CodecInst current_send_codec_; 389 CodecInst current_send_codec_;
388 }; 390 };
389 391
390 } // namespace webrtc 392 } // namespace webrtc
391 393
392 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ 394 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698