format: add base

This commit is contained in:
meh
2015-05-12 03:53:19 +02:00
parent 66901497ab
commit a45c011fbc
2 changed files with 24 additions and 0 deletions

22
src/format/mod.rs Normal file
View File

@ -0,0 +1,22 @@
use std::ffi::CStr;
use std::str::from_utf8_unchecked;
use ffi::*;
pub fn version() -> u32 {
unsafe {
avformat_version()
}
}
pub fn configuration() -> &'static str {
unsafe {
from_utf8_unchecked(CStr::from_ptr(avformat_configuration()).to_bytes())
}
}
pub fn license() -> &'static str {
unsafe {
from_utf8_unchecked(CStr::from_ptr(avformat_license()).to_bytes())
}
}