OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/video_decoder_config.h" | 5 #include "media/base/video_decoder_config.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const gfx::Size& coded_size, | 59 const gfx::Size& coded_size, |
60 const gfx::Rect& visible_rect, | 60 const gfx::Rect& visible_rect, |
61 const gfx::Size& natural_size, | 61 const gfx::Size& natural_size, |
62 const uint8* extra_data, | 62 const uint8* extra_data, |
63 size_t extra_data_size, | 63 size_t extra_data_size, |
64 bool is_encrypted, | 64 bool is_encrypted, |
65 bool record_stats) { | 65 bool record_stats) { |
66 CHECK((extra_data_size != 0) == (extra_data != NULL)); | 66 CHECK((extra_data_size != 0) == (extra_data != NULL)); |
67 | 67 |
68 if (record_stats) { | 68 if (record_stats) { |
69 UMA_HISTOGRAM_ENUMERATION("Media.VideoCodec", codec, kVideoCodecMax + 1); | 69 UMA_HISTOGRAM_ENUMERATION( |
| 70 "Media.VideoCodec", codec, kVideoCodecHistogramMax); |
70 // Drop UNKNOWN because U_H_E() uses one bucket for all values less than 1. | 71 // Drop UNKNOWN because U_H_E() uses one bucket for all values less than 1. |
71 if (profile >= 0) { | 72 if (profile >= 0) { |
72 UMA_HISTOGRAM_ENUMERATION("Media.VideoCodecProfile", profile, | 73 UMA_HISTOGRAM_ENUMERATION("Media.VideoCodecProfile", profile, |
73 VIDEO_CODEC_PROFILE_MAX + 1); | 74 VIDEO_CODEC_PROFILE_HISTOGRAM_MAX); |
74 } | 75 } |
75 UMA_HISTOGRAM_COUNTS_10000("Media.VideoCodedWidth", coded_size.width()); | 76 UMA_HISTOGRAM_COUNTS_10000("Media.VideoCodedWidth", coded_size.width()); |
76 UmaHistogramAspectRatio("Media.VideoCodedAspectRatio", coded_size); | 77 UmaHistogramAspectRatio("Media.VideoCodedAspectRatio", coded_size); |
77 UMA_HISTOGRAM_COUNTS_10000("Media.VideoVisibleWidth", visible_rect.width()); | 78 UMA_HISTOGRAM_COUNTS_10000("Media.VideoVisibleWidth", visible_rect.width()); |
78 UmaHistogramAspectRatio("Media.VideoVisibleAspectRatio", visible_rect); | 79 UmaHistogramAspectRatio("Media.VideoVisibleAspectRatio", visible_rect); |
79 UMA_HISTOGRAM_ENUMERATION( | 80 UMA_HISTOGRAM_ENUMERATION( |
80 "Media.VideoPixelFormat", format, VideoFrame::HISTOGRAM_MAX); | 81 "Media.VideoPixelFormat", format, VideoFrame::HISTOGRAM_MAX); |
81 } | 82 } |
82 | 83 |
83 codec_ = codec; | 84 codec_ = codec; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 162 |
162 size_t VideoDecoderConfig::extra_data_size() const { | 163 size_t VideoDecoderConfig::extra_data_size() const { |
163 return extra_data_.size(); | 164 return extra_data_.size(); |
164 } | 165 } |
165 | 166 |
166 bool VideoDecoderConfig::is_encrypted() const { | 167 bool VideoDecoderConfig::is_encrypted() const { |
167 return is_encrypted_; | 168 return is_encrypted_; |
168 } | 169 } |
169 | 170 |
170 } // namespace media | 171 } // namespace media |
OLD | NEW |