blob: 66f23beea2acd327b8f46f95461a217729dc3a0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/base/media_util.h"
#include "base/metrics/histogram_macros.h"
namespace media {
namespace {
// Reported to UMA server. Do not renumber or reuse values.
enum class MediaVideoHeight {
k360_OrLower,
k480,
k720,
k1080,
k1440,
k2160_OrHigher,
kMaxValue = k2160_OrHigher,
};
MediaVideoHeight GetMediaVideoHeight(int height) {
if (height <= 400)
return MediaVideoHeight::k360_OrLower;
if (height <= 600)
return MediaVideoHeight::k480;
if (height <= 900)
return MediaVideoHeight::k720;
if (height <= 1260)
return MediaVideoHeight::k1080;
if (height <= 1800)
return MediaVideoHeight::k1440;
return MediaVideoHeight::k2160_OrHigher;
}
} // namespace
std::vector<uint8_t> EmptyExtraData() {
return std::vector<uint8_t>();
}
void ReportPepperVideoDecoderOutputPictureCountHW(int height) {
UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderOutputPictureCount.HW",
GetMediaVideoHeight(height));
}
void ReportPepperVideoDecoderOutputPictureCountSW(int height) {
UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderOutputPictureCount.SW",
GetMediaVideoHeight(height));
}
} // namespace media
|