ffmpeg-the-third 5.0.0+ffmpeg-8.1

Safe FFmpeg wrapper (FFmpeg 5+ compatible fork of the ffmpeg crate)
Documentation
pub use ffmpeg_sys_the_third as sys;
pub use ffmpeg_sys_the_third as ffi;

pub mod util;
pub use crate::util::channel_layout::{
    self, Channel, ChannelCustom, ChannelLayout, ChannelLayoutIter, ChannelLayoutMask, ChannelOrder,
};
pub use crate::util::{
    chroma, color, dictionary,
    dictionary::{Dictionary, DictionaryMut, DictionaryRef},
    error::{self, Error},
    frame::{self, Frame},
    log,
    mathematics::{self, rescale, Rescale, Rounding},
    media, option, picture,
    rational::{self, Rational},
    time,
};

#[cfg(feature = "ffmpeg_8_1")]
pub use crate::util::format::pixel::AlphaMode;

#[cfg(feature = "format")]
pub mod format;
#[cfg(feature = "format")]
pub use crate::format::{
    chapter::{Chapter, ChapterMut},
    stream::{Stream, StreamMut},
};

#[cfg(feature = "codec")]
pub mod codec;
#[cfg(feature = "codec")]
pub use crate::codec::{
    audio_service::AudioService,
    codec::Codec,
    decoder,
    discard::Discard,
    encoder,
    field_order::FieldOrder,
    packet::{self, Packet},
    subtitle::{self, Subtitle},
    threading,
};

#[cfg(feature = "device")]
pub mod device;

#[cfg(feature = "filter")]
pub mod filter;
#[cfg(feature = "filter")]
pub use crate::filter::Filter;

pub mod software;

mod as_ptr;
pub use as_ptr::{AsMutPtr, AsPtr};

pub(crate) mod iters;
pub(crate) mod macros;
pub(crate) mod utils;

#[cfg(not(feature = "format"))]
fn init_format() {}

#[cfg(feature = "device")]
fn init_device() {
    device::register_all();
}

#[cfg(not(feature = "device"))]
fn init_device() {}

#[cfg(not(feature = "filter"))]
fn init_filter() {}

pub fn init() -> Result<(), Error> {
    init_device();

    Ok(())
}