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
impl PictureData
pub fn new_non_existing(frame_num: u32, timestamp: u64) -> Self
Sourcepub fn new_from_slice(
slice: &Slice<'_>,
sps: &Sps,
timestamp: u64,
first_field: Option<&RcPictureData>,
) -> Self
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.
Sourcepub fn is_ref(&self) -> bool
pub fn is_ref(&self) -> bool
Whether the current picture is a reference, either ShortTerm or LongTerm.
Sourcepub fn is_second_field(&self) -> bool
pub fn is_second_field(&self) -> bool
Whether this picture is a second field.
Sourcepub fn field_rank(&self) -> &FieldRank
pub fn field_rank(&self) -> &FieldRank
Returns the field rank of this picture, including a reference to its other field.
Sourcepub fn set_reference(
&mut self,
reference: Reference,
apply_to_other_field: bool,
)
pub fn set_reference( &mut self, reference: Reference, apply_to_other_field: bool, )
Mark the picture as a reference picture.
Sourcepub fn other_field(&self) -> Option<Rc<RefCell<PictureData>>>
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.
Sourcepub fn is_second_field_of_complementary_ref_pair(&self) -> bool
pub fn is_second_field_of_complementary_ref_pair(&self) -> bool
Whether the current picture is the second field of a complementary ref pair.
pub fn pic_num_f(&self, max_pic_num: i32) -> i32
pub fn long_term_pic_num_f( &self, max_long_term_frame_idx: MaxLongTermFrameIdx, ) -> u32
Sourcepub fn into_rc(self) -> RcPictureData
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.
Sourcepub fn split_frame(self) -> (RcPictureData, RcPictureData)
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
impl Debug for PictureData
Source§impl Default for PictureData
impl Default for PictureData
Source§fn default() -> PictureData
fn default() -> PictureData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PictureData
impl !RefUnwindSafe for PictureData
impl !Send for PictureData
impl !Sync for PictureData
impl Unpin for PictureData
impl !UnwindSafe for PictureData
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