codec/packet/flag: change flags API style

This commit is contained in:
meh 2015-05-28 18:14:18 +02:00
parent a0882e0422
commit c389f7a916
2 changed files with 13 additions and 8 deletions

9
src/codec/packet/flag.rs Normal file
View File

@ -0,0 +1,9 @@
use libc::c_int;
use ffi::*;
bitflags! {
flags Flags: c_int {
const KEY = AV_PKT_FLAG_KEY,
const CORRUPT = AV_PKT_FLAG_CORRUPT,
}
}

View File

@ -1,19 +1,15 @@
mod side_data;
pub mod side_data;
pub use self::side_data::SideData;
pub mod flag;
pub use self::flag::Flags;
use std::marker::PhantomData;
use std::mem;
use libc::c_int;
use ffi::*;
bitflags! {
flags Flags: c_int {
const FLAG_KEY = AV_PKT_FLAG_KEY,
const FLAG_CORRUPT = AV_PKT_FLAG_CORRUPT,
}
}
pub struct Packet {
pub val: AVPacket,
}