pub struct QueuedPacket {
pub pts: i64,
pub dts: i64,
pub duration: u64,
pub stream_index: u32,
pub is_keyframe: bool,
pub data: Vec<u8>,
/* private fields */
}Expand description
A coded packet with timestamps for queue ordering.
Fields§
§pts: i64Presentation timestamp in timebase units.
dts: i64Decode timestamp in timebase units.
duration: u64Duration in timebase units.
stream_index: u32Stream index this packet belongs to.
is_keyframe: boolWhether this is a keyframe.
data: Vec<u8>Raw payload data.
Implementations§
Source§impl QueuedPacket
impl QueuedPacket
Sourcepub fn with_duration(self, duration: u64) -> Self
pub fn with_duration(self, duration: u64) -> Self
Set the duration.
Sourcepub fn with_stream_index(self, index: u32) -> Self
pub fn with_stream_index(self, index: u32) -> Self
Set the stream index.
Sourcepub fn with_keyframe(self, is_keyframe: bool) -> Self
pub fn with_keyframe(self, is_keyframe: bool) -> Self
Set the keyframe flag.
Trait Implementations§
Source§impl Clone for QueuedPacket
impl Clone for QueuedPacket
Source§fn clone(&self) -> QueuedPacket
fn clone(&self) -> QueuedPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueuedPacket
impl Debug for QueuedPacket
Source§impl PartialEq for QueuedPacket
impl PartialEq for QueuedPacket
impl Eq for QueuedPacket
Auto Trait Implementations§
impl Freeze for QueuedPacket
impl RefUnwindSafe for QueuedPacket
impl Send for QueuedPacket
impl Sync for QueuedPacket
impl Unpin for QueuedPacket
impl UnsafeUnpin for QueuedPacket
impl UnwindSafe for QueuedPacket
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