vsd_mp4/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! This crate contains a mp4 parser ported from [shaka-player](https://github.com/shaka-project/shaka-player) project.
4//! Also, some optional features are added for parsing subtitles, `PSSH` and `SIDX` boxes.
5//!
6//! # Optional Features
7//!
8//! The following are a list of [Cargo features](https://doc.rust-lang.org/stable/cargo/reference/features.html#the-features-section) that can be
9//! enabled or disabled:
10//!
11//! - **pssh**: Enables support for parsing `PSSH` boxes.
12//! - **sidx**: Enables support for parsing `SIDX` boxes.
13//! - **text-ttml**: Enables support for extracting ttml subtitles.
14//! - **text-vtt**: Enables support for extracting vtt subtitles.
15
16mod error;
17mod parser;
18mod reader;
19
20#[cfg(feature = "pssh")]
21#[cfg_attr(docsrs, doc(cfg(feature = "pssh")))]
22pub mod pssh;
23
24#[cfg(feature = "sidx")]
25#[cfg_attr(docsrs, doc(cfg(feature = "sidx")))]
26pub mod sidx;
27
28#[cfg(any(feature = "text-ttml", feature = "text-vtt"))]
29#[cfg_attr(docsrs, doc(cfg(any(feature = "text-ttml", feature = "text-vtt"))))]
30pub mod text;
31
32pub use error::{Error, ErrorType};
33pub use parser::*;
34pub use reader::Reader;
35
36/// A `Result` alias where the `Err` case is `vsd_mp4::Error`.
37pub type Result<T> = std::result::Result<T, Error>;