Skip to content
  • Steve Lhomme's avatar
    fps: implement draining of extra pictures · d9c7e949
    Steve Lhomme authored
    The p_previous_pic keeps the picture that was returned by Filter(), which is
    the basis for the extra pictures created during the drain, by incrementing by
    one "framerate tick" each output. We need to keep a reference as the output
    picture might be released by the caller, before the drain is called.
    
    We keep the original date of the incoming picture so we can compare to the
    "framerate" ticks to know if we need extra pictures or not.
    
    When expanding the frame rate, we have the following output:
    - pic0 -> original date
           -> original date + tick 1
    - pic1 -> original date + tick 2
           -> original date + tick 3
    - pic2 -> original date + tick 4
           -> original date + tick 5
    
    The date of the incoming picture is always included in the last output
    frame date + duration.
    
    The code assumes that enough drain calls will be done until the next filter
    call. (A flush in between is good as well)
    
    We no longer return pictures chained using vlc_picture_chain_AppendChain().
    d9c7e949