vsd_mp4/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! This crate contains an MP4 parser ported from the [shaka-player](https://github.com/shaka-project/shaka-player) project.
4//!
5//! It also includes optional features for decryption, parsing subtitles, and processing `PSSH` and `SIDX` boxes.
6//!
7//! # Optional Features
8//!
9//! The following Cargo features can be enabled or disabled (all features are enabled by default):
10//!
11//! | Feature | Description |
12//! | :--- | :--- |
13//! | **`decrypt-cenc`** | Enables support for Common Encryption (`CENC`) scheme decryption. |
14//! | **`decrypt-hls`** | Enables support for HTTP Live Streaming (`HLS`) segment decryption. |
15//! | **`pssh`** | Enables support for parsing Protection System Specific Header (`PSSH`) boxes. |
16//! | **`sidx`** | Enables support for parsing Segment Index (`SIDX`) boxes. |
17//! | **`sub-ttml`** | Enables support for extracting subtitles from `STPP` boxes. |
18//! | **`sub-vtt`** | Enables support for extracting subtitles from `WVTT` boxes. |
19
20pub mod boxes;
21
22#[cfg(any(feature = "decrypt-cenc", feature = "decrypt-hls"))]
23#[cfg_attr(
24 docsrs,
25 doc(cfg(any(feature = "decrypt-cenc", feature = "decrypt-hls")))
26)]
27pub mod decrypt;
28
29#[cfg(feature = "pssh")]
30#[cfg_attr(docsrs, doc(cfg(feature = "pssh")))]
31pub mod pssh;
32
33#[cfg(any(feature = "sub-ttml", feature = "sub-vtt"))]
34#[cfg_attr(docsrs, doc(cfg(any(feature = "sub-ttml", feature = "sub-vtt"))))]
35pub mod sub;
36
37mod error;
38mod parser;
39mod reader;
40
41pub use error::{Error, Result};
42pub use parser::*;
43pub use reader::Reader;