SHA256
Refactor GetOutputExtension
This commit is contained in:
2 files changed
+5
-6
No files matched your search
@@ -384,7 +384,7 @@ namespace ADOFAIRenderer.Core
|
||||
|
||||
private IEnumerator SetupPlay()
|
||||
{
|
||||
if (Configuration.RenderAudio && GetOutputExtension() != ".mp4")
|
||||
if (Configuration.RenderAudio && GetOutputExtension(Configuration.Codec) != ".mp4")
|
||||
{
|
||||
Configuration.AudioSampleRate = 48000;
|
||||
}
|
||||
@@ -468,7 +468,7 @@ namespace ADOFAIRenderer.Core
|
||||
var videoFPS = Configuration.VideoFPS;
|
||||
|
||||
var selectedCodec = Configuration.Codec;
|
||||
var ext = GetOutputExtension();
|
||||
var ext = GetOutputExtension(selectedCodec);
|
||||
|
||||
var startTime = DateTime.Now;
|
||||
var fileName = startTime.ToString("yyyy-MM-dd HH-mm-ss") + ext;
|
||||
@@ -803,10 +803,9 @@ namespace ADOFAIRenderer.Core
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
private string GetOutputExtension()
|
||||
private string GetOutputExtension(Codec codec)
|
||||
{
|
||||
var selectedCodec = Configuration.Codec;
|
||||
return selectedCodec switch
|
||||
return codec switch
|
||||
{
|
||||
Codec.AV1 or Codec.VP9 => ".webm",
|
||||
Codec.VVC => ".mkv",
|
||||
|
||||
Reference in new issue
Block a user