Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RankStreams ¶
RankStreams probes every candidate in parallel and returns the highest- bandwidth playable one. A stream that probes cleanly but carries no castable video+audio, or is too short to be anything but a spliced-in ad, is dropped hard so it can't win when the real sources are unreachable. A stream whose probe fails (403/timeout/reset) is kept at zero bandwidth as a last resort, since the puller reconnects differently and may still succeed. If every candidate is a decoy, ranking fails cleanly.
Types ¶
type Config ¶
type Config struct {
HLSTimeout time.Duration `yaml:"hls_timeout" validate:"required"`
FFprobePath string `yaml:"ffprobe_path" validate:"required"`
ProbeTimeout time.Duration `yaml:"probe_timeout" validate:"required"`
ProbeMaxConcurrency int `yaml:"probe_max_concurrency" validate:"required,min=1"`
// MaxHeight is the tallest video the user wants cast: source selection
// prefers the largest HLS variant no taller than this, and the encoder
// scales its output down to it. Set it to your renderer's native height
// (e.g. 2160 for a 4K TV). Required, so it is always an explicit ceiling.
MaxHeight int `yaml:"max_height" validate:"required,min=1"`
}
type StreamDetail ¶
StreamDetail holds a stream URL and its probed bit rate, for display.
func ListStreams ¶
ListStreams expands HLS variants and probes each, returning details for display. Failures are logged and skipped.