Skip to main content

check_animation_streaming_output_honesty

Function check_animation_streaming_output_honesty 

Source
pub fn check_animation_streaming_output_honesty<E, D>(
    enc: E,
    dec: D,
    frames: &[TestImage],
) -> Conformance
Expand description

Verify the AnimationOutputTiming an animation encoder’s begin reports.

Runs begin with the frame count declared and without it. For each declaration that streams:

  • With the count declared, the lag is below the frame count.
  • Between any two points lag or more frames apart (after begin and after each frame but the last), bytes become pending. To verify a lag of L frames, supply more than L + 1 frames; fewer fails the check.
  • Draining everything after each frame, draining with take_output, and not draining all produce the same bytes, which decode to the same frames and durations as the encode without begin (so lossy codecs can run it).
  • A second begin is an error, and so is finishing after fewer frames than declared.
  • A refused begin leaves the encoder unchanged: when begin refuses a zero-width canvas, begin with the real canvas on the same encoder reports the same timing and streams the same file.

Skipped (returns Ok) when the encoder does not advertise animation. begin may decline with an UnsupportedOperation; any other error fails the check.