1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! Source registry shim — `oxideav_core::SourceRegistry` plus the
//! built-in `file://`, `mem://`, `data:`, and `concat:` drivers 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 drivers 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 bundled drivers, matching the
//! historical surface.
//!
//! ```no_run
//! let reg = oxideav_source::with_defaults();
//! let _input = reg.open("/tmp/video.mp4").unwrap();
//! ```
//!
//! ## Schemes
//!
//! - **`file://<path>`** and bare paths — local filesystem. Default
//! opener is unscoped; install a [`FileScope`] via
//! [`FileScope::register_into`] to restrict by directory allow-list.
//! - **`mem://<id>`** — process-global in-memory buffer; register a
//! payload with [`mem::put`].
//! - **`data:[<mediatype>][;base64],<bytes>`** — RFC 2397 inline byte
//! literals; payload is decoded directly from the URI with no
//! filesystem access.
//! - **`concat:<a>|<b>|…`** — concatenate several `file://` segments into
//! one seekable byte stream (de-facto `concat:` shape; no on-wire
//! spec).
//! - **`slice:<offset>+<length>!<inner-uri>`** — URI-level windowed view
//! over an inner `file://` / `mem://` / `data:` / `slice:` source.
//! Pipelines can address a byte-range sub-stream without first
//! materialising the inner source.
pub use ;
pub use ;
pub use open_concat;
pub use ;
pub use open_file;
pub use open_mem;
pub use ;
pub use open_slice;
pub use ;
/// Build a [`SourceRegistry`] pre-populated with the built-in `file`,
/// `mem`, `data`, `concat`, and `slice` drivers. Bare paths (without a
/// scheme) dispatch to the `file` driver via the registry's fall-back
/// behaviour.
/// Install the bundled source drivers (`file://`, bare paths, `mem://`,
/// `data:`, `concat:`, `slice:`) into the given runtime context.
/// Idempotent — replacing any prior registration of those schemes.
register!;