scuffle-h264
[!WARNING]
This crate is under active development and may not be stable.
A pure Rust implementation of the H.264 (header only) builder and parser.
This crate is designed to provide a simple and safe interface to build and parse H.264 headers.
See the changelog for a full release history.
Feature flags
docs— Enables changelog and documentation of feature flags
Examples
Parsing
use io;
use Bytes;
use ;
// A sample h264 bytestream to parse
// Parsing
let result = parse.unwrap;
// Do something with it!
// You can also parse an Sps from the Sps struct:
let sps = parse_with_emulation_prevention;
For more examples, check out the tests in the source code for the parse function.
Building
use Bytes;
use ;
let extended_config = AvccExtendedConfig ;
let config = AVCDecoderConfigurationRecord ;
// Creating a buffer to store the built bytestream
let mut built = Vecnew;
// Building
config.build.unwrap;
// Do something with it!
For more examples, check out the tests in the source code for the build function.
License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0