• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 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 #include "video_codecs.h"
8 
9 #include "base/logging.h"
10 
11 namespace media {
12 
GetProfileName(VideoCodecProfile profile)13 std::string GetProfileName(VideoCodecProfile profile) {
14   switch (profile) {
15     case VIDEO_CODEC_PROFILE_UNKNOWN:
16       return "unknown";
17     case H264PROFILE_BASELINE:
18       return "h264 baseline";
19     case H264PROFILE_MAIN:
20       return "h264 main";
21     case H264PROFILE_EXTENDED:
22       return "h264 extended";
23     case H264PROFILE_HIGH:
24       return "h264 high";
25     case H264PROFILE_HIGH10PROFILE:
26       return "h264 high 10";
27     case H264PROFILE_HIGH422PROFILE:
28       return "h264 high 4:2:2";
29     case H264PROFILE_HIGH444PREDICTIVEPROFILE:
30       return "h264 high 4:4:4 predictive";
31     case H264PROFILE_SCALABLEBASELINE:
32       return "h264 scalable baseline";
33     case H264PROFILE_SCALABLEHIGH:
34       return "h264 scalable high";
35     case H264PROFILE_STEREOHIGH:
36       return "h264 stereo high";
37     case H264PROFILE_MULTIVIEWHIGH:
38       return "h264 multiview high";
39     case HEVCPROFILE_MAIN:
40       return "hevc main";
41     case HEVCPROFILE_MAIN10:
42       return "hevc main 10";
43     case HEVCPROFILE_MAIN_STILL_PICTURE:
44       return "hevc main still-picture";
45     case VP8PROFILE_ANY:
46       return "vp8";
47     case VP9PROFILE_PROFILE0:
48       return "vp9 profile0";
49     case VP9PROFILE_PROFILE1:
50       return "vp9 profile1";
51     case VP9PROFILE_PROFILE2:
52       return "vp9 profile2";
53     case VP9PROFILE_PROFILE3:
54       return "vp9 profile3";
55     case DOLBYVISION_PROFILE0:
56       return "dolby vision profile 0";
57     case DOLBYVISION_PROFILE4:
58       return "dolby vision profile 4";
59     case DOLBYVISION_PROFILE5:
60       return "dolby vision profile 5";
61     case DOLBYVISION_PROFILE7:
62       return "dolby vision profile 7";
63   }
64   NOTREACHED();
65   return "";
66 }
67 
68 }  // namespace media
69