SHA256
Add Force Software Encoder Feature
This commit is contained in:
5 files changed
+33
-10
No files matched your search
@@ -68,6 +68,9 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
||||
|
||||
/// <summary>GOP(Group of Pictures) 크기 (초). 키프레임 간격을 의미합니다.</summary>
|
||||
public double GopSize;
|
||||
|
||||
/// <summary>소프트웨어 CPU 인코더를 강제 사용할지 여부.</summary>
|
||||
public bool ForceSoftware;
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────────────────────────
|
||||
@@ -214,7 +217,7 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
||||
/// </summary>
|
||||
private string[] GetEncoderCandidates()
|
||||
{
|
||||
return GPUUtil.GetPrioritizedEncoderCandidates(_settings.Codec).ToArray();
|
||||
return GPUUtil.GetPrioritizedEncoderCandidates(_settings.Codec, _settings.ForceSoftware).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+9
-2
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using ADOFAIRenderer.Util.FFmpeg;
|
||||
using MelonLoader;
|
||||
@@ -130,12 +131,18 @@ namespace ADOFAIRenderer.Util
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<string> GetPrioritizedEncoderCandidates(Codec codec)
|
||||
public static List<string> GetPrioritizedEncoderCandidates(Codec codec, bool forceSoftware = false)
|
||||
{
|
||||
if (!CodecMap.TryGetValue(codec, out var list)) return new List<string>();
|
||||
|
||||
var vendor = GetActiveGPUVendor();
|
||||
var prioritized = new List<string>();
|
||||
if (forceSoftware)
|
||||
{
|
||||
prioritized.AddRange(from item in list where item.Item1 == GPUVendor.Unknown select item.Item2);
|
||||
return prioritized;
|
||||
}
|
||||
|
||||
var vendor = GetActiveGPUVendor();
|
||||
var others = new List<string>();
|
||||
|
||||
foreach (var item in list)
|
||||
|
||||
Reference in new issue
Block a user