PictureData

Struct PictureData 

Source
pub struct PictureData {
Show 27 fields pub pic_order_cnt_type: u8, pub top_field_order_cnt: i32, pub bottom_field_order_cnt: i32, pub pic_order_cnt: i32, pub pic_order_cnt_msb: i32, pub pic_order_cnt_lsb: i32, pub delta_pic_order_cnt_bottom: i32, pub delta_pic_order_cnt0: i32, pub delta_pic_order_cnt1: i32, pub pic_num: i32, pub long_term_pic_num: u32, pub frame_num: u32, pub frame_num_offset: u32, pub frame_num_wrap: i32, pub long_term_frame_idx: u32, pub coded_resolution: Resolution, pub display_resolution: Resolution, pub type_: SliceType, pub nal_ref_idc: u8, pub is_idr: IsIdr, pub ref_pic_list_modification_flag_l0: i32, pub abs_diff_pic_num_minus1: i32, pub has_mmco_5: bool, pub nonexisting: bool, pub field: Field, pub ref_pic_marking: RefPicMarking, pub timestamp: u64, /* private fields */
}

Fields§

§pic_order_cnt_type: u8§top_field_order_cnt: i32§bottom_field_order_cnt: i32§pic_order_cnt: i32§pic_order_cnt_msb: i32§pic_order_cnt_lsb: i32§delta_pic_order_cnt_bottom: i32§delta_pic_order_cnt0: i32§delta_pic_order_cnt1: i32§pic_num: i32§long_term_pic_num: u32§frame_num: u32§frame_num_offset: u32§frame_num_wrap: i32§long_term_frame_idx: u32§coded_resolution: Resolution§display_resolution: Resolution§type_: SliceType§nal_ref_idc: u8§is_idr: IsIdr§ref_pic_list_modification_flag_l0: i32§abs_diff_pic_num_minus1: i32§has_mmco_5: bool§nonexisting: bool§field: Field§ref_pic_marking: RefPicMarking§timestamp: u64

Implementations§

Source§

impl PictureData

Source

pub fn new_non_existing(frame_num: u32, timestamp: u64) -> Self

Source

pub fn new_from_slice( slice: &Slice<'_>, sps: &Sps, timestamp: u64, first_field: Option<&RcPictureData>, ) -> Self

Create a new picture from a slice, sps, and timestamp.

first_field is set if this picture is the second field of a frame.

Source

pub fn is_ref(&self) -> bool

Whether the current picture is a reference, either ShortTerm or LongTerm.

Source

pub fn is_second_field(&self) -> bool

Whether this picture is a second field.

Source

pub fn field_rank(&self) -> &FieldRank

Returns the field rank of this picture, including a reference to its other field.

Source

pub fn reference(&self) -> &Reference

Returns a reference to the picture’s Reference

Source

pub fn set_reference( &mut self, reference: Reference, apply_to_other_field: bool, )

Mark the picture as a reference picture.

Source

pub fn other_field(&self) -> Option<Rc<RefCell<PictureData>>>

Get a reference to the picture’s other field, if there is any and its reference is still valid.

Source

pub fn is_second_field_of_complementary_ref_pair(&self) -> bool

Whether the current picture is the second field of a complementary ref pair.

Source

pub fn pic_num_f(&self, max_pic_num: i32) -> i32

Source

pub fn long_term_pic_num_f( &self, max_long_term_frame_idx: MaxLongTermFrameIdx, ) -> u32

Source

pub fn into_rc(self) -> RcPictureData

Consume this picture and return a Rc’d version.

If the picture was a second field, adjust the field of the first field to point to this one.

Source

pub fn split_frame(self) -> (RcPictureData, RcPictureData)

Split a frame into two complementary fields that reference one another.

Trait Implementations§

Source§

impl Debug for PictureData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PictureData

Source§

fn default() -> PictureData

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.