Dpb

Struct Dpb 

Source
pub struct Dpb<T> { /* private fields */ }

Implementations§

Source§

impl<T: Clone> Dpb<T>

Source

pub fn pictures(&self) -> impl Iterator<Item = Ref<'_, PictureData>>

Returns an iterator over the underlying H265 pictures stored in the DPB.

Source

pub fn pictures_mut(&mut self) -> impl Iterator<Item = RefMut<'_, PictureData>>

Returns a mutable iterator over the underlying H265 pictures stored in the DPB.

Source

pub fn len(&self) -> usize

Returns the length of the DPB.

Source

pub fn is_empty(&self) -> bool

Source

pub fn entries(&self) -> &Vec<DpbEntry<T>>

Get a reference to the whole DPB entries.

Source

pub fn set_max_num_pics(&mut self, max_num_pics: usize)

Set the dpb’s max num pics.

Source

pub fn max_num_pics(&self) -> usize

Get a reference to the dpb’s max num pics.

Source

pub fn mark_all_as_unused_for_ref(&mut self)

Mark all pictures in the DPB as unused for reference.

Source

pub fn find_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>

Finds a reference picture in the DPB using poc.

Source

pub fn find_ref_by_poc_masked(&self, poc: i32, mask: i32) -> Option<DpbEntry<T>>

Finds a reference picture in the DPB using poc and mask.

Source

pub fn find_short_term_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>

Finds a short term reference picture in the DPB using poc.

Source

pub fn drain(&mut self) -> Vec<DpbEntry<T>>

Drains the DPB by continuously invoking the bumping process.

Source

pub fn needs_bumping(&mut self, sps: &Sps) -> bool

Whether the DPB needs bumping. See C.5.2.2.

Source

pub fn bump(&mut self, flush: bool) -> Option<DpbEntry<T>>

See C.5.2.4 “Bumping process”.

Source

pub fn needs_additional_bumping(&mut self, sps: &Sps) -> bool

See C.5.2.3. Happens when we are done decoding the picture.

Source

pub fn clear(&mut self)

Clears the DPB, dropping all the pictures.

Source

pub fn remove_unused(&mut self)

Removes all pictures which are marked as “not needed for output” and “unused for reference”. See C.5.2.2

Source

pub fn store_picture( &mut self, picture: Rc<RefCell<PictureData>>, handle: T, ) -> Result<(), String>

Store a picture and its backend handle in the DPB.

Source

pub fn get_all_references(&self) -> Vec<DpbEntry<T>>

Returns all the references in the DPB.

Trait Implementations§

Source§

impl<T: Clone> Debug for Dpb<T>

Source§

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

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

impl<T: Clone> Default for Dpb<T>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<T> Freeze for Dpb<T>

§

impl<T> !RefUnwindSafe for Dpb<T>

§

impl<T> !Send for Dpb<T>

§

impl<T> !Sync for Dpb<T>

§

impl<T> Unpin for Dpb<T>
where T: Unpin,

§

impl<T> !UnwindSafe for Dpb<T>

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.