package engine import ( "context" "fmt" "strings" "github.com/torrentclaw/unarr/internal/library/mediainfo" ) // StreamProbe summarises the codec / container shape of a file as it relates // to the WebRTC streaming pipeline. It tells the transcoder whether bytes can // be streamed as-is, just remuxed to fragmented MP4, or fully transcoded. type StreamProbe struct { // VideoCodec lowercased — e.g. "h264", "hevc", "av1", "vp9", "mpeg4". VideoCodec string // AudioCodec lowercased — e.g. "aac", "ac3", "dts", "eac3", "opus". AudioCodec string // Width / Height of the primary video stream. Width int Height int // BitDepth — 8, 10 or 12. 0 if unknown. BitDepth int // HDR signalling string ("HDR10" / "DV" / "HLG" / etc, or "" for SDR). HDR string // DurationSec is the file length, used to sanity-check seek targets. DurationSec float64 // Container is the file extension lowercased (".mp4", ".mkv", ".avi"). Container string } // TranscodeAction tells the streaming pipeline how to feed the file to // the browser