pub struct SliceHeader {
pub slice_type: SliceType,
pub frame_num: u16,
pub pic_parameter_set_id: u8,
pub field_pic_flag: bool,
pub bottom_field_flag: bool,
pub idr_pic_id: Option<u16>,
pub nal_ref_idc: u8,
}Expand description
Parsed fields from a slice header.
Fields§
§slice_type: SliceTypeSlice type.
frame_num: u16frame_num syntax element (wraps at MaxFrameNum).
pic_parameter_set_id: u8PPS id referenced by this slice.
field_pic_flag: boolfield_pic_flag: true when this slice belongs to a field (not a frame).
bottom_field_flag: boolbottom_field_flag: relevant only when field_pic_flag is true.
idr_pic_id: Option<u16>IDR picture id (only meaningful for IDR slices).
nal_ref_idc: u8nal_ref_idc from the enclosing NAL unit (0 = non-reference).
Implementations§
Source§impl SliceHeader
impl SliceHeader
Sourcepub fn is_reference(&self) -> bool
pub fn is_reference(&self) -> bool
Returns true if this slice is a reference slice (nal_ref_idc > 0).
Sourcepub fn is_keyframe(&self) -> bool
pub fn is_keyframe(&self) -> bool
Returns true if this is a key-frame (IDR or I-slice that is reference).
Trait Implementations§
Source§impl Clone for SliceHeader
impl Clone for SliceHeader
Source§fn clone(&self) -> SliceHeader
fn clone(&self) -> SliceHeader
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 moreAuto Trait Implementations§
impl Freeze for SliceHeader
impl RefUnwindSafe for SliceHeader
impl Send for SliceHeader
impl Sync for SliceHeader
impl Unpin for SliceHeader
impl UnsafeUnpin for SliceHeader
impl UnwindSafe for SliceHeader
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