pub trait DecoderFormatNegotiator<'a> {
    // Required methods
    fn num_resources_total(&self) -> usize;
    fn coded_resolution(&self) -> Resolution;
}
Expand description

Trait for objects allowing to negotiate the output format of a decoder.

A decoder always has a valid output format set, but that format can change if the stream requests it. When this happens, the decoder stops accepting new input and a FormatChanged event is emitted, carrying a negotiator trait object that allows the client to acknowledge that the format change took place, and (in the future) negotiate its specifics.

When the object is dropped, the decoder can accept and process new input again.

Required Methods§

source

fn num_resources_total(&self) -> usize

Gets the number of output resources allocated by the backend.

source

fn coded_resolution(&self) -> Resolution

Returns the current coded resolution of the bitstream being processed. This may be None if we have not read the stream parameters yet.

Implementors§