pub struct Nalu<T> {
header: NaluHeader,
data: T,
size: usize,
offset: usize,
sc_offset: usize,
}
Fields
header: NaluHeader
data: T
The mapping that backs this NALU. Possibly shared with the other NALUs in the Access Unit.
size: usize
offset: usize
sc_offset: usize
Implementations
sourceimpl<T: AsRef<[u8]>> Nalu<T>
impl<T: AsRef<[u8]>> Nalu<T>
fn find_start_code(data: &mut Cursor<T>, offset: usize) -> Option<usize>
fn parse_header(data: &mut Cursor<T>) -> Result<NaluHeader>
sourcepub fn next(cursor: &mut Cursor<T>, bitstream: T) -> Result<Option<Nalu<T>>>
pub fn next(cursor: &mut Cursor<T>, bitstream: T) -> Result<Option<Nalu<T>>>
Find the next Annex B encoded NAL unit.
sourcepub fn header(&self) -> &NaluHeader
pub fn header(&self) -> &NaluHeader
Get a reference to the nalu’s header.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Nalu<T>where
T: RefUnwindSafe,
impl<T> Send for Nalu<T>where
T: Send,
impl<T> Sync for Nalu<T>where
T: Sync,
impl<T> Unpin for Nalu<T>where
T: Unpin,
impl<T> UnwindSafe for Nalu<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more