mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #2393 - Part 4 - Reduce VideoQueue size for GPU based images
This commit is contained in:
parent
b09b3771c6
commit
6807675123
1 changed files with 9 additions and 0 deletions
|
|
@ -1509,6 +1509,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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue