Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
DXVA hardware decoding on windows
Brendan Allan7d2caa5a8ff8
diff --git a/crates/ffmpeg-hw-device/src/lib.rs b/crates/ffmpeg-hw-device/src/lib.rsindex 7407085aa..f77f48017 100644--- a/crates/ffmpeg-hw-device/src/lib.rs+++ b/crates/ffmpeg-hw-device/src/lib.rs@@ -93,9 +93,7 @@ impl CodecContextExt for codec::decoder::decoder::Decoder {return Err("no hw config");}- if (*config).methods & (AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX as i32) == 1- && (*config).device_type == AVHWDeviceType::AV_HWDEVICE_TYPE_VIDEOTOOLBOX- {+ if (*config).methods & (AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX as i32) == 1 {HW_PIX_FMT.set((*config).pix_fmt);break;}diff --git a/crates/rendering/src/decoder/ffmpeg.rs b/crates/rendering/src/decoder/ffmpeg.rsindex 215d919aa..76b1b680d 100644--- a/crates/rendering/src/decoder/ffmpeg.rs+++ b/crates/rendering/src/decoder/ffmpeg.rs@@ -123,7 +123,7 @@ impl FfmpegDecoder {#[cfg(target_os = "windows")]{decoder- .try_use_hw_device(AVHWDeviceType::AV_HWDEVICE_TYPE_D3D11VA, Pixel::NV12)+ .try_use_hw_device(AVHWDeviceType::AV_HWDEVICE_TYPE_DXVA2, Pixel::DXVA2_VLD).ok()}