namespace ytLive.Models;

public enum StreamStatus
{
    Offline,
    Connecting,
    Streaming,
    Error
}

public class StreamConfig
{
    public string Title { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
    public string StreamKey { get; set; } = string.Empty;
    public string IngestUrl { get; set; } = "rtmp://a.rtmp.youtube.com/live2";
    public bool IsLowLatency { get; set; } = true;
    public int TargetBitrate { get; set; } = 6000;
    public int TargetFps { get; set; } = 60;
    public string Resolution { get; set; } = "1920x1080";
}

public class StreamHealth
{
    public StreamStatus Status { get; set; }
    public double CurrentBitrate { get; set; }
    public int DroppedFrames { get; set; }
    public double FPS { get; set; }
    public TimeSpan StreamDuration { get; set; }
    public string? LastError { get; set; }

    // YouTube-specific
    public string? HealthStatus { get; set; }  // "good", "bad", "ok"
    public string? HealthMessage { get; set; }
}
