From 04329eb85cc24f44280ccea505304ea931c75156 Mon Sep 17 00:00:00 2001 From: n00mkrad Date: Sun, 12 Sep 2021 14:23:35 +0200 Subject: [PATCH] Renamed stuff --- Code/Main/AutoEncode.cs | 6 +++--- Code/Main/{CreateVideo.cs => Export.cs} | 12 ++++++------ Code/Main/Interpolate.cs | 2 +- Code/Main/InterpolateSteps.cs | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename Code/Main/{CreateVideo.cs => Export.cs} (97%) diff --git a/Code/Main/AutoEncode.cs b/Code/Main/AutoEncode.cs index 18e162d..150fa96 100644 --- a/Code/Main/AutoEncode.cs +++ b/Code/Main/AutoEncode.cs @@ -132,7 +132,7 @@ namespace Flowframes.Main string lastFile = Path.GetFileName(interpFramesLines[frameLinesToEncode.Last()].Trim()); Logger.Log($"[AE] Encoding Chunk #{chunkNo} to using line {frameLinesToEncode.First()} ({firstFile}) through {frameLinesToEncode.Last()} ({lastFile}) - {unencodedFrameLines.Count} unencoded frames left in total", true, false, "ffmpeg"); - await CreateVideo.EncodeChunk(outpath, Interpolate.current.interpFolder, chunkNo, Interpolate.current.outMode, frameLinesToEncode.First(), frameLinesToEncode.Count); + await Export.EncodeChunk(outpath, Interpolate.current.interpFolder, chunkNo, Interpolate.current.outMode, frameLinesToEncode.First(), frameLinesToEncode.Count); if (Interpolate.canceled) return; @@ -151,7 +151,7 @@ namespace Flowframes.Main if(!imgSeq && Config.GetInt(Config.Key.autoEncBackupMode) > 0) { if (aiRunning && (currentMuxTask == null || (currentMuxTask != null && currentMuxTask.IsCompleted))) - currentMuxTask = Task.Run(() => CreateVideo.ChunksToVideos(Interpolate.current.tempFolder, videoChunksFolder, Interpolate.current.outPath, true)); + currentMuxTask = Task.Run(() => Export.ChunksToVideos(Interpolate.current.tempFolder, videoChunksFolder, Interpolate.current.outPath, true)); else Logger.Log($"[AE] Skipping backup because {(!aiRunning ? "this is the final chunk" : "previous mux task has not finished yet")}!", true, false, "ffmpeg"); } @@ -176,7 +176,7 @@ namespace Flowframes.Main if (imgSeq) return; - await CreateVideo.ChunksToVideos(Interpolate.current.tempFolder, videoChunksFolder, Interpolate.current.outPath); + await Export.ChunksToVideos(Interpolate.current.tempFolder, videoChunksFolder, Interpolate.current.outPath); } catch (Exception e) { diff --git a/Code/Main/CreateVideo.cs b/Code/Main/Export.cs similarity index 97% rename from Code/Main/CreateVideo.cs rename to Code/Main/Export.cs index ac1f5a8..43839b7 100644 --- a/Code/Main/CreateVideo.cs +++ b/Code/Main/Export.cs @@ -15,11 +15,11 @@ using Flowframes.Os; namespace Flowframes.Main { - class CreateVideo + class Export { - public static async Task Export(string path, string outFolder, I.OutMode mode, bool stepByStep) + public static async Task ExportFrames(string path, string outFolder, I.OutMode mode, bool stepByStep) { if(Config.GetInt(Config.Key.sceneChangeFillMode) == 1) { @@ -31,7 +31,7 @@ namespace Flowframes.Main { try { - await ExportFrames(path, stepByStep); + await ExportImageSequence(path, stepByStep); } catch (Exception e) { @@ -70,7 +70,7 @@ namespace Flowframes.Main } } - static async Task ExportFrames (string framesPath, bool stepByStep) + static async Task ExportImageSequence (string framesPath, bool stepByStep) { Program.mainForm.SetStatus("Copying output frames..."); string desiredFormat = Config.Get(Config.Key.imgSeqFormat).ToUpper(); @@ -78,10 +78,10 @@ namespace Flowframes.Main string max = Config.Get(Config.Key.maxFps); Fraction maxFps = max.Contains("/") ? new Fraction(max) : new Fraction(max.GetFloat()); bool fpsLimit = maxFps.GetFloat() > 0f && I.current.outFps.GetFloat() > maxFps.GetFloat(); - bool dontEncodeFullFpsVid = fpsLimit && Config.GetInt(Config.Key.maxFpsMode) == 0; + bool dontEncodeFullFpsSeq = fpsLimit && Config.GetInt(Config.Key.maxFpsMode) == 0; string framesFile = Path.Combine(framesPath.GetParentDir(), Paths.GetFrameOrderFilename(I.current.interpFactor)); - if (!dontEncodeFullFpsVid) + if (!dontEncodeFullFpsSeq) { string outputFolderPath = Path.Combine(I.current.outPath, await IoUtils.GetCurrentExportFilename(false, false)); IoUtils.RenameExistingFolder(outputFolderPath); diff --git a/Code/Main/Interpolate.cs b/Code/Main/Interpolate.cs index dd12671..049594a 100644 --- a/Code/Main/Interpolate.cs +++ b/Code/Main/Interpolate.cs @@ -62,7 +62,7 @@ namespace Flowframes Program.mainForm.SetProgress(100); if(!currentlyUsingAutoEnc) - await CreateVideo.Export(current.interpFolder, current.outPath, current.outMode, false); + await Export.ExportFrames(current.interpFolder, current.outPath, current.outMode, false); if (Config.GetBool(Config.Key.keepTempFolder)) await Task.Run(async () => { await FrameRename.Unrename(); }); diff --git a/Code/Main/InterpolateSteps.cs b/Code/Main/InterpolateSteps.cs index 47e0cf6..00d4ea7 100644 --- a/Code/Main/InterpolateSteps.cs +++ b/Code/Main/InterpolateSteps.cs @@ -133,7 +133,7 @@ namespace Flowframes.Main return; } - await CreateVideo.Export(current.interpFolder, current.outPath, current.outMode, true); + await Export.ExportFrames(current.interpFolder, current.outPath, current.outMode, true); } public static async Task Reset()