| 1 | #[macro_use ] |
| 2 | pub mod dictionary; |
| 3 | pub mod chroma; |
| 4 | pub mod color; |
| 5 | pub mod error; |
| 6 | pub mod format; |
| 7 | pub mod frame; |
| 8 | pub mod interrupt; |
| 9 | pub mod log; |
| 10 | pub mod mathematics; |
| 11 | pub mod media; |
| 12 | pub mod option; |
| 13 | pub mod picture; |
| 14 | pub mod range; |
| 15 | pub mod rational; |
| 16 | pub mod time; |
| 17 | |
| 18 | #[cfg_attr (feature = "ffmpeg_7_0" , path = "channel_layout.rs" )] |
| 19 | #[cfg_attr (not(feature = "ffmpeg_7_0" ), path = "legacy_channel_layout.rs" )] |
| 20 | pub mod channel_layout; |
| 21 | |
| 22 | use std::ffi::CStr; |
| 23 | use std::str::from_utf8_unchecked; |
| 24 | |
| 25 | use ffi::*; |
| 26 | |
| 27 | #[inline (always)] |
| 28 | pub fn version() -> u32 { |
| 29 | unsafe { avutil_version() } |
| 30 | } |
| 31 | |
| 32 | #[inline (always)] |
| 33 | pub fn configuration() -> &'static str { |
| 34 | unsafe { from_utf8_unchecked(CStr::from_ptr(avutil_configuration()).to_bytes()) } |
| 35 | } |
| 36 | |
| 37 | #[inline (always)] |
| 38 | pub fn license() -> &'static str { |
| 39 | unsafe { from_utf8_unchecked(CStr::from_ptr(avutil_license()).to_bytes()) } |
| 40 | } |
| 41 | |