using System.Diagnostics; using System.IO; namespace ytLive.Services.Encoder; /// /// Seam around a spawned subprocess (the encoder's ffmpeg and the encoder probe). /// Exposes the redirected stdin (binary frames), stdout (probe listing) and stderr /// (progress lines) plus exit control, so the encoder logic never touches /// System.Diagnostics.Process directly and tests can fake the whole thing. /// public interface IEncoderProcess : IDisposable { void Start(ProcessStartInfo startInfo); /// Raw binary stdin — the encoder writes BGRA frames here. Stream StandardInput { get; } TextReader StandardOutput { get; } TextReader StandardError { get; } bool HasExited { get; } int ExitCode { get; } void Kill(); Task WaitForExitAsync(CancellationToken cancellationToken = default); }