oa::video::NalUnit

Borrowed H.264 NAL payload and decoded header fields. The payload starts at the NAL header byte and aliases the input Annex-B buffer. It does not include the three- or four-byte start code.

StRust public API

Declaration

pub struct NalUnit<'a> { /* private fields */ }
Public Rust declaration.

Public Methods

pub const fn nal_unit_type(self) -> u8
pub const fn reference_idc(self) -> u8
pub const fn payload(self) -> &'a [u8] ⓘ
pub const fn start_code_offset(self) -> Option<usize>
pub const fn start_code_len(self) -> usize
fn clone(&self) -> NalUnit<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn eq(&self, other: &NalUnit<'a>) -> bool

Associated Functions

pub fn from_h264_payload(payload: &'a [u8]) -> Result<Self>

Public Method Documentation

pub const fn nal_unit_type( self ) -> u8
No public source comment is attached to this declaration.
pub const fn reference_idc( self ) -> u8
No public source comment is attached to this declaration.
pub const fn payload( self ) -> &'a [u8] ⓘ
No public source comment is attached to this declaration.
pub const fn start_code_offset( self ) -> Option<usize>
No public source comment is attached to this declaration.
pub const fn start_code_len( self ) -> usize
No public source comment is attached to this declaration.
fn clone( &self ) -> NalUnit<'a>
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn eq( &self, other: &NalUnit<'a> ) -> bool
No public source comment is attached to this declaration.
pub fn from_h264_payload( payload: &'a [u8] ) -> Result<Self>
No public source comment is attached to this declaration.