mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-21 16:19:31 -06:00
FF-1224 - fixed vaapi issues
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ public class VaapiAdjustments : IEncoderAdjustment
|
||||
/// </summary>
|
||||
/// <param name="args">the ffmepg args</param>
|
||||
/// <returns>true if using VAAPI hardware encoding, otherwise false</returns>
|
||||
public static bool IsUsingVaapi(List<string> args)
|
||||
public static bool IsUsingVaapi(IEnumerable<string> args)
|
||||
=> args.Any(x => x == "hevc_vaapi" || x == "h264_vaapi");
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.VideoNodes.FfmpegBuilderNodes.Models;
|
||||
using System.Runtime.InteropServices;
|
||||
using FileFlows.VideoNodes.FfmpegBuilderNodes.EncoderAdjustments;
|
||||
using FileFlows.VideoNodes.Helpers;
|
||||
|
||||
namespace FileFlows.VideoNodes.FfmpegBuilderNodes;
|
||||
@@ -333,7 +334,8 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
|
||||
|
||||
var hw = hwOrig.Select(x => x.Replace("#FORMAT#", pixelFormat)).ToArray();
|
||||
|
||||
hw = EncoderAdjustments.EncoderAdjustment.Run(args.Logger, hw.ToList()).ToArray();
|
||||
if(VaapiAdjustments.IsUsingVaapi(hw))
|
||||
hw = new VaapiAdjustments().Run(args.Logger, hw.ToList()).ToArray();
|
||||
|
||||
args.AdditionalInfoRecorder("Testing", string.Join(" ", hw), new TimeSpan(0, 0, 10));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user