format: add base
This commit is contained in:
parent
66901497ab
commit
a45c011fbc
22
src/format/mod.rs
Normal file
22
src/format/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 {
|
||||||
|
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())
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,8 @@ pub use util::color_range::ColorRange;
|
|||||||
pub use util::media;
|
pub use util::media;
|
||||||
pub use util::frame::{self, Frame};
|
pub use util::frame::{self, Frame};
|
||||||
|
|
||||||
|
pub mod format;
|
||||||
|
|
||||||
pub mod codec;
|
pub mod codec;
|
||||||
pub use codec::packet::{self, Packet};
|
pub use codec::packet::{self, Packet};
|
||||||
pub use codec::subtitle::Subtitle;
|
pub use codec::subtitle::Subtitle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user