Skip to content

Commit

Permalink
fix: check for windows sooner when checking qsv/vaapi capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbenincasa committed Jan 11, 2025
1 parent c6658f1 commit d973630
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit d973630

Please sign in to comment.