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

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

Issue 1677133003: Implemented parsing of HEVC codec ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parse-codec-id
Patch Set: Fixed unit test Created 4 years, 10 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
« no previous file with comments | « media/base/mime_util_internal.cc ('k') | media/base/video_codecs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef MEDIA_BASE_VIDEO_CODECS_H_ 5 #ifndef MEDIA_BASE_VIDEO_CODECS_H_
6 #define MEDIA_BASE_VIDEO_CODECS_H_ 6 #define MEDIA_BASE_VIDEO_CODECS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/media_features.h"
11 12
12 namespace media { 13 namespace media {
13 14
14 enum VideoCodec { 15 enum VideoCodec {
15 // These values are histogrammed over time; do not change their ordinal 16 // These values are histogrammed over time; do not change their ordinal
16 // values. When deleting a codec replace it with a dummy value; when adding a 17 // values. When deleting a codec replace it with a dummy value; when adding a
17 // codec, do so at the bottom (and update kVideoCodecMax). 18 // codec, do so at the bottom (and update kVideoCodecMax).
18 kUnknownVideoCodec = 0, 19 kUnknownVideoCodec = 0,
19 kCodecH264, 20 kCodecH264,
20 kCodecVC1, 21 kCodecVC1,
(...skipping 26 matching lines...) Expand all
47 H264PROFILE_EXTENDED = 2, 48 H264PROFILE_EXTENDED = 2,
48 H264PROFILE_HIGH = 3, 49 H264PROFILE_HIGH = 3,
49 H264PROFILE_HIGH10PROFILE = 4, 50 H264PROFILE_HIGH10PROFILE = 4,
50 H264PROFILE_HIGH422PROFILE = 5, 51 H264PROFILE_HIGH422PROFILE = 5,
51 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, 52 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
52 H264PROFILE_SCALABLEBASELINE = 7, 53 H264PROFILE_SCALABLEBASELINE = 7,
53 H264PROFILE_SCALABLEHIGH = 8, 54 H264PROFILE_SCALABLEHIGH = 8,
54 H264PROFILE_STEREOHIGH = 9, 55 H264PROFILE_STEREOHIGH = 9,
55 H264PROFILE_MULTIVIEWHIGH = 10, 56 H264PROFILE_MULTIVIEWHIGH = 10,
56 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, 57 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
57 VP8PROFILE_MIN = 11, 58 HEVCPROFILE_MAIN,
ddorwin 2016/02/18 17:30:02 All other codecs follow this format: MIN FOO=MIN B
servolk 2016/02/18 19:16:20 Done (I've also removed unnecessary explicit assig
ddorwin 2016/02/18 21:52:22 +dalecurtis to confirm there are not any problems
DaleCurtis 2016/02/18 22:04:55 You can't do this since these are logged to UMA, t
ddorwin 2016/02/18 22:21:41 Ahh, thanks. I checked one of the other enums for
servolk 2016/02/18 22:28:51 Ok, I'll move the HEVC profiles after VP8/VP9, but
DaleCurtis 2016/02/19 23:15:17 Doesn't really matter if we're sure or not; these
servolk 2016/02/19 23:47:55 Done (I've also restored the explicit value number
servolk 2016/02/19 23:57:31 Btw, I've also just noticed that there's a mismatc
59 HEVCPROFILE_MIN = HEVCPROFILE_MAIN,
60 HEVCPROFILE_MAIN10,
61 HEVCPROFILE_MAIN_STILL_PICTURE,
ddorwin 2016/02/18 17:30:02 This is just an image right? Do you have plans to
servolk 2016/02/18 19:16:20 Yes, this is a single video frame, i.e. essentiall
62 HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
63 VP8PROFILE_MIN,
58 VP8PROFILE_ANY = VP8PROFILE_MIN, 64 VP8PROFILE_ANY = VP8PROFILE_MIN,
59 VP8PROFILE_MAX = VP8PROFILE_ANY, 65 VP8PROFILE_MAX = VP8PROFILE_ANY,
60 VP9PROFILE_MIN = 12, 66 VP9PROFILE_MIN,
61 VP9PROFILE_ANY = VP9PROFILE_MIN, 67 VP9PROFILE_ANY = VP9PROFILE_MIN,
62 VP9PROFILE_MAX = VP9PROFILE_ANY, 68 VP9PROFILE_MAX = VP9PROFILE_ANY,
63 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX, 69 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
64 }; 70 };
65 71
66 std::string MEDIA_EXPORT GetCodecName(VideoCodec codec); 72 std::string MEDIA_EXPORT GetCodecName(VideoCodec codec);
67 std::string MEDIA_EXPORT GetProfileName(VideoCodecProfile profile); 73 std::string MEDIA_EXPORT GetProfileName(VideoCodecProfile profile);
68 74
69 // Handle parsing AVC/H.264 codec ids as outlined in RFC 6381 and ISO-14496-10. 75 // Handle parsing AVC/H.264 codec ids as outlined in RFC 6381 and ISO-14496-10.
70 MEDIA_EXPORT bool ParseAVCCodecId(const std::string& codec_id, 76 MEDIA_EXPORT bool ParseAVCCodecId(const std::string& codec_id,
71 VideoCodecProfile* profile, 77 VideoCodecProfile* profile,
72 uint8_t* level_idc); 78 uint8_t* level_idc);
73 79
80 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
81 MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id,
ddorwin 2016/02/18 17:30:03 Why have these been moved from mime_util and expos
servolk 2016/02/18 19:16:20 I've exposed them as media_export to make them acc
ddorwin 2016/02/18 21:52:22 I'd like to understand more about that usage - not
servolk 2016/02/18 22:28:51 Sure, we can probably move that discussion to a se
82 VideoCodecProfile* profile,
83 uint8_t* level_idc);
84 #endif
85
74 } // namespace media 86 } // namespace media
75 87
76 #endif // MEDIA_BASE_VIDEO_CODECS_H_ 88 #endif // MEDIA_BASE_VIDEO_CODECS_H_
OLDNEW
« no previous file with comments | « media/base/mime_util_internal.cc ('k') | media/base/video_codecs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698