Skip to content
  • Thomas Guillem's avatar
    input: rework delay handling · 1f51e1d2
    Thomas Guillem authored
    The player is now the only one capable of changing the input delay. It doesn't
    have to wait for the input thread to get the actual delay. This fixes
    vlc_player_GetCategoryDelay() and the OSD returning/showing a previous delay
    (TOCTOU issue).
    
    "sub-delay" and "audio-desync" options are now handled by the player.
    
    es_out: p_sys->i_pts_delay is now the base delay (it doesn't include
    p_sys->i_pts_jitter delay).
    
    The extra pts delay handling is moved from input.c to es_out.c and renamed
    tracks_pts_delay. This paves the way for handling delay from multiple tracks of
    the same category: only EsOutGetExtraDelay() will need to handle that case.
    
    Delays are not set by an input control anymore but by a new function:
    input_SetCategoryDelay(). This function directly call the es_out control. It
    doesn't have to be called from the Mainloop thread (es out controls are locked).
    
    Maybe, it would be better to completely hide all input controls and let the
    input implementation decide if a control need to be handled from the MainLoop
    thread or can be handled directly.
    1f51e1d2