scuffle_h265/
lib.rs

1//! A pure Rust implementation of the HEVC/H.265 decoder.
2//!
3//! This crate is designed to provide a simple and safe interface to decode HEVC/H.265 SPS NALUs.
4#![cfg_attr(feature = "docs", doc = "\n\nSee the [changelog][changelog] for a full release history.")]
5#![cfg_attr(feature = "docs", doc = "## Feature flags")]
6#![cfg_attr(feature = "docs", doc = document_features::document_features!())]
7//! ## Examples
8//!
9//! ```
10//! use scuffle_h265::SpsNALUnit;
11//!
12//! # fn test() -> std::io::Result<()> {
13//! # let data = b"\x42\x01\x01\x01\x40\x00\x00\x03\x00\x90\x00\x00\x03\x00\x00\x03\x00\x78\xa0\x03\xc0\x80\x11\x07\xcb\x96\xb4\xa4\x25\x92\xe3\x01\x6a\x02\x02\x02\x08\x00\x00\x03\x00\x08\x00\x00\x03\x00\xf3\x00\x2e\xf2\x88\x00\x02\x62\x5a\x00\x00\x13\x12\xd0\x20";
14//! # let reader = std::io::Cursor::new(data);
15//! let nalu = SpsNALUnit::parse(reader)?;
16//! println!("Parsed SPS NALU: {:?}", nalu);
17//! # Ok(())
18//! # }
19//! ```
20//!
21//! ## License
22//!
23//! This project is licensed under the MIT or Apache-2.0 license.
24//! You can choose between one of them if you use this work.
25//!
26//! `SPDX-License-Identifier: MIT OR Apache-2.0`
27#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
28#![cfg_attr(docsrs, feature(doc_auto_cfg))]
29#![deny(missing_docs)]
30#![deny(unsafe_code)]
31#![deny(unreachable_pub)]
32
33mod config;
34mod enums;
35mod nal_unit_header;
36mod rbsp_trailing_bits;
37mod sps;
38
39pub use config::{HEVCDecoderConfigurationRecord, NaluArray};
40pub use enums::*;
41pub use sps::*;
42
43/// Changelogs generated by [scuffle_changelog]
44#[cfg(feature = "docs")]
45#[scuffle_changelog::changelog]
46pub mod changelog {}