Trait cros_codecs::decoder::DecodedHandle
source · pub trait DecodedHandle {
type Descriptor;
// Required methods
fn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>;
fn timestamp(&self) -> u64;
fn coded_resolution(&self) -> Resolution;
fn display_resolution(&self) -> Resolution;
fn is_ready(&self) -> bool;
fn sync(&self) -> Result<()>;
fn resource(&self) -> Ref<'_, Self::Descriptor>;
}
Expand description
The handle type used by the decoder backend. The only requirement from implementors is that they give access to the underlying handle and that they can be (cheaply) cloned.
Required Associated Types§
sourcetype Descriptor
type Descriptor
Memory descriptor type - the type that provides the backend memory for the decoded frame.
()
is a special type meaning that the backend is responsible for allocating and managing
the memory itself.
Required Methods§
sourcefn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>
fn dyn_picture<'a>(&'a self) -> Box<dyn DynHandle + 'a>
Returns a reference to an object allowing a CPU mapping of the decoded surface.
sourcefn coded_resolution(&self) -> Resolution
fn coded_resolution(&self) -> Resolution
Returns the coded resolution at the time this handle was decoded.
sourcefn display_resolution(&self) -> Resolution
fn display_resolution(&self) -> Resolution
Returns the display resolution at the time this handle was decoded.