Added option to flush manually

This commit is contained in:
Thorbjoern
2025-06-30 10:30:13 +02:00
parent ffb0f52f25
commit 0359130f1d
4 changed files with 1189 additions and 1150 deletions
@@ -26,7 +26,7 @@ MonoBehaviour:
m_SupportsHDR: 0
m_HDRColorBufferPrecision: 0
m_MSAA: 4
m_RenderScale: 1
m_RenderScale: 1.6
m_UpscalingFilter: 0
m_FsrOverrideSharpness: 0
m_FsrSharpness: 0.92
File diff suppressed because it is too large Load Diff
@@ -83,11 +83,11 @@ namespace GhostSystem
RecordSample();
}
if (_frameBuffer.Count >= BatchSize || _flushTimer >= FlushInterval)
/*if (_frameBuffer.Count >= BatchSize || _flushTimer >= FlushInterval)
{
_flushTimer = 0f;
_ = FlushBatchAsync(); // Fire and forget
}
}*/
}
private void RecordSample()
@@ -105,6 +105,8 @@ namespace GhostSystem
var batch = new List<FrameModel>(_frameBuffer);
_frameBuffer.Clear();
Debug.Log("Flush Frame Buffer");
Debug.Log("Buffer: " + batch.Count);
try
{
@@ -153,6 +155,7 @@ namespace GhostSystem
sceneIdReady = false;
OnStopRecord?.Invoke();
Debug.Log($"Stop recording: {SceneId}");
Debug.Log("Framebuffer: " + _frameBuffer.Count + "Frames");
if (doorCount > 0 && TrackedObjects.Count >= doorCount)
{
@@ -161,6 +164,12 @@ namespace GhostSystem
doorCount = 0;
}
public void Flush()
{
_flushTimer = 0f;
_ = FlushBatchAsync(); // Fire and forget
}
}
}