[vlc-devel] [PATCH] video_output: rename next_system_pts

Alexandre Janniaux ajanni at videolabs.io
Thu Feb 4 09:23:04 UTC 2021


Hi,

I'm not sure system_current_pts is less confusing than
next_system_pts. Maybe a variation including the words
«system» to indicate the reference, and «deadline» to
indicate that the timestamp must be reached is better?

Maybe something like system_render_deadline ?

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Feb 04, 2021 at 09:46:50AM +0100, Steve Lhomme wrote:
> It is a confusing name as it's now the system PTS of displayed.current.
>
> Also rework the late test to be more readable.
> ---
>  src/video_output/video_output.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index 323b40c0846..cc24a74a5a7 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1521,13 +1521,12 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
>          }
>          else if (!paused)
>          {
> -            const vlc_tick_t next_system_pts =
> +            const vlc_tick_t system_current_pts =
>                  vlc_clock_ConvertToSystem(sys->clock, system_now,
>                                            sys->displayed.current->date, sys->rate);
> -            if (likely(next_system_pts != INT64_MAX))
> +            if (likely(system_current_pts != INT64_MAX))
>              {
> -                vlc_tick_t date_next = next_system_pts - render_delay;
> -                if (date_next <= system_now)
> +                if (system_now + render_delay >= system_current_pts)
>                  {
>                      // the current frame will be late, look for the next not late one
>                      next =
> --
> 2.29.2
>
> _______________________________________________
> 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