pub fn check_video_decoder_contract<D, F>(
make: F,
config: &CodecConfig,
packets: &[Packet],
) -> ConformanceExpand description
Verify a VideoDecoder against the session contract.
make builds a fresh decoder; config configures it; packets is a
valid stream for it. Checked:
- Receiving lazily (only when the decoder says
ReceivePending, then draining) and eagerly (after every packet) yields the same frames: timestamps, presentation flags and pixels. ReceivePendingleaves the packet untaken and is followed by aReady.end_inputis idempotent,EndOfStreamis stable, andsendafterend_inputisProtocolViolation::SendAfterEnd.- A packet from another configuration epoch is
ProtocolViolation::EpochMismatch. - A frame and a mapping of it stay valid while the decoder decodes more,
resets and is dropped; after
resetthe same packets decode to the same frames. - Behind
erase_video_decoder, a tripped stop isCancelled, every call after itFinished, untilreset.