Document Render Core And API

This commit is contained in:
copecone committed 2026-10-15 16:17:13 +09:00
1 parent 354c42fdd9
commit 8deb64fd4d
22 files changed
+1241 -27

No files matched your search

+12
View File
@@ -4,14 +4,22 @@ using FFmpeg.AutoGen;
namespace ADOFAIRenderer.Data;
/// <summary>
/// Video codec of the output. The encoder implementation (hardware or software) is chosen at run time from the
/// encoders available for the codec (VideoEncoder, GPUUtil.GetPrioritizedEncoders).
/// Values: <c>H264</c> (H.264 / AVC), <c>H265</c> (H.265 / HEVC), <c>VP9</c>, <c>AV1</c>, <c>VVC</c> (H.266).
/// The audio codec paired with each value is given by CodecUtil.AudioCodecMatch.
/// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Codec
{
H264, H265, VP9, AV1, VVC
}
/// <summary>Audio codec choice and supported sample rates per video codec.</summary>
internal static class CodecUtil
{
/// <summary>Audio codec encoded together with each video codec (AAC for H.264/H.265, Opus for the others).</summary>
public static readonly Dictionary<Codec, AVCodecID> AudioCodecMatch = new()
{
[Codec.H264] = AVCodecID.AV_CODEC_ID_AAC,
@@ -21,6 +29,10 @@ internal static class CodecUtil
[Codec.VVC] = AVCodecID.AV_CODEC_ID_OPUS
};
/// <summary>
/// Output sample rates (Hz) the mod allows per audio codec. RenderManager.SetupPlay replaces a configured rate that
/// is not in the list with 48000 Hz.
/// </summary>
public static readonly Dictionary<AVCodecID, List<int>> AvailableSampleRate = new()
{
[AVCodecID.AV_CODEC_ID_AAC] = new List<int> { 44100, 48000, 96000 },