[vlc-devel] [PATCH 00/17] clock: add back the input (PCR) source

Thomas Guillem thomas at gllm.fr
Wed Feb 17 12:43:06 UTC 2021


OK to push if I drop patches 2, 3, 4, 5 and 6, and return system_now (the system time given by the user) if the point can't be calculated (due to a reset) ?

It's only temporary since I plan to fix this issue (dropping clock references that are still used).

On Mon, Feb 15, 2021, at 11:14, Thomas Guillem wrote:
> Hello,
> 
> Branch available here:
> https://code.videolan.org/tguillem/vlc/-/merge_requests/8 (comments on
> gitlab are welcome too)
> 
> This patch set restore the VLC 3.0 clock behavior when using
> --clock-master=1.
> 
> The option 1 was for MONOTONIC, it's now used for INPUT.
> 
> This option can be used by advanced users that want to use the INPUT as
> the master and have all ES adapting their pace to the input (by
> resampling, dropping frames, displaying faster...).
> 
> When there is no master ES (so no audio enabled), the default master
> source will now be the INPUT source. Therefore, the VIDEO ES will adapt
> its pace to the input. Favoring VIDEO or input  in that case can be
> discussed. We can still add another option in --clock-master to always
> have an output as the master (and avoid modifying the output to adapt to
> the input).
> 
> The input_clock.c that receive PCR points from the demuxer will now be a
> client of the new vlc_main_clock_t API. It will be considered as master
> vlc_clock_t, like the active audio ES.
> 
> Next input/clock patch set to follow:
> 
>  - Fix normal_time handling: only implemented for the ts (and wrongly),
>    pass it directly from the demux to the clocks to the player (and not
>    passing by the input_thread_t)
> 
>  - Fix input discontinuities handling. When the clock is reset from the
>    input (in case of discontinuities), outputs ES can't convert their
>    "reset" pts anymore. To address this issue, keep the last clock
>    reference when it is reset from the input. This past reference will
>    be kept until all outputs acknowledge (by calling vlc_clock_Reset()
>    on their side). This will allow output ES to continue outputting
>    frames while the input is reset.
> 
> Best regards,
> Thomas
> 
> Thomas Guillem (17):
>   player: timer: don't use negative length
>   clock: allow to return VLC_TICK_INVALID from convert calls
>   vout: spu: don't return empty arrays
>   vout: spu: handle when the vlc_clock is reset
>   vout: handle when the vlc_clock is reset
>   aout: handle when the vlc_clock is reset
>   clock: add vlc_clock_main_CreateInput()
>   es_out: use the input_clock as a master source of vlc_clock
>   clock: remove monotonic fallback
>   clock: remove vlc_clock_main_SetFirstPcr
>   clock: remove vlc_clock_main_SetInputDejitter
>   clock: remove vlc_clock_main_Reset
>   input: send input clock points to the player
>   player/timer: rename best_source to master_source
>   player/timer: rename last_ts to last_video_ts
>   core: rename clock source option
>   player: timer: send more update points during startup
> 
>  src/audio_output/dec.c              |  13 +-
>  src/clock/clock.c                   | 205 ++++++++++------------------
>  src/clock/clock.h                   |  33 +++--
>  src/clock/input_clock.c             |  31 ++++-
>  src/clock/input_clock.h             |   6 +-
>  src/input/es_out.c                  |  78 +++++++----
>  src/input/event.h                   |   4 +-
>  src/input/input_internal.h          |   1 -
>  src/libvlc-module.c                 |   4 +-
>  src/player/input.c                  |   7 +-
>  src/player/player.h                 |  14 +-
>  src/player/timer.c                  | 188 ++++++++++++++-----------
>  src/video_output/video_output.c     |  47 +++++--
>  src/video_output/vout_subpictures.c |  27 +++-
>  test/src/player/player.c            |  31 +----
>  15 files changed, 376 insertions(+), 313 deletions(-)
> 
> -- 
> 2.30.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list