pub struct Packet<'a> {
pub pts: Option<i64>,
pub dts: Option<i64>,
pub duration: Option<i64>,
pub time_base: Option<Rational64>,
pub flags: PacketFlags,
pub pos: Option<usize>,
pub stream_index: Option<usize>,
/* private fields */
}Fields§
§pts: Option<i64>§dts: Option<i64>§duration: Option<i64>§time_base: Option<Rational64>§flags: PacketFlags§pos: Option<usize>§stream_index: Option<usize>Implementations§
Source§impl<'a> Packet<'a>
impl<'a> Packet<'a>
pub fn new(size: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn from_slice(data: &'a [u8]) -> Self
pub fn from_buffer(buffer: Arc<Buffer>) -> Self
pub fn into_owned(self) -> Packet<'static>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn data(&self) -> &[u8] ⓘ
pub fn data_mut(&mut self) -> Option<&mut [u8]>
pub fn truncate(&mut self, len: usize) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Packet<'a>
impl<'a> RefUnwindSafe for Packet<'a>
impl<'a> Send for Packet<'a>
impl<'a> Sync for Packet<'a>
impl<'a> Unpin for Packet<'a>
impl<'a> UnwindSafe for Packet<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more