fix detection of amf hw accel on windows (#1519)
This commit is contained in:
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Properly validate filler preset mode pad to require `filler pad to nearest minute` value
|
||||
- Fix bug where previously-synchronized collection tags would disappear
|
||||
- This bug affected Jellyfin, Emby and Plex collections
|
||||
- Fix detection of AMF hardware acceleration on Windows
|
||||
|
||||
## [0.8.3-beta] - 2023-11-22
|
||||
### Added
|
||||
|
||||
@@ -27,9 +27,15 @@ public class FFmpegCapabilities : IFFmpegCapabilities
|
||||
|
||||
public bool HasHardwareAcceleration(HardwareAccelerationMode hardwareAccelerationMode)
|
||||
{
|
||||
// AMF isn't a "hwaccel" in ffmpeg, so check for presence of encoders
|
||||
if (hardwareAccelerationMode is HardwareAccelerationMode.Amf)
|
||||
{
|
||||
return _ffmpegEncoders.Any(
|
||||
e => e.EndsWith($"_{FFmpegKnownHardwareAcceleration.Amf.Name}", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
Option<FFmpegKnownHardwareAcceleration> maybeAccelToCheck = hardwareAccelerationMode switch
|
||||
{
|
||||
HardwareAccelerationMode.Amf => FFmpegKnownHardwareAcceleration.Amf,
|
||||
HardwareAccelerationMode.Nvenc => FFmpegKnownHardwareAcceleration.Cuda,
|
||||
HardwareAccelerationMode.Qsv => FFmpegKnownHardwareAcceleration.Qsv,
|
||||
HardwareAccelerationMode.Vaapi => FFmpegKnownHardwareAcceleration.Vaapi,
|
||||
|
||||
@@ -9,5 +9,11 @@ public record FFmpegKnownEncoder
|
||||
this.Name = Name;
|
||||
}
|
||||
|
||||
public static IList<string> AllEncoders => Array.Empty<string>();
|
||||
// only list the encoders that we actually check for
|
||||
public static IList<string> AllEncoders =>
|
||||
new[]
|
||||
{
|
||||
"h264_amf",
|
||||
"hevc_amf"
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user