Documentation
¶
Overview ¶
Package cast turns a resolved media stream into playback on a renderer.
It is device-agnostic and carries no device-type switch. Play resolves the source (renderer-independent) and hands core.Connect plus the resolved stream to the pipeline executor, which connects the renderer, computes a pure core.Plan from its advertised capabilities, and runs the stages the plan names. Every device concern lives either in the device adapter (internal/device) or is expressed as capability data the plan reads, so no device family is a distinct code path here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Play ¶ added in v1.0.0
Play resolves a stream and casts it to the configured device. Source resolution is renderer-independent and happens here; connecting the renderer is left to the pipeline, which times it against the delivery path: a non-self-fetching renderer connects concurrently with the pull, so slow discovery does not age a short-lived signed URL before the first byte. There is deliberately no device-type branch: adding a renderer family is a device adapter plus a set of capability values.
Types ¶
type Config ¶ added in v1.0.0
Config is the application-facing cast configuration. It is just core.Config embedded, so cfg.Device etc. read through and cfg.Config is the exact value the shared machinery wants. The subtitle-transcription knob (Whisper) now lives on core.Config itself, because the pure planner reads it to choose the subtitle axis and must reach it with no import of any renderer; there is no separate Whisper field here to shadow it.
type NetworkConfig ¶ added in v1.0.0
type NetworkConfig = core.NetworkConfig
Every config section's type is re-exported here so the application composes the cast surface through this one package (cast.NetworkConfig, cast.WhisperConfig, ...) instead of reaching into core or the subtitle building block. The definitions live in the packages that consume them. The device section is the exception: the composition root (internal/config) owns its own device config so it can bind a family's connect settings, so no device alias is re-exported here.
type TranscodeConfig ¶ added in v1.0.0
type TranscodeConfig = core.TranscodeConfig
Every config section's type is re-exported here so the application composes the cast surface through this one package (cast.NetworkConfig, cast.WhisperConfig, ...) instead of reaching into core or the subtitle building block. The definitions live in the packages that consume them. The device section is the exception: the composition root (internal/config) owns its own device config so it can bind a family's connect settings, so no device alias is re-exported here.
type WhisperConfig ¶ added in v1.8.0
Every config section's type is re-exported here so the application composes the cast surface through this one package (cast.NetworkConfig, cast.WhisperConfig, ...) instead of reaching into core or the subtitle building block. The definitions live in the packages that consume them. The device section is the exception: the composition root (internal/config) owns its own device config so it can bind a family's connect settings, so no device alias is re-exported here.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package core holds the device-agnostic decision layer and the machinery every cast shares: config, source resolution, device discovery/connect, the pure Plan (delivery/subtitle/output axes) with its copy-vs-encode resolvers, and the replay-server delivery.
|
Package core holds the device-agnostic decision layer and the machinery every cast shares: config, source resolution, device discovery/connect, the pure Plan (delivery/subtitle/output axes) with its copy-vs-encode resolvers, and the replay-server delivery. |
|
deliver
|
|
|
hlsserve
Package hlsserve serves a live HLS directory (playlist + rolling fMP4 segments) over local HTTP.
|
Package hlsserve serves a live HLS directory (playlist + rolling fMP4 segments) over local HTTP. |
|
replay
Package replay serves a single producer's stream over local HTTP, replaying it to every client from byte 0.
|
Package replay serves a single producer's stream over local HTTP, replaying it to every client from byte 0. |
|
spool
Package spool provides an append-only on-disk buffer with blocking tails.
|
Package spool provides an append-only on-disk buffer with blocking tails. |
|
Package ffmpeg runs ffmpeg processes with typed outputs and stderr forensics.
|
Package ffmpeg runs ffmpeg processes with typed outputs and stderr forensics. |
|
Package pipeline is the cast executor: it connects the renderer and runs exactly the stages a pure core.Plan names, over device-blind building blocks (pull, gate, transcode, serve).
|
Package pipeline is the cast executor: it connects the renderer and runs exactly the stages a pure core.Plan names, over device-blind building blocks (pull, gate, transcode, serve). |
|
Package subtitle holds configuration shared across the subtitle mechanisms, deliberately free of any mechanism implementation (and its cgo) so the pure planner in core can read it without importing the whisper transcriber.
|
Package subtitle holds configuration shared across the subtitle mechanisms, deliberately free of any mechanism implementation (and its cgo) so the pure planner in core can read it without importing the whisper transcriber. |
|
cue
Package cue is the subtitle presentation model.
|
Package cue is the subtitle presentation model. |
|
whisper
Package whisper runs the whisper.cpp Go bindings against a PCM audio stream to produce a stream of committed, timed words.
|
Package whisper runs the whisper.cpp Go bindings against a PCM audio stream to produce a stream of committed, timed words. |