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

Unified 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: Updated comments about VideoCodecProfile enum 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 side-by-side diff with in-line comments
Download patch
Index: media/base/video_codecs.h
diff --git a/media/base/video_codecs.h b/media/base/video_codecs.h
index 188b5449f7906ccb5485122ef6f75563ddde4c0b..f2c197e387f81493d65f6ed25524b59e452a7e88 100644
--- a/media/base/video_codecs.h
+++ b/media/base/video_codecs.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <string>
#include "media/base/media_export.h"
+#include "media/media_features.h"
namespace media {
@@ -32,9 +33,12 @@ enum VideoCodec {
kVideoCodecMax = kCodecHEVC // Must equal the last "real" codec above.
};
-// Video stream profile. This *must* match PP_VideoDecoder_Profile.
-// (enforced in webkit/plugins/ppapi/ppb_video_decoder_impl.cc) and
-// gpu::VideoCodecProfile.
+// Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see
+// media/mojo/interfaces/media_types.mojom) and gpu::VideoCodecProfile (see
+// gpu/config/gpu_info.h), as well as PP_VideoDecoder_Profile (translation is
+// performed in content/renderer/pepper/ppb_video_decoder_impl.cc).
+// NOTE: These values are histogrammed over time in UMA so the values must
ddorwin 2016/02/26 18:54:17 Since this note is so important, I would put it fi
+// never ever change (add new values to tools/metrics/histograms/histograms.xml)
enum VideoCodecProfile {
// Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
// for example), and keep the values for a particular format grouped
@@ -60,7 +64,12 @@ enum VideoCodecProfile {
VP9PROFILE_MIN = 12,
VP9PROFILE_ANY = VP9PROFILE_MIN,
ddorwin 2016/02/26 18:54:17 Should we reserve 3 or 4 values for VP9 profiles?
servolk 2016/02/26 19:50:19 Yeah, I think we probably should. According to wik
servolk 2016/02/26 22:24:26 Done.
VP9PROFILE_MAX = VP9PROFILE_ANY,
- VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
+ HEVCPROFILE_MIN = 13,
+ HEVCPROFILE_MAIN = HEVCPROFILE_MIN,
+ HEVCPROFILE_MAIN10 = 14,
+ HEVCPROFILE_MAIN_STILL_PICTURE = 15,
ddorwin 2016/02/26 18:54:17 If you plan to add other HEVC profiles, should we
servolk 2016/02/26 19:50:19 Currently (and I don't expect that to change for a
+ HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
+ VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_MAX,
};
std::string MEDIA_EXPORT GetCodecName(VideoCodec codec);
@@ -71,6 +80,12 @@ MEDIA_EXPORT bool ParseAVCCodecId(const std::string& codec_id,
VideoCodecProfile* profile,
uint8_t* level_idc);
+#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
+MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id,
+ VideoCodecProfile* profile,
+ uint8_t* level_idc);
+#endif
+
} // namespace media
#endif // MEDIA_BASE_VIDEO_CODECS_H_

Powered by Google App Engine
This is Rietveld 408576698