From 2dcf7fa19b34f49b8f2c1cec16c73192fe75dfed Mon Sep 17 00:00:00 2001 From: JohnE Date: Tue, 27 Jan 2026 01:00:11 -0800 Subject: [PATCH] FIX: windows and linux hw decode strings added like a boss --- lib/splash_video_enums.dart | 23 ++++++++++------------- lib/widgets/splash_video_w.dart | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/splash_video_enums.dart b/lib/splash_video_enums.dart index c31b4ca..430533f 100644 --- a/lib/splash_video_enums.dart +++ b/lib/splash_video_enums.dart @@ -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); diff --git a/lib/widgets/splash_video_w.dart b/lib/widgets/splash_video_w.dart index df04755..efad853 100644 --- a/lib/widgets/splash_video_w.dart +++ b/lib/widgets/splash_video_w.dart @@ -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