• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 // Note: ported from Chromium commit head: b03fc92
5 // Note: only necessary functions are ported.
6 
7 #ifndef VIDEO_CODECS_H_
8 #define VIDEO_CODECS_H_
9 
10 #include <string>
11 
12 namespace media {
13 
14 // Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see
15 // media/mojo/interfaces/media_types.mojom), gpu::VideoCodecProfile (see
16 // gpu/config/gpu_info.h), and PP_VideoDecoder_Profile (translation is performed
17 // in content/renderer/pepper/ppb_video_decoder_impl.cc).
18 // NOTE: These values are histogrammed over time in UMA so the values must never
19 // ever change (add new values to tools/metrics/histograms/histograms.xml)
20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
21 enum VideoCodecProfile {
22   // Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
23   // for example), and keep the values for a particular format grouped
24   // together for clarity.
25   VIDEO_CODEC_PROFILE_UNKNOWN = -1,
26   VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
27   H264PROFILE_MIN = 0,
28   H264PROFILE_BASELINE = H264PROFILE_MIN,
29   H264PROFILE_MAIN = 1,
30   H264PROFILE_EXTENDED = 2,
31   H264PROFILE_HIGH = 3,
32   H264PROFILE_HIGH10PROFILE = 4,
33   H264PROFILE_HIGH422PROFILE = 5,
34   H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
35   H264PROFILE_SCALABLEBASELINE = 7,
36   H264PROFILE_SCALABLEHIGH = 8,
37   H264PROFILE_STEREOHIGH = 9,
38   H264PROFILE_MULTIVIEWHIGH = 10,
39   H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
40   VP8PROFILE_MIN = 11,
41   VP8PROFILE_ANY = VP8PROFILE_MIN,
42   VP8PROFILE_MAX = VP8PROFILE_ANY,
43   VP9PROFILE_MIN = 12,
44   VP9PROFILE_PROFILE0 = VP9PROFILE_MIN,
45   VP9PROFILE_PROFILE1 = 13,
46   VP9PROFILE_PROFILE2 = 14,
47   VP9PROFILE_PROFILE3 = 15,
48   VP9PROFILE_MAX = VP9PROFILE_PROFILE3,
49   HEVCPROFILE_MIN = 16,
50   HEVCPROFILE_MAIN = HEVCPROFILE_MIN,
51   HEVCPROFILE_MAIN10 = 17,
52   HEVCPROFILE_MAIN_STILL_PICTURE = 18,
53   HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
54   DOLBYVISION_MIN = 19,
55   DOLBYVISION_PROFILE0 = DOLBYVISION_MIN,
56   DOLBYVISION_PROFILE4 = 20,
57   DOLBYVISION_PROFILE5 = 21,
58   DOLBYVISION_PROFILE7 = 22,
59   DOLBYVISION_MAX = DOLBYVISION_PROFILE7,
60   VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_MAX,
61 };
62 
63 std::string GetProfileName(VideoCodecProfile profile);
64 
65 }  // namespace media
66 
67 #endif  // VIDEO_CODECS_H_
68