SHA256
Translate Codebase Comments and Log Messages to English
This commit is contained in:
23 files changed
+915
-921
No files matched your search
@@ -45,20 +45,20 @@ internal class FirstUpdateHook : MonoBehaviour
|
||||
var currentVersion = driverVer.Value.ToString("F2");
|
||||
|
||||
CommonWarningDialogUI.ShowDialog(
|
||||
"NVIDIA 그래픽 드라이버 업데이트 권장",
|
||||
$"현재 감지된 NVIDIA 그래픽 드라이버 버전: <b><color=#ff5555>{currentVersion}</color></b>\n\n하드웨어 가속(NVENC)을 사용하여 영상을 렌더링하려면 드라이버 버전 <b><color=#55ff55>610.00 이상</color></b>이 필요합니다.\n\n드라이버 버전이 낮으면 인코딩이 실패하거나 소프트웨어(CPU) 인코딩으로 대체되어 렌더링이 매우 느려집니다. 드라이버 업데이트를 진행해 주시기 바랍니다.",
|
||||
new DialogButton("드라이버 업데이트", () =>
|
||||
"NVIDIA Graphics Driver Update Recommended",
|
||||
$"Currently detected NVIDIA graphics driver version: <b><color=#ff5555>{currentVersion}</color></b>\n\nDriver version <b><color=#55ff55>610.00 or higher</color></b> is required to render video using hardware acceleration (NVENC).\n\nIf the driver version is lower, encoding may fail or fallback to software (CPU) encoding, significantly slowing down rendering. Please update your graphics driver.",
|
||||
new DialogButton("Update Driver", () =>
|
||||
{
|
||||
Application.OpenURL("https://www.nvidia.com/Download/index.aspx");
|
||||
Application.Quit();
|
||||
}, new Color(0.0f, 0.8f, 1.0f, 1.0f)),
|
||||
new DialogButton("기능 비활성화", () =>
|
||||
new DialogButton("Disable Feature", () =>
|
||||
{
|
||||
RenderMod.IsFeatureDisabled = true;
|
||||
}),
|
||||
new DialogButton("이번만 그냥 진행", () =>
|
||||
new DialogButton("Continue Anyway", () =>
|
||||
{
|
||||
// 아무 동작 안 함
|
||||
// ignored
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
+28
-28
@@ -40,10 +40,10 @@ internal static class RenderContext
|
||||
if (result.Success && Notification)
|
||||
{
|
||||
var fileString = !string.IsNullOrEmpty(RenderManager.Instance.CurrentOutPath) ?
|
||||
$"'{Path.GetFileName(RenderManager.Instance.CurrentOutPath)}'이(가)" : "동영상이";
|
||||
$"'{Path.GetFileName(RenderManager.Instance.CurrentOutPath)}'" : "Video";
|
||||
|
||||
var renderFolder = Path.GetDirectoryName(RenderManager.Instance.CurrentOutPath);
|
||||
OSNotification.Show("렌더링 완료!", $"{fileString} 성공적으로 저장되었습니다.", renderFolder);
|
||||
OSNotification.Show("Rendering Complete!", $"{fileString} saved successfully.", renderFolder);
|
||||
}
|
||||
};
|
||||
public static Action<RenderResult> OnComplete = OnCompleteDefault;
|
||||
@@ -178,7 +178,7 @@ internal class RenderManager : MonoBehaviour
|
||||
|
||||
if (_activeVideoFFmpeg != null)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Msg("게임 종료 또는 RenderManager 파괴 감지: FFmpeg 네이티브 인코더 리소스를 해제합니다.");
|
||||
Melon<RenderMod>.Logger.Msg("Game exit or RenderManager destruction detected: Disposing FFmpeg native encoder resources.");
|
||||
_activeVideoFFmpeg.Dispose();
|
||||
_activeVideoFFmpeg = null;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ internal class RenderManager : MonoBehaviour
|
||||
{
|
||||
if (_allVideoFFmpegInstances.Count > 0)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Msg($"게임 종료 감지: 생성된 모든 FFmpeg 인코더 인스턴스({_allVideoFFmpegInstances.Count}개)를 수거 및 해제합니다.");
|
||||
Melon<RenderMod>.Logger.Msg($"Game exit detected: Cleaning up and disposing all created FFmpeg encoder instances ({_allVideoFFmpegInstances.Count}).");
|
||||
foreach (var instance in _allVideoFFmpegInstances)
|
||||
{
|
||||
try
|
||||
@@ -196,7 +196,7 @@ internal class RenderManager : MonoBehaviour
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
_allVideoFFmpegInstances.Clear();
|
||||
@@ -278,18 +278,18 @@ internal class RenderManager : MonoBehaviour
|
||||
{
|
||||
if (!IsRendering) return;
|
||||
|
||||
// [렉으로 인한 프레임 렌더링 스킵 시 재시도 로직 (원본 모드 이식)]
|
||||
// [Retry logic when frame rendering is skipped due to lag (ported from original mod)]
|
||||
if (renderCheck && IsCapturing)
|
||||
{
|
||||
if (skipCount < MaxRenderRetry)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Warning($"[Render Skipped] Frame {frameCount} rendering missed. Retrying... (Attempt {skipCount + 1}/{MaxRenderRetry})");
|
||||
skipCount++;
|
||||
Time.timeScale = 0f; // 진행 시간 멈추기 (재시도)
|
||||
return; // 업데이트 진행하지 않고 대기
|
||||
Time.timeScale = 0f; // Pause progress time (retry)
|
||||
return; // Wait without advancing update
|
||||
}
|
||||
|
||||
// 60회 초과 시 최후의 블랙 프레임 삽입하여 전체 파이프라인 마비 방지
|
||||
// If retries exceed limit, supply a fallback black frame to prevent freezing the pipeline
|
||||
Melon<RenderMod>.Logger.Error($"[Render Skipped] Frame {frameCount} rendering failed after 60 retries. Supplying black frame.");
|
||||
|
||||
var currentFrame = frameCountForVideo++;
|
||||
@@ -318,11 +318,11 @@ internal class RenderManager : MonoBehaviour
|
||||
FrameAvailableEvent.Set();
|
||||
}
|
||||
|
||||
renderCheck = false; // 진행 허용
|
||||
renderCheck = false; // Allow progress
|
||||
}
|
||||
|
||||
skipCount = 0;
|
||||
renderCheck = true; // 다음 프레임 검사용으로 초기화
|
||||
renderCheck = true; // Reset for next frame check
|
||||
frameCount++;
|
||||
}
|
||||
|
||||
@@ -344,9 +344,9 @@ internal class RenderManager : MonoBehaviour
|
||||
{
|
||||
if (!IsCapturing || !texture) return;
|
||||
|
||||
renderCheck = false; // 이번 프레임 정상 렌더링 완료
|
||||
renderCheck = false; // Normal rendering complete for this frame
|
||||
|
||||
// [Backpressure Throttling (2번 작업)]
|
||||
// [Backpressure Throttling]
|
||||
isThrottling = false;
|
||||
|
||||
while (IsCapturing && IsRendering)
|
||||
@@ -458,11 +458,11 @@ internal class RenderManager : MonoBehaviour
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Error($"인코더 초기화 에러: {ex}");
|
||||
Melon<RenderMod>.Logger.Error($"Encoder initialization error: {ex}");
|
||||
CommonWarningDialogUI.ShowDialog(
|
||||
"인코더 오류",
|
||||
$"비디오 인코더를 초기화할 수 없습니다.\n오류: {ex.Message}",
|
||||
new DialogButton("확인", () =>
|
||||
"Encoder Error",
|
||||
$"Failed to initialize video encoder.\nError: {ex.Message}",
|
||||
new DialogButton("OK", () =>
|
||||
{
|
||||
ADOBase.loader.LoadSceneWithTransition(WipeDirection.StartsFromRight, "scnEditor");
|
||||
})
|
||||
@@ -676,7 +676,7 @@ internal class RenderManager : MonoBehaviour
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Error($"FFmpeg 렌더링 스레드 오류: {ex}");
|
||||
Melon<RenderMod>.Logger.Error($"FFmpeg rendering thread error: {ex}");
|
||||
videoFFmpeg.Dispose();
|
||||
lock (_allVideoFFmpegInstances)
|
||||
{
|
||||
@@ -720,22 +720,22 @@ internal class RenderManager : MonoBehaviour
|
||||
if (success) StartCoroutine(StopRenderCoroutine());
|
||||
else
|
||||
{
|
||||
Melon<RenderMod>.Logger.Error("렌더링이 실패했거나 취소되었습니다. 상태 및 리소스를 안전하게 청소합니다.");
|
||||
Melon<RenderMod>.Logger.Error("Rendering failed or was cancelled. Safely cleaning up state and resources.");
|
||||
|
||||
// 1. 렌더링 백그라운드 스레드가 큐에 유입된 잔여 프레임 처리를 마무리하고 종료될 때까지 대기
|
||||
// 1. Wait for render background thread to finish processing remaining queued frames and terminate
|
||||
if (RenderThread is { IsAlive: true })
|
||||
{
|
||||
RenderThread.Join(2000);
|
||||
}
|
||||
|
||||
// 2. 스레드 종료 보장 후, 안전하게 FFmpeg 네이티브 인코더 리소스 해제
|
||||
// 2. After ensuring thread termination, safely release FFmpeg native encoder resources
|
||||
if (_activeVideoFFmpeg != null)
|
||||
{
|
||||
_activeVideoFFmpeg.Dispose();
|
||||
_activeVideoFFmpeg = null;
|
||||
}
|
||||
|
||||
// 3. 메모리 누수 방지: 큐에 렌트된 임시 프레임 버퍼 풀 반환 및 클리어
|
||||
// 3. Memory leak prevention: Return rented temporary frame buffer pool in queue and clear
|
||||
lock (ImageQueue)
|
||||
{
|
||||
foreach (var kvp in ImageQueue.Values)
|
||||
@@ -754,14 +754,14 @@ internal class RenderManager : MonoBehaviour
|
||||
|
||||
_frameReader?.Dispose();
|
||||
|
||||
// 디버그 모니터 UI 정리
|
||||
// Clean up Debug Monitor UI
|
||||
if (_debugMonitorObj)
|
||||
{
|
||||
Destroy(_debugMonitorObj);
|
||||
_debugMonitorObj = null;
|
||||
}
|
||||
|
||||
// 4. 인게임 카메라 및 렌더링용 RTCam 상태 안전 원복
|
||||
// 4. Safely restore in-game camera and RTCam state for rendering
|
||||
if (scrCamera.instance)
|
||||
{
|
||||
scrCamera.instance.forceRTCam = false;
|
||||
@@ -771,24 +771,24 @@ internal class RenderManager : MonoBehaviour
|
||||
if (hook) Destroy(hook);
|
||||
}
|
||||
|
||||
// 5. 인게임 실패 방지 플래그 원상 복구
|
||||
// 5. Restore in-game no-fail flags
|
||||
if (scrController.instance)
|
||||
{
|
||||
scrController.instance.noFail = false;
|
||||
scrController.instance.noFailInfiniteMargin = false;
|
||||
}
|
||||
|
||||
// 6. 취소된 미완성 임시 동영상 파일 즉각 삭제
|
||||
// 6. Immediately delete cancelled incomplete temporary video file
|
||||
if (!string.IsNullOrEmpty(CurrentOutPath) && File.Exists(CurrentOutPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(CurrentOutPath);
|
||||
Melon<RenderMod>.Logger.Msg($"[File Cleanup] 미완성 동영상 삭제 완료: {CurrentOutPath}");
|
||||
Melon<RenderMod>.Logger.Msg($"[File Cleanup] Deleted incomplete video: {CurrentOutPath}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Error($"[File Cleanup] 임시 동영상 삭제 실패: {ex.Message}");
|
||||
Melon<RenderMod>.Logger.Error($"[File Cleanup] Failed to delete temporary video: {ex.Message}");
|
||||
}
|
||||
CurrentOutPath = null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user