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

Unified Diff: media/base/android/media_codec_bridge.cc

Issue 816353010: Implemented HEVC video demuxing and parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added hevc handling in media/base/android/media_codec_bridge.cc Created 5 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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_codec_bridge.cc
diff --git a/media/base/android/media_codec_bridge.cc b/media/base/android/media_codec_bridge.cc
index 9128df32f1fd9a36930ef3d4f83a63d4faa85ccc..8a36ff0a021a7010b97a44fbbd02cca70cf7eb84 100644
--- a/media/base/android/media_codec_bridge.cc
+++ b/media/base/android/media_codec_bridge.cc
@@ -54,6 +54,8 @@ static const std::string VideoCodecToAndroidMimeType(const VideoCodec& codec) {
switch (codec) {
case kCodecH264:
return "video/avc";
+ case kCodecHEVC:
+ return "video/hevc";
case kCodecVP8:
return "video/x-vnd.on2.vp8";
case kCodecVP9:
@@ -67,6 +69,8 @@ static const std::string CodecTypeToAndroidMimeType(const std::string& codec) {
// TODO(xhwang): Shall we handle more detailed strings like "mp4a.40.2"?
if (codec == "avc1")
return "video/avc";
+ if (codec == "hvc1")
+ return "video/hevc";
if (codec == "mp4a")
return "audio/mp4a-latm";
if (codec == "vp8" || codec == "vp8.0")
@@ -86,6 +90,8 @@ static const std::string AndroidMimeTypeToCodecType(const std::string& mime) {
return "mp4v";
if (mime == "video/avc")
return "avc1";
+ if (mime == "video/hevc")
+ return "hvc1";
if (mime == "video/x-vnd.on2.vp8")
return "vp8";
if (mime == "video/x-vnd.on2.vp9")

Powered by Google App Engine
This is Rietveld 408576698