pub struct Decoder<T: DecodedHandle> {
    parser: Parser,
    blocking_mode: BlockingMode,
    backend: Box<dyn StatelessDecoderBackend<Handle = T>>,
    negotiation_status: NegotiationStatus,
    coded_resolution: Resolution,
    ready_queue: Vec<T>,
    current_display_order: u64,
    last_picture: Option<T>,
    golden_ref_picture: Option<T>,
    alt_ref_picture: Option<T>,
}

Fields

parser: Parser

A parser to extract bitstream data and build frame data in turn

blocking_mode: BlockingMode

Whether the decoder should block on decode operations.

backend: Box<dyn StatelessDecoderBackend<Handle = T>>

The backend used for hardware acceleration.

negotiation_status: NegotiationStatus

Keeps track of whether the decoded format has been negotiated with the backend.

coded_resolution: Resolution

The current resolution

ready_queue: Vec<T>

A queue with the pictures that are ready to be sent to the client.

current_display_order: u64

A monotonically increasing counter used to tag pictures in display order

last_picture: Option<T>

The picture used as the last reference picture.

golden_ref_picture: Option<T>

The picture used as the golden reference picture.

alt_ref_picture: Option<T>

The picture used as the alternate reference picture.

Implementations

Create a new codec backend for VP8.

Replace a reference frame with handle.

Returns the ready handles.

Handle a single frame.

Trait Implementations

Decode the bitstream represented by timestamp. Returns zero or more decoded handles representing the decoded data. Read more
Flush the decoder i.e. finish processing all queued decode requests and emit frames for them. Read more
Whether negotiation of the decoded format is possible. In particular, a decoder will indicate that negotiation is possible after enough metadata is collected from parsing the bitstream through calls to the decode() method. Read more
Gets the number of output resources left in the backend after accounting for any buffers that might be queued in the decoder. Read more
Gets the number of output resources allocated by the backend.
Returns the current coded resolution of the bitstream being processed. This may be None if we have not read the stream parameters yet. Read more
Polls the decoder, emitting frames for all queued decode requests. This is similar to flush, but it does not change the state of the decoded picture buffer nor does it reset any internal state. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.