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