resolve

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RankStreams

func RankStreams(ctx context.Context, cfg app.ResolverConfig, streams []*media.Stream) (*media.Stream, error)

RankStreams probes multiple streams concurrently and returns the one with the highest bandwidth. Failed probes are logged and skipped. Returns an error only if ALL streams fail probing.

func Resolve

func Resolve(ctx context.Context, cfg app.ResolverConfig, stream *media.Stream) (*media.Stream, error)

Resolve determines the final URL and content type for a stream. The stream's Headers are propagated to HLS resolution and ffprobe calls.

Types

type StreamDetail

type StreamDetail struct {
	URL     string
	BitRate int64
}

StreamDetail holds a stream URL and its probed bit rate.

func ListStreams

func ListStreams(ctx context.Context, cfg app.ResolverConfig, streams []*media.Stream) []StreamDetail

ListStreams expands HLS variants and probes each stream, returning details for display. Failures are logged and skipped.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL