[vlc-commits] [Git][videolan/vlc][master] android: display: always call render_ts()

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat May 13 13:29:53 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
faaf9202 by Thomas Guillem at 2023-05-13T13:10:43+00:00
android: display: always call render_ts()

>From the Android documentation:

"""
if multiple buffers are sent to the Surface to be rendered at the same
VSYNC, the last one will be shown, and the other ones will be dropped.

if the timestamp is not "reasonably close" to the current system time,
the Surface will ignore the timestamp, and display the buffer at the
earliest feasible time. In this mode it will not drop frames.
"""

So, if the picture date is in the past, render_ts() will display it
immediately (unless a future picture with the same VSYNC is pushed just
after).

If the picture date is more than 1 seconds in the future, render_ts()
will behave like render().

- - - - -


1 changed file:

- modules/video_output/android/display.c


Changes:

=====================================
modules/video_output/android/display.c
=====================================
@@ -386,16 +386,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
 
     assert(picture->context);
     if (sys->avctx->render_ts != NULL)
-    {
-        vlc_tick_t now = vlc_tick_now();
-        if (date > now)
-        {
-            if (date - now <= VLC_TICK_FROM_SEC(1))
-                sys->avctx->render_ts(picture->context, date);
-            else /* The picture will be displayed from the Display callback */
-                msg_Warn(vd, "picture way too early to release at time");
-        }
-    }
+        sys->avctx->render_ts(picture->context, date);
 
     if (sys->sub.window != NULL)
         subpicture_Prepare(vd, subpicture);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/faaf92022979b62728f884fe80d3bcf73a232032

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/faaf92022979b62728f884fe80d3bcf73a232032
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list