| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_codecs.h" | 5 #include "media/base/video_codecs.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 case H264PROFILE_SCALABLEBASELINE: | 57 case H264PROFILE_SCALABLEBASELINE: |
| 58 return "h264 scalable baseline"; | 58 return "h264 scalable baseline"; |
| 59 case H264PROFILE_SCALABLEHIGH: | 59 case H264PROFILE_SCALABLEHIGH: |
| 60 return "h264 scalable high"; | 60 return "h264 scalable high"; |
| 61 case H264PROFILE_STEREOHIGH: | 61 case H264PROFILE_STEREOHIGH: |
| 62 return "h264 stereo high"; | 62 return "h264 stereo high"; |
| 63 case H264PROFILE_MULTIVIEWHIGH: | 63 case H264PROFILE_MULTIVIEWHIGH: |
| 64 return "h264 multiview high"; | 64 return "h264 multiview high"; |
| 65 case VP8PROFILE_ANY: | 65 case VP8PROFILE_ANY: |
| 66 return "vp8"; | 66 return "vp8"; |
| 67 case VP9PROFILE_ANY: | 67 case VP9PROFILE_PROFILE0: |
| 68 return "vp9"; | 68 return "vp9 profile0"; |
| 69 case VP9PROFILE_PROFILE1: |
| 70 return "vp9 profile1"; |
| 71 case VP9PROFILE_PROFILE2: |
| 72 return "vp9 profile2"; |
| 73 case VP9PROFILE_PROFILE3: |
| 74 return "vp9 profile3"; |
| 69 } | 75 } |
| 70 NOTREACHED(); | 76 NOTREACHED(); |
| 71 return ""; | 77 return ""; |
| 72 } | 78 } |
| 73 | 79 |
| 74 bool ParseAVCCodecId(const std::string& codec_id, | 80 bool ParseAVCCodecId(const std::string& codec_id, |
| 75 VideoCodecProfile* profile, | 81 VideoCodecProfile* profile, |
| 76 uint8_t* level_idc) { | 82 uint8_t* level_idc) { |
| 77 // Make sure we have avc1.xxxxxx or avc3.xxxxxx , where xxxxxx are hex digits | 83 // Make sure we have avc1.xxxxxx or avc3.xxxxxx , where xxxxxx are hex digits |
| 78 if (!base::StartsWith(codec_id, "avc1.", base::CompareCase::SENSITIVE) && | 84 if (!base::StartsWith(codec_id, "avc1.", base::CompareCase::SENSITIVE) && |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 if (level_idc) | 163 if (level_idc) |
| 158 *level_idc = level_byte; | 164 *level_idc = level_byte; |
| 159 | 165 |
| 160 if (profile) | 166 if (profile) |
| 161 *profile = out_profile; | 167 *profile = out_profile; |
| 162 | 168 |
| 163 return true; | 169 return true; |
| 164 } | 170 } |
| 165 | 171 |
| 166 } // namespace media | 172 } // namespace media |
| OLD | NEW |