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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/codec_owner.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, 5 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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_CODEC_OWNER_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_
13 13
14 #include "webrtc/base/constructormagic.h" 14 #include "webrtc/base/constructormagic.h"
15 #include "webrtc/base/scoped_ptr.h" 15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/common_types.h" 16 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" 17 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
18 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_i sac.h" 18 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_i sac.h"
19 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedef s.h" 19 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedef s.h"
20 20
21 namespace webrtc { 21 namespace webrtc {
22 22
23 class AudioDecoder; 23 class AudioDecoder;
24 24
25 namespace acm2 { 25 namespace acm2 {
26 26
27 class DelayedLogger;
28
27 class CodecOwner { 29 class CodecOwner {
28 public: 30 public:
29 CodecOwner(); 31 CodecOwner(DelayedLogger* bitrate_logger);
30 ~CodecOwner(); 32 ~CodecOwner();
31 33
32 void SetEncoders(const CodecInst& speech_inst, 34 void SetEncoders(const CodecInst& speech_inst,
33 int cng_payload_type, 35 int cng_payload_type,
34 ACMVADMode vad_mode, 36 ACMVADMode vad_mode,
35 int red_payload_type); 37 int red_payload_type);
36 38
37 void SetEncoders(AudioEncoderMutable* external_speech_encoder, 39 void SetEncoders(AudioEncoderMutable* external_speech_encoder,
38 int cng_payload_type, 40 int cng_payload_type,
39 ACMVADMode vad_mode, 41 ACMVADMode vad_mode,
(...skipping 26 matching lines...) Expand all
66 rtc::scoped_ptr<AudioEncoderMutable> speech_encoder_; 68 rtc::scoped_ptr<AudioEncoderMutable> speech_encoder_;
67 rtc::scoped_ptr<AudioEncoderDecoderMutableIsac> isac_codec_; 69 rtc::scoped_ptr<AudioEncoderDecoderMutableIsac> isac_codec_;
68 bool isac_is_encoder_; 70 bool isac_is_encoder_;
69 AudioEncoderMutable* external_speech_encoder_; 71 AudioEncoderMutable* external_speech_encoder_;
70 72
71 // |cng_encoder_| and |red_encoder_| are valid iff CNG or RED, respectively, 73 // |cng_encoder_| and |red_encoder_| are valid iff CNG or RED, respectively,
72 // are active. 74 // are active.
73 rtc::scoped_ptr<AudioEncoder> cng_encoder_; 75 rtc::scoped_ptr<AudioEncoder> cng_encoder_;
74 rtc::scoped_ptr<AudioEncoder> red_encoder_; 76 rtc::scoped_ptr<AudioEncoder> red_encoder_;
75 77
78 DelayedLogger* const bitrate_logger_;
79
76 DISALLOW_COPY_AND_ASSIGN(CodecOwner); 80 DISALLOW_COPY_AND_ASSIGN(CodecOwner);
77 }; 81 };
78 82
79 } // namespace acm2 83 } // namespace acm2
80 } // namespace webrtc 84 } // namespace webrtc
81 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_ 85 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698