pub enum DecoderEvent {
ProvidePictureBuffers {
min_num_buffers: u32,
width: i32,
height: i32,
visible_rect: Rect,
},
PictureReady {
picture_buffer_id: i32,
timestamp: u64,
},
NotifyEndOfBitstreamBuffer(u32),
NotifyError(VideoError),
FlushCompleted(Result<(), VideoError>),
ResetCompleted(Result<(), VideoError>),
}Variants§
ProvidePictureBuffers
Emitted when the device knows the buffer format it will need to decode frames, and how many
buffers it will need. The decoder is supposed to call set_output_parameters() to confirm
the pixel format and actual number of buffers used, and provide buffers of the requested
dimensions using use_output_buffer().
PictureReady
Emitted when the decoder is done decoding a picture. picture_buffer_id
corresponds to the argument of the same name passed to use_output_buffer()
or reuse_output_buffer(). bitstream_id corresponds to the argument of
the same name passed to decode() and can be used to match decoded frames
to the input buffer they were produced from.
NotifyEndOfBitstreamBuffer(u32)
Emitted when an input buffer passed to decode() is not used by the
device anymore and can be reused by the decoder. The parameter corresponds
to the timestamp argument passed to decode().
NotifyError(VideoError)
Emitted when a decoding error has occured.
FlushCompleted(Result<(), VideoError>)
Emitted after flush() has been called to signal that the flush is completed.
ResetCompleted(Result<(), VideoError>)
Emitted after reset() has been called to signal that the reset is completed.