summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-11-19 11:48:48 +0100
committerGitHub <noreply@github.com>2018-11-19 11:48:48 +0100
commitf4908ce993e54f96876ec3abc2cd0192d4f1230c (patch)
tree392b573c24677c0b708e9bc19bf0ca73cf0a512b /media
parent181e7572833e26696bd477fa34b6da2c2af7ca6f (diff)
parent56c26d86748eadb1292b141993a48bf035081346 (diff)
downloadUXP-f4908ce993e54f96876ec3abc2cd0192d4f1230c.tar
UXP-f4908ce993e54f96876ec3abc2cd0192d4f1230c.tar.gz
UXP-f4908ce993e54f96876ec3abc2cd0192d4f1230c.tar.lz
UXP-f4908ce993e54f96876ec3abc2cd0192d4f1230c.tar.xz
UXP-f4908ce993e54f96876ec3abc2cd0192d4f1230c.zip
Merge pull request #876 from trav90/add-av1-support
Add support for AV1 in MP4 container
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/frameworks/av/include/media/stagefright/MediaDefs.h1
-rw-r--r--media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp6
-rw-r--r--media/libstagefright/frameworks/av/media/libstagefright/MediaDefs.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/frameworks/av/include/media/stagefright/MediaDefs.h b/media/libstagefright/frameworks/av/include/media/stagefright/MediaDefs.h
index 7ac6db8d5..b8aad681d 100644
--- a/media/libstagefright/frameworks/av/include/media/stagefright/MediaDefs.h
+++ b/media/libstagefright/frameworks/av/include/media/stagefright/MediaDefs.h
@@ -25,6 +25,7 @@ extern const char *MEDIA_MIMETYPE_IMAGE_JPEG;
extern const char *MEDIA_MIMETYPE_VIDEO_VP6;
extern const char *MEDIA_MIMETYPE_VIDEO_VP8;
extern const char *MEDIA_MIMETYPE_VIDEO_VP9;
+extern const char *MEDIA_MIMETYPE_VIDEO_AV1;
extern const char *MEDIA_MIMETYPE_VIDEO_AVC;
extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4;
extern const char *MEDIA_MIMETYPE_VIDEO_H263;
diff --git a/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
index 5667f04d8..786e80487 100644
--- a/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
@@ -269,6 +269,10 @@ static const char *FourCC2MIME(uint32_t fourcc) {
case FOURCC('V', 'P', '6', 'F'):
return MEDIA_MIMETYPE_VIDEO_VP6;
+ case FOURCC('a', 'v', '0', '1'):
+ case FOURCC('.', 'a', 'v', '1'):
+ return MEDIA_MIMETYPE_VIDEO_AV1;
+
default:
ALOGE("Unknown MIME type %08x", fourcc);
return NULL;
@@ -1346,6 +1350,8 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('a', 'v', 'c', '1'):
case FOURCC('a', 'v', 'c', '3'):
case FOURCC('V', 'P', '6', 'F'):
+ case FOURCC('a', 'v', '0', '1'):
+ case FOURCC('.', 'a', 'v', '1'):
{
mHasVideo = true;
diff --git a/media/libstagefright/frameworks/av/media/libstagefright/MediaDefs.cpp b/media/libstagefright/frameworks/av/media/libstagefright/MediaDefs.cpp
index a1b520b10..a7c6e75fc 100644
--- a/media/libstagefright/frameworks/av/media/libstagefright/MediaDefs.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MediaDefs.cpp
@@ -23,6 +23,7 @@ const char *MEDIA_MIMETYPE_IMAGE_JPEG = "image/jpeg";
const char *MEDIA_MIMETYPE_VIDEO_VP6 = "video/x-vnd.on2.vp6";
const char *MEDIA_MIMETYPE_VIDEO_VP8 = "video/x-vnd.on2.vp8";
const char *MEDIA_MIMETYPE_VIDEO_VP9 = "video/x-vnd.on2.vp9";
+const char *MEDIA_MIMETYPE_VIDEO_AV1 = "video/av1";
const char *MEDIA_MIMETYPE_VIDEO_AVC = "video/avc";
const char *MEDIA_MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es";
const char *MEDIA_MIMETYPE_VIDEO_H263 = "video/3gpp";