Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-11-30 10:05:11 +08:00
commit c889903081
34 changed files with 846 additions and 195 deletions

View file

@ -1500,6 +1500,15 @@ MediaFormatReader::Update(TrackType aTrack)
nsCString error;
mVideo.mIsHardwareAccelerated =
mVideo.mDecoder && mVideo.mDecoder->IsHardwareAccelerated(error);
#ifdef XP_WIN
// D3D11_YCBCR_IMAGE images are GPU based, we try to limit the amount
// of GPU RAM used.
VideoData* videoData = static_cast<VideoData*>(output.get());
mVideo.mIsHardwareAccelerated =
mVideo.mIsHardwareAccelerated ||
(videoData->mImage &&
videoData->mImage->GetFormat() == ImageFormat::D3D11_YCBCR_IMAGE);
#endif
}
} else if (decoder.HasFatalError()) {
LOG("Rejecting %s promise: DECODE_ERROR", TrackTypeToStr(aTrack));