This commit is contained in:
Boki 2026-02-28 15:13:22 -05:00
parent bef61f841d
commit c3de5fdb63
107 changed files with 0 additions and 0 deletions

View file

@ -1,37 +0,0 @@
using Serilog;
namespace Poe2Trade.Screen;
public class FramePipelineService : IDisposable
{
public FramePipeline Pipeline { get; }
public IScreenCapture Backend { get; }
public FramePipelineService()
{
Backend = CreateBackend();
Pipeline = new FramePipeline(Backend);
}
private static IScreenCapture CreateBackend()
{
try
{
var dxgi = new DesktopDuplication();
Log.Information("Screen capture: DXGI Desktop Duplication");
return dxgi;
}
catch (Exception ex)
{
Log.Warning(ex, "DXGI unavailable, falling back to GDI");
}
Log.Information("Screen capture: GDI (CopyFromScreen)");
return new GdiCapture();
}
public void Dispose()
{
Pipeline.Dispose();
}
}