codec: add base
This commit is contained in:
parent
2ff14a2043
commit
308e36ee48
22
src/codec/mod.rs
Normal file
22
src/codec/mod.rs
Normal file
@ -0,0 +1,22 @@
|
||||
use std::ffi::CStr;
|
||||
use std::str::from_utf8_unchecked;
|
||||
|
||||
use ffi::*;
|
||||
|
||||
pub fn version() -> u32 {
|
||||
unsafe {
|
||||
avcodec_version()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn configuration() -> &'static str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr(avcodec_configuration()).to_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn license() -> &'static str {
|
||||
unsafe {
|
||||
from_utf8_unchecked(CStr::from_ptr(avcodec_license()).to_bytes())
|
||||
}
|
||||
}
|
@ -13,3 +13,5 @@ pub use util::color_space::ColorSpace;
|
||||
pub use util::color_range::ColorRange;
|
||||
pub use util::media;
|
||||
pub use util::frame::{self, Frame};
|
||||
|
||||
pub mod codec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user