Expand description
Source registry shim — oxideav_core::SourceRegistry plus the
built-in file:// driver and a prefetching BufferedSource
wrapper.
SourceRegistry, the typed source traits (BytesSource,
PacketSource, FrameSource), and the SourceOutput enum
live in oxideav-core. This crate retains the concrete file://
driver and the BufferedSource helper that oxideav-http and the
player rely on; it also exposes a with_defaults free function
that pre-populates a registry with the file driver, matching the
historical surface.
let reg = oxideav_source::with_defaults();
let _input = reg.open("/tmp/video.mp4").unwrap();Structs§
- Buffered
Source - Buffered, prefetching wrapper around any
ReadSeek. - Source
Registry - Registry mapping URI schemes to opener functions. Each scheme picks
one of three opener kinds (bytes / packets / frames) at registration
time; callers see the choice via the
SourceOutputvariant returned fromopen.
Enums§
- Source
Output - What a
SourceRegistry::opencall returns. The variant is decided at driver-registration time, so callers can match on the shape and branch the pipeline accordingly.
Traits§
- Bytes
Source - A seekable byte stream (
Read + Seek + Send). Replaces the historicalBox<dyn ReadSeek>opener-return type with a name that mirrors the other source-shape traits in this module. Blanket-implemented for every type that satisfies the bounds, so existing readers (files,Cursor<Vec<u8>>, HTTP-over-Range adapters) work unchanged. - Frame
Source - A producer of already-decoded
Frames. - Packet
Source - A producer of already-demuxed
Packets. - Read
Seek - Convenience trait bundle for seekable readers.
Functions§
- open_
file - Open a local file as a
Box<dyn BytesSource>. Accepts: - register
- Install the
file://(and bare-path) source driver into the given runtime context. Idempotent — replacing a prior registration of thefilescheme. - with_
defaults - Build a
SourceRegistrypre-populated with the built-infiledriver. Bare paths (without a scheme) also dispatch to it via the registry’s fall-back behaviour.