Bug 1407919 - Part5 - Extract bit depth information from codec parameter string into VideoInfo::mBitDepth. r=jya

MozReview-Commit-ID: GUwSrpbhOxA

--HG--
extra : rebase_source : 2efbf5f6cb61b99059b2d7ae05676af72266d2c2
This commit is contained in:
James Cheng 2017-10-17 11:20:44 +08:00
Родитель 0052736720
Коммит fe306cda12
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -111,9 +111,16 @@ MP4Decoder::IsSupportedType(const MediaContainerType& aType,
continue;
}
if (IsVP9CodecString(codec)) {
trackInfos.AppendElement(
auto trackInfo =
CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
NS_LITERAL_CSTRING("video/vp9"), aType));
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;
}
// Note: Only accept H.264 in a video content type, not in an audio