Skip to main content

kithara_stream/
lib.rs

1//! `kithara-stream`
2//!
3//! Core streaming orchestration primitives for Kithara.
4//!
5//! ## Design goals
6//! - `Reader`: sync `Read + Seek` via direct Source calls
7//! - `dl::Downloader`: unified download orchestrator (owns `HttpClient`,
8//!   dispatches `FetchCmd` with per-chunk writer callbacks)
9
10#![forbid(unsafe_code)]
11
12pub mod dl;
13mod error;
14mod hooks;
15mod media;
16mod preroll;
17mod source;
18mod stream;
19mod timeline;
20
21#[cfg(any(test, feature = "mock"))]
22pub mod mock;
23
24pub use error::{SourceError, StreamError, StreamResult};
25pub use hooks::{DecoderHooks, ReaderChunkSignal, ReaderSeekSignal, SharedHooks};
26pub use media::{AudioCodec, ContainerFormat, MediaInfo};
27pub use preroll::PrerollHint;
28pub use source::{
29    NotReadyCause, PendingReason, ReadOutcome, SegmentDescriptor, SegmentLayout, Source,
30    SourcePhase, SourceSeekAnchor,
31};
32pub use stream::{
33    Stream, StreamPending, StreamReadError, StreamReadOutcome, StreamSeekPastEof, StreamType,
34    VariantChangeError,
35};
36pub use timeline::{ChunkPosition, Timeline};