pub struct EncodedVideoPacket { /* private fields */ }Expand description
Demuxed video packet submitted to a VideoDecoderBackend.
Implementations§
Source§impl EncodedVideoPacket
Zero-copy range constructors and slice accessors for EncodedVideoPacket.
impl EncodedVideoPacket
Zero-copy range constructors and slice accessors for EncodedVideoPacket.
Creates a zero-copy packet referencing byte_start..byte_end inside shared source bytes.
§Arguments
&Mp4Sample- Sample metadata supplying index, timestamps, duration, and keyframe flag.u64- Active seek generation tag.Arc<[u8]>- Shared backing container byte buffer.usize- Inclusive start byte offset insidesource.usize- Exclusive end byte offset insidesource.
§Returns
Self- Zero-copy packet view.
Sourcepub fn from_bytes<B>(
sample_index: usize,
generation: u64,
timing: (i64, i64, u64),
is_keyframe: bool,
data: B,
) -> Self
pub fn from_bytes<B>( sample_index: usize, generation: u64, timing: (i64, i64, u64), is_keyframe: bool, data: B, ) -> Self
Creates a standalone packet wrapping data convertible into Arc<[u8]>.
§Arguments
usize- Zero-based sample index.u64- Seek/pipeline generation tag.(i64, i64, u64)- Timing tuple(dts_us, pts_us, duration_us).bool- Whether this packet is an intra keyframe.B- Encoded payload bytes convertible intoArc<[u8]>.
§Returns
Self- InitializedEncodedVideoPacket.
Sourcepub fn data_slice(&self) -> &[u8] ⓘ
pub fn data_slice(&self) -> &[u8] ⓘ
Source§impl EncodedVideoPacket
impl EncodedVideoPacket
pub fn get_sample_index(&self) -> usize
pub fn get_mut_sample_index(&mut self) -> &mut usize
pub fn set_sample_index(&mut self, val: usize) -> &mut Self
pub fn get_generation(&self) -> u64
pub fn get_mut_generation(&mut self) -> &mut u64
pub fn set_generation(&mut self, val: u64) -> &mut Self
pub fn get_dts_us(&self) -> i64
pub fn get_mut_dts_us(&mut self) -> &mut i64
pub fn set_dts_us(&mut self, val: i64) -> &mut Self
pub fn get_pts_us(&self) -> i64
pub fn get_mut_pts_us(&mut self) -> &mut i64
pub fn set_pts_us(&mut self, val: i64) -> &mut Self
pub fn get_duration_us(&self) -> u64
pub fn get_mut_duration_us(&mut self) -> &mut u64
pub fn set_duration_us(&mut self, val: u64) -> &mut Self
pub fn get_is_keyframe(&self) -> bool
pub fn get_mut_is_keyframe(&mut self) -> &mut bool
pub fn set_is_keyframe(&mut self, val: bool) -> &mut Self
pub fn get_byte_start(&self) -> usize
pub fn get_mut_byte_start(&mut self) -> &mut usize
pub fn set_byte_start(&mut self, val: usize) -> &mut Self
pub fn get_byte_end(&self) -> usize
pub fn get_mut_byte_end(&mut self) -> &mut usize
pub fn set_byte_end(&mut self, val: usize) -> &mut Self
Trait Implementations§
Source§impl Clone for EncodedVideoPacket
impl Clone for EncodedVideoPacket
Source§impl Debug for EncodedVideoPacket
impl Debug for EncodedVideoPacket
Source§impl Default for EncodedVideoPacket
impl Default for EncodedVideoPacket
impl Eq for EncodedVideoPacket
Reflexive equality marker for EncodedVideoPacket.
Auto Trait Implementations§
impl Forget for EncodedVideoPacket
impl Freeze for EncodedVideoPacket
impl Move for EncodedVideoPacket
impl RefUnwindSafe for EncodedVideoPacket
impl Send for EncodedVideoPacket
impl Sync for EncodedVideoPacket
impl Unpin for EncodedVideoPacket
impl UnsafeUnpin for EncodedVideoPacket
impl UnwindSafe for EncodedVideoPacket
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