FIX: windows and linux hw decode strings added like a boss

This commit is contained in:
JohnE 2026-01-27 01:00:11 -08:00
parent b62401ba27
commit 2dcf7fa19b
2 changed files with 11 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025
* Copyright (c) 2026 Malloc LLC (malloc.io)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -83,17 +83,6 @@ enum HwdecMode {
/// Prefer [autoSafe] on Windows to avoid these errors.
auto('auto'),
/// Try safe hardware methods only, skip problematic ones
///
/// Recommended for Windows - works on NVIDIA, AMD, and Intel GPUs
/// without logging CUDA errors on non-NVIDIA systems.
autoSafe('auto-safe'),
/// Auto-detect but copy frames to system memory
///
/// Safer but slightly more overhead than direct rendering.
autoCopy('auto-copy'),
/// Disable hardware acceleration entirely
///
/// Uses software decoding only. Higher CPU usage but most compatible.
@ -123,7 +112,15 @@ enum HwdecMode {
/// Force MediaCodec (Android)
///
/// Android's native hardware codec API.
mediaCodec('mediacodec');
mediaCodec('mediacodec'),
/// Linux optimal: try NVIDIA first, then VA-API, then VDPAU, then software
/// Works on all Linux GPUs with proper fallback chain
linuxAuto('nvdec,vaapi,vdpau,no'),
/// Windows optimal: try NVIDIA first, then D3D11, then DXVA2, then software
/// Works on all Windows GPUs with proper fallback chain
windowsAuto('nvdec,d3d11va,dxva2,no');
const HwdecMode(this.value);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025
* Copyright (c) 2026 Malloc LLC (malloc.io)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal