Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: media/base/video_codecs.cc

Issue 1769593002: Add 4 VP9 profiles to the media::VideoCodecProfile enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hevc-codec-7
Patch Set: Better TODOs Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 case H264PROFILE_MULTIVIEWHIGH: 64 case H264PROFILE_MULTIVIEWHIGH:
65 return "h264 multiview high"; 65 return "h264 multiview high";
66 case HEVCPROFILE_MAIN: 66 case HEVCPROFILE_MAIN:
67 return "hevc main"; 67 return "hevc main";
68 case HEVCPROFILE_MAIN10: 68 case HEVCPROFILE_MAIN10:
69 return "hevc main 10"; 69 return "hevc main 10";
70 case HEVCPROFILE_MAIN_STILL_PICTURE: 70 case HEVCPROFILE_MAIN_STILL_PICTURE:
71 return "hevc main still-picture"; 71 return "hevc main still-picture";
72 case VP8PROFILE_ANY: 72 case VP8PROFILE_ANY:
73 return "vp8"; 73 return "vp8";
74 case VP9PROFILE_ANY: 74 case VP9PROFILE_PROFILE0:
75 return "vp9"; 75 return "vp9 profile0";
76 case VP9PROFILE_PROFILE1:
77 return "vp9 profile1";
78 case VP9PROFILE_PROFILE2:
79 return "vp9 profile2";
80 case VP9PROFILE_PROFILE3:
81 return "vp9 profile3";
76 } 82 }
77 NOTREACHED(); 83 NOTREACHED();
78 return ""; 84 return "";
79 } 85 }
80 86
81 bool ParseAVCCodecId(const std::string& codec_id, 87 bool ParseAVCCodecId(const std::string& codec_id,
82 VideoCodecProfile* profile, 88 VideoCodecProfile* profile,
83 uint8_t* level_idc) { 89 uint8_t* level_idc) {
84 // Make sure we have avc1.xxxxxx or avc3.xxxxxx , where xxxxxx are hex digits 90 // Make sure we have avc1.xxxxxx or avc3.xxxxxx , where xxxxxx are hex digits
85 if (!base::StartsWith(codec_id, "avc1.", base::CompareCase::SENSITIVE) && 91 if (!base::StartsWith(codec_id, "avc1.", base::CompareCase::SENSITIVE) &&
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return false; 275 return false;
270 } 276 }
271 constraint_flags[i] = constr_byte; 277 constraint_flags[i] = constr_byte;
272 } 278 }
273 279
274 return true; 280 return true;
275 } 281 }
276 #endif 282 #endif
277 283
278 } // namespace media 284 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698