fix detection of amf hw accel on windows (#1519)
This commit is contained in:
+2
-1
@@ -8,7 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Fix playout builder crash with improperly configured pad filler preset
|
- Fix playout builder crash with improperly configured pad filler preset
|
||||||
- Properly validate filler preset mode pad to require `filler pad to nearest minute` value
|
- Properly validate filler preset mode pad to require `filler pad to nearest minute` value
|
||||||
- Fix bug where previously-synchronized collection tags would disappear
|
- Fix bug where previously-synchronized collection tags would disappear
|
||||||
- This bug affected Jellyfin, Emby and Plex collections
|
- This bug affected Jellyfin, Emby and Plex collections
|
||||||
|
- Fix detection of AMF hardware acceleration on Windows
|
||||||
|
|
||||||
## [0.8.3-beta] - 2023-11-22
|
## [0.8.3-beta] - 2023-11-22
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -27,9 +27,15 @@ public class FFmpegCapabilities : IFFmpegCapabilities
|
|||||||
|
|
||||||
public bool HasHardwareAcceleration(HardwareAccelerationMode hardwareAccelerationMode)
|
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
|
Option<FFmpegKnownHardwareAcceleration> maybeAccelToCheck = hardwareAccelerationMode switch
|
||||||
{
|
{
|
||||||
HardwareAccelerationMode.Amf => FFmpegKnownHardwareAcceleration.Amf,
|
|
||||||
HardwareAccelerationMode.Nvenc => FFmpegKnownHardwareAcceleration.Cuda,
|
HardwareAccelerationMode.Nvenc => FFmpegKnownHardwareAcceleration.Cuda,
|
||||||
HardwareAccelerationMode.Qsv => FFmpegKnownHardwareAcceleration.Qsv,
|
HardwareAccelerationMode.Qsv => FFmpegKnownHardwareAcceleration.Qsv,
|
||||||
HardwareAccelerationMode.Vaapi => FFmpegKnownHardwareAcceleration.Vaapi,
|
HardwareAccelerationMode.Vaapi => FFmpegKnownHardwareAcceleration.Vaapi,
|
||||||
|
|||||||
@@ -9,5 +9,11 @@ public record FFmpegKnownEncoder
|
|||||||
this.Name = Name;
|
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