Skip to main content

mpeg_ps/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![warn(missing_docs)]
5// Runnable examples, embedded so they render on docs.rs and stay in sync with
6// the actual `examples/*.rs` files (shown, not compiled).
7#![doc = "\n## Runnable examples\n"]
8#![doc = "Run with `cargo run -p mpeg-ps --example <name>`.\n"]
9#![doc = "\n### `parse_pack_header`\n\n```rust,ignore"]
10#![doc = include_str!("../examples/parse_pack_header.rs")]
11#![doc = "```\n\n### `walk_ps`\n\n```rust,ignore"]
12#![doc = include_str!("../examples/walk_ps.rs")]
13#![doc = "```"]
14
15extern crate alloc;
16
17mod error;
18mod pack_header;
19pub mod program_stream;
20pub mod program_stream_map;
21mod scr;
22mod system_header;
23
24pub use error::{Error, Result};
25pub use pack_header::PackHeader;
26pub use program_stream_map::{EsMapEntry, ProgramStreamMap};
27pub use scr::Scr;
28pub use system_header::{StdBufferBound, SystemHeader};
29
30/// The 3-byte `packet_start_code_prefix` that opens PES and PSM packets
31/// (`0x000001`) โ€” the one definition lives in `mpeg-pes` (#1141).
32pub use mpeg_pes::PACKET_START_CODE_PREFIX;
33
34/// `MPEG_program_end_code` โ€” `0x000001B9`, terminates the program stream.
35pub const PROGRAM_END_CODE: u32 = 0x0000_01B9;