ff-sys 0.14.3

Low-level FFmpeg FFI bindings for Rust
Documentation
//! # ff-sys
//!
//! Low-level FFmpeg FFI bindings for Rust.
//!
//! This crate provides raw FFI bindings to FFmpeg libraries, generated by
//! [bindgen](https://github.com/rust-lang/rust-bindgen). It is intended as a
//! building block for higher-level safe wrappers.
//!
//! ## Safety
//!
//! All functions in this crate are unsafe. Higher-level safe wrappers are provided
//! by other ff-* crates:
//! - `ff-probe` - Media metadata extraction
//! - `ff-decode` - Decoding and seeking
//! - `ff-encode` - Encoding and export
//! - `ff-filter` - Filters and effects

// Suppress warnings from auto-generated bindgen code
#![allow(warnings)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(clippy::all)]
#![allow(clippy::pedantic)]
#![allow(clippy::useless_transmute)]
#![allow(clippy::unnecessary_cast)]
#![allow(clippy::transmute_int_to_bool)]

// On docs.rs (DOCS_RS=1) the build script emits an empty bindings.rs and sets
// cfg(docsrs).  We include the hand-written stubs instead so that all dependent
// crates compile without any changes of their own.
#[cfg(not(docsrs))]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

#[cfg(docsrs)]
include!("docsrs_stubs.rs");

// ── Wrapper modules (real bindings only) ─────────────────────────────────────
#[cfg(not(docsrs))]
pub mod avcodec;
#[cfg(not(docsrs))]
pub mod avformat;
#[cfg(not(docsrs))]
pub mod swresample;
#[cfg(not(docsrs))]
pub mod swscale;

// ── Sub-modules ───────────────────────────────────────────────────────────────
mod constants;
pub mod error_codes;
mod utils;

// ── Re-exports ────────────────────────────────────────────────────────────────
pub use constants::{AV_NOPTS_VALUE, AVFMT_TS_DISCONT, BUFFERSRC_FLAG_KEEP_REF};
pub use utils::{av_error_string, ensure_initialized};
// check_av_error! is re-exported at the crate root automatically via #[macro_export]