1 | pub mod level; |
2 | pub use self::level::Level; |
3 | |
4 | pub mod flag; |
5 | pub use self::flag::Flags; |
6 | |
7 | use ffi::*; |
8 | use std::convert::TryInto; |
9 | |
10 | pub fn set_level(value: Level) { |
11 | unsafe { av_log_set_level(value.into()) } |
12 | } |
13 | |
14 | pub fn get_level() -> Result<Level, &'static str> { |
15 | unsafe { av_log_get_level().try_into() } |
16 | } |
17 | |
18 | pub fn set_flags(value: Flags) { |
19 | unsafe { av_log_set_flags(value.bits()) } |
20 | } |
21 | |
22 | pub fn get_flags() -> Flags { |
23 | unsafe { Flags::from_bits_truncate(bits:av_log_get_flags()) } |
24 | } |
25 | |