From d9736305e701932e95cbd84b9c06f704011e2195 Mon Sep 17 00:00:00 2001 From: Christian Benincasa Date: Sat, 11 Jan 2025 11:02:19 -0500 Subject: [PATCH] fix: check for windows sooner when checking qsv/vaapi capabilities --- .../VaapiHardwareCapabilitiesFactory.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/src/ffmpeg/builder/capabilities/VaapiHardwareCapabilitiesFactory.ts b/server/src/ffmpeg/builder/capabilities/VaapiHardwareCapabilitiesFactory.ts index 39546590..07367093 100644 --- a/server/src/ffmpeg/builder/capabilities/VaapiHardwareCapabilitiesFactory.ts +++ b/server/src/ffmpeg/builder/capabilities/VaapiHardwareCapabilitiesFactory.ts @@ -29,6 +29,14 @@ export class VaapiHardwareCapabilitiesFactory constructor(private transcodeConfig: TranscodeConfig) {} async getCapabilities() { + // windows check bail! + if (process.platform === 'win32') { + this.logger.debug( + 'Cannot detect VAAPI capabilities on Windows. Using default hw capabilities', + ); + return new DefaultHardwareCapabilities(); + } + const vaapiDevice = isNonEmptyString(this.transcodeConfig.vaapiDevice) ? this.transcodeConfig.vaapiDevice : isLinux() @@ -40,14 +48,6 @@ export class VaapiHardwareCapabilitiesFactory return new NoHardwareCapabilities(); } - // windows check bail! - if (process.platform === 'win32') { - this.logger.debug( - 'Cannot detect VAAPI capabilities on Windows. Using default hw capabilities', - ); - return new DefaultHardwareCapabilities(); - } - const driver = this.transcodeConfig.vaapiDriver !== 'system' ? this.transcodeConfig.vaapiDriver