diff --git a/sys/Cargo.toml b/sys/Cargo.toml index bf67fd4..2ea7d27 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -1,7 +1,18 @@ [package] -name = "ffmpeg-sys" +name = "ffmpeg-sys" version = "2.6.2-1" + authors = ["meh. "] license = "WTFPL" + description = "FFI bindings to FFmpeg" -repository = "https://github.com/meh/rust-ffmpeg-sys" +repository = "https://github.com/meh/rust-ffmpeg-sys" + +[features] +default = ["avcodec", "avdevice", "avformat", "postproc", "swscale"] + +avcodec = [] +avdevice = ["avformat"] +avformat = ["avcodec"] +postproc = [] +swscale = [] diff --git a/sys/src/lib.rs b/sys/src/lib.rs index 6eb9cb0..e65bd5a 100644 --- a/sys/src/lib.rs +++ b/sys/src/lib.rs @@ -7,17 +7,27 @@ extern crate libc; mod avutil; pub use avutil::*; +#[cfg(feature = "avcodec")] mod avcodec; +#[cfg(feature = "avcodec")] pub use avcodec::*; +#[cfg(feature = "avdevice")] mod avdevice; +#[cfg(feature = "avdevice")] pub use avdevice::*; +#[cfg(feature = "avformat")] mod avformat; +#[cfg(feature = "avformat")] pub use avformat::*; +#[cfg(feature = "swscale")] mod swscale; +#[cfg(feature = "swscale")] pub use swscale::*; +#[cfg(feature = "postproc")] mod postproc; +#[cfg(feature = "postproc")] pub use postproc::*;