Skip to main content

Crate kithara_stream

Crate kithara_stream 

Source
Expand description

kithara-stream

Core streaming orchestration primitives for Kithara.

§Design goals

  • Reader: sync Read + Seek via direct Source calls
  • dl::Downloader: unified download orchestrator (owns HttpClient, dispatches FetchCmd with per-chunk writer callbacks)

Modules§

dl
Unified download orchestrator.

Structs§

ChunkPosition
Decoder-reported chunk position used to advance the timeline.
MediaInfo
Media format information.
SegmentDescriptor
Per-segment metadata exposed by segmented sources (HLS).
SourceSeekAnchor
Time-first seek anchor resolved by a segmented source.
Stream
Generic audio stream with sync Read + Seek.
StreamPending
Typed payload of an io::Error (kind ErrorKind::Interrupted) emitted by impl Read for Stream when the underlying source could not satisfy the read this call. Both SeekPending and NotReady/Retry surface as Interrupted so demuxers (notably Symphonia’s fragmented MP4 reader) treat the pause as a transient cooperative interruption and let kithara-decode::is_seek_pending_io classify the failure correctly — the previous WouldBlock mapping was treated as a hard “would block” by Symphonia’s seek path and corrupted the demuxer cursor on partial reads. Carries the PendingReason verbatim plus a snapshot of source/timeline state at the wrap site, so callers downcasting from io::Error recover both what stalled and why without having to instrument their own decoder.
StreamSeekPastEof
Typed error from Stream::seek for an absolute byte target that lands beyond the stream’s known length.
Timeline
Shared playback timeline used across stream layers.
VariantChangeError
Non-retriable cross-variant boundary signal — the typed payload of the io::Error produced by impl Read for Stream when the underlying source fenced on a variant change. Decoders that go through std::io::Read (Symphonia chain walker) downcast on this type to recover the precise classification without string-matching.

Enums§

AudioCodec
Audio codec type.
ContainerFormat
Container format type.
NotReadyCause
Concrete cause for a PendingReason::NotReady.
PendingReason
Reason a ReadOutcome::Pending was returned — i.e. why the source did not make progress this call. Each variant maps to a distinct caller action; there is no overlap and no string-matching required.
PrerollHint
ReadOutcome
Outcome of a Source::read_at call.
ReaderChunkSignal
Lightweight read-side signal fed into DecoderHooks::on_chunk.
ReaderSeekSignal
Lightweight seek-side signal fed into DecoderHooks::on_seek.
SourceError
Unified source error, surfaced by every Source impl.
SourcePhase
Phase of a source’s wait/read lifecycle.
StreamError
Errors produced by kithara-stream.
StreamReadError
Real error from Stream::try_read — the underlying source surfaced an I/O failure.
StreamReadOutcome
Outcome of a Stream::try_read call.

Traits§

DecoderHooks
Reader-side hooks invoked by the decoder layer’s HookedDecoder right before it forwards the inner decoder’s typed outcome to the caller.
SegmentLayout
Segment-table view exposed by segmented sources (HLS, fragmented file-mp4).
Source
Sync random-access source.
StreamType
Defines a stream type and how to create it.

Type Aliases§

SharedHooks
Shared, lockable hook handle. Used so that Source::take_reader_hooks can hand off Clone-able ownership and the hook implementation can hold &mut self state behind a single lock.
StreamResult
Result type for kithara-stream.