mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Issue #1820 - Part 2: Add VP9-in-MP4 support to the decoder
This also adds support in StageFright for VP9.0 FourCCs and consolidates individual string checks to helpers for WebM
This commit is contained in:
parent
55504b39bf
commit
648430c9f1
4 changed files with 11 additions and 3 deletions
|
|
@ -142,6 +142,12 @@ MP4Decoder::CanHandleMediaType(const MediaContentType& aType,
|
|||
NS_LITERAL_CSTRING("audio/flac"), aType));
|
||||
continue;
|
||||
}
|
||||
if (IsVP9CodecString(codec)) {
|
||||
trackInfos.AppendElement(
|
||||
CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
|
||||
NS_LITERAL_CSTRING("video/vp9"), aType));
|
||||
continue;
|
||||
}
|
||||
#ifdef MOZ_AV1
|
||||
if (IsAV1CodecString(codec)) {
|
||||
trackInfos.AppendElement(
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
|
|||
// Note: Only accept VP8/VP9 in a video content type, not in an audio
|
||||
// content type.
|
||||
if ((isWebMVideo || isMatroskaVideo) &&
|
||||
(codec.EqualsLiteral("vp8") || codec.EqualsLiteral("vp8.0") ||
|
||||
codec.EqualsLiteral("vp9") || codec.EqualsLiteral("vp9.0"))) {
|
||||
(IsVP8CodecString(codec) || IsVP9CodecString(codec))) {
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ static const char *FourCC2MIME(uint32_t fourcc) {
|
|||
case FOURCC('V', 'P', '6', 'F'):
|
||||
return MEDIA_MIMETYPE_VIDEO_VP6;
|
||||
|
||||
case FOURCC('v', 'p', '0', '9'):
|
||||
return MEDIA_MIMETYPE_VIDEO_VP9;
|
||||
|
||||
case FOURCC('a', 'v', '0', '1'):
|
||||
case FOURCC('.', 'a', 'v', '1'):
|
||||
return MEDIA_MIMETYPE_VIDEO_AV1;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,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_VP9 = "video/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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue