diff options
author | Moonchild <moonchild@palemoon.org> | 2022-04-27 11:13:34 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-27 12:34:26 +0000 |
commit | bf8359c70453d9f68a6e14cf04fd6ad132329129 (patch) | |
tree | 0c0ca6e8ff02deedcba285393cfe1c79c2302a31 /dom/media | |
parent | 4e5b100cca8e1b181f4ab8fb66b340ae2a95bd74 (diff) | |
download | uxp-bf8359c70453d9f68a6e14cf04fd6ad132329129.tar.gz |
Issue #1820 - Part 6: Extract bit depth information from codec parameter string
into VideoInfo::mBitDepth.
Diffstat (limited to 'dom/media')
-rw-r--r-- | dom/media/fmp4/MP4Decoder.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index b57cd9b528..23f09324b4 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -135,9 +135,16 @@ MP4Decoder::CanHandleMediaType(const MediaContentType& aType, continue; } if (IsVP9CodecString(codec)) { - trackInfos.AppendElement( - CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters( - NS_LITERAL_CSTRING("video/vp9"), aType)); + auto trackInfo = + CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters( + NS_LITERAL_CSTRING("video/vp9"), aType); + uint8_t profile = 0; + uint8_t level = 0; + uint8_t bitDepth = 0; + if (ExtractVPXCodecDetails(codec, profile, level, bitDepth)) { + trackInfo->GetAsVideoInfo()->mBitDepth = bitDepth; + } + trackInfos.AppendElement(Move(trackInfo)); continue; } #ifdef MOZ_AV1 |