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
88
89
90
91
92
93
//! MP4 and ISOBMFF toolkit with low-level building blocks and thin ergonomic helpers.
//!
//! The default surface is synchronous. Enable the optional `async` feature when you want the
//! additive Tokio-based library companions for seekable readers and writers. That async surface is
//! intended for supported seekable Tokio I/O such as `tokio::fs::File` and seekable in-memory
//! cursors, and it supports normal multithreaded `tokio::spawn` use for independent-file library
//! work. The CLI remains on the synchronous path.
//!
//! Enable the optional `decrypt` feature when you want the additive decryption input and
//! progress types plus the feature-gated decryption surface. That landed surface covers the
//! Common Encryption family, PIFF compatibility, OMA DCF, Marlin IPMP, and the retained IAEC
//! protected-movie path while keeping the CLI on the synchronous path. Enable both `decrypt` and
//! `async` when you want the additive file-backed async decrypt companions on top of the existing
//! synchronous in-memory decrypt helpers.
//!
//! Enable the optional `mux` feature when you want the additive mux task surface plus the retained
//! low-level helpers underneath it. The mux surface exposes track-based `MuxRequest` helpers for
//! sync and async real MP4 assembly, path-first repeated track-spec parsing aligned with the
//! sync-only CLI, internal chunk and duration coordination on top of one mux event graph,
//! retained low-level staged payload-copy helpers, the public `mp4forge::mux::sample_reader`
//! module built on staged mux plans, the public `mp4forge::mux::inspect` module for path-first
//! direct-ingest inspection and export plus additive packet-focused reports, and the public
//! `mp4forge::mux::rewrite` module for rewriting extracted AVC/HEVC/VVC sample payloads back into
//! Annex B plus additive AV1, AAC ADTS, and MHAS elementary export helpers.
//! Those sample-reader helpers can also expose stable text or subtitle track identity when you
//! construct them with companion `MuxTrackConfig` values. The current path-first mux surface
//! accepts one repeated input path with optional selector suffixes such as `#video`, `#audio`,
//! `#text`, or `#track:ID`. Path-only MP4 inputs import every supported track from that source,
//! while the landed path-only raw auto-detection currently
//! covers MP4, supported AVI audio streams plus H.263/JPEG/PNG/MPEG-4 Part 2/H.264/AVC1 video streams, supported
//! MPEG-PS MPEG audio streams plus MPEG-4 Part 2/H.264/H.265/VVC video streams, supported
//! MPEG-TS MPEG audio streams plus AAC LATM/MHAS plus AC-3/E-AC-3/AC-4/DTS/TrueHD audio plus MPEG-2/AV1/AVS3/MPEG-4 Part 2/H.264/H.265/VVC
//! video streams, AAC ADTS, AAC LATM, MP3, AC-3, E-AC-3, AC-4, AMR, AMR-WB, QCP voice audio, DTS
//! core audio, Dolby TrueHD, leading-sync MHAS MPEG-H, IAMF, H.263 elementary video, MPEG-2
//! elementary video, MPEG-4 Part 2 elementary video, H.264 Annex B, H.265 Annex B, VVC Annex B,
//! raw AV1 OBU, raw AV1 Annex B, IVF-backed AV1, IVF-backed VP8, IVF-backed VP9, IVF-backed VP10, JPEG still
//! images, WAVE/AIFF/AIFC PCM, native FLAC, Ogg-backed FLAC, Ogg-backed Opus, Ogg-backed Vorbis,
//! Ogg-backed Speex, Ogg-backed Theora, and CAF-backed ALAC. Broader DTS-family sample-entry variants remain
//! supported through MP4 track import, and broader truthful demux-backed input paths continue to
//! land behind that same public shape.
extern crate self as mp4forge;
/// Tokio-based async I/O traits for the additive library-side async surface.
/// Bit-level reader and writer helpers used by the codec layer.
/// Box definitions and registry helpers.
/// Command-line routing and reusable command formatters.
/// Descriptor-driven binary codec primitives.
/// Feature-gated synchronous decryption types and helpers.
/// Resolved common-encryption metadata helpers built on typed box models.
/// Path-based box extraction helpers, including typed convenience reads.
/// Four-character box identifier support.
/// MP4 box header parsing and encoding helpers.
/// Feature-gated mux planning, real container assembly, and staged payload-copy helpers.
/// File-summary helpers built on the extraction and box layers.
pub
/// Path-based typed payload rewrite helpers built on the writer layer.
/// Fragmented top-level `sidx` analysis, planning, and rewrite helpers.
/// Stable field-order string rendering for descriptor-backed boxes.
/// Depth-first structure walking with path tracking and lazy payload access.
/// Box-writing helpers with header backfill support.
/// Four-character box identifier type.
pub use FourCc;
/// Common header-related exports used by downstream callers.
pub use ;