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

Unified Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 1967503002: Audio codec usage statistics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed strings and added enum classes Created 4 years, 7 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/codecs/audio_encoder.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.h b/webrtc/modules/audio_coding/codecs/audio_encoder.h
index a0f1839e73393c4ad017c6d6d5393a740187f64d..914352dc046a77d1223f1f2fccd70bd51b602f12 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.h
@@ -25,12 +25,30 @@ namespace webrtc {
// type must have an implementation of this class.
class AudioEncoder {
public:
+ // Used for UMA logging of codec usage.
ossu 2016/05/12 15:18:46 I think you should mention that they must match wh
aleloi 2016/05/12 15:30:14 Acknowledged.
+ enum class CodecType {
+ // kOther stands for no name, other or unknown codec
+ kOther = 0,
+ kOpus,
+ kIsac,
+ kPcmA,
+ kPcmU,
+ kG722,
+ kIlbc,
+
+ // Number of histogram bins in the UMA logging of codec types. The
+ // total number of different codecs that are logged cannot exceed this
+ // numbers.
ossu 2016/05/12 15:18:46 number (remove the s)
aleloi 2016/05/12 15:30:14 Acknowledged.
+ kMaxLoggedAudioCodecNames = 64
+ };
+
struct EncodedInfoLeaf {
size_t encoded_bytes = 0;
uint32_t encoded_timestamp = 0;
int payload_type = 0;
bool send_even_if_empty = false;
bool speech = true;
+ CodecType encoder_type = CodecType::kOther;
};
// This is the main struct for auxiliary encoding information. Each encoded

Powered by Google App Engine
This is Rietveld 408576698