Issue #1820 - Part 6: Extract bit depth information from codec parameter string into VideoInfo::mBitDepth.

This commit is contained in:
Moonchild 2022-04-27 11:13:34 +00:00 committed by roytam1
commit 14f0f80cd1

View file

@ -143,9 +143,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