[vlc-commits] [Git][videolan/vlc][master] 2 commits: vout: trace drift
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Oct 31 07:22:49 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
abb6e135 by Thomas Guillem at 2022-10-31T06:55:39+00:00
vout: trace drift
Should be 0 except when late.
- - - - -
2e072643 by Thomas Guillem at 2022-10-31T06:55:39+00:00
aout: trace drift
Only valid if audio is not the master.
- - - - -
2 changed files:
- src/audio_output/dec.c
- src/video_output/video_output.c
Changes:
=====================================
src/audio_output/dec.c
=====================================
@@ -450,6 +450,10 @@ static void stream_HandleDrift(vlc_aout_stream *stream, vlc_tick_t drift,
return; /* cf. VLC_TICK_MAX comment in vlc_aout_stream_Play() */
struct vlc_tracer *tracer = aout_stream_tracer(stream);
+ if (tracer != NULL)
+ vlc_tracer_Trace(tracer, VLC_TRACE("type", "RENDER"),
+ VLC_TRACE("id", stream->str_id),
+ VLC_TRACE("drift", drift), VLC_TRACE_END);
/* Following calculations expect an opposite drift. Indeed,
* vlc_clock_Update() returns a positive relative time, corresponding to
=====================================
src/video_output/video_output.c
=====================================
@@ -1303,13 +1303,13 @@ static int RenderPicture(vout_thread_sys_t *sys, bool render_now)
vout_chrono_Stop(&sys->chrono.render);
+ struct vlc_tracer *tracer = GetTracer(sys);
system_now = vlc_tick_now();
if (!render_now)
{
const vlc_tick_t late = system_now - system_pts;
if (unlikely(late > 0))
{
- struct vlc_tracer *tracer = GetTracer(sys);
if (tracer != NULL)
vlc_tracer_TraceEvent(tracer, "RENDER", sys->str_id, "late");
msg_Dbg(vd, "picture displayed late (missing %"PRId64" ms)", MS_FROM_VLC_TICK(late));
@@ -1363,8 +1363,8 @@ static int RenderPicture(vout_thread_sys_t *sys, bool render_now)
/* Tell the clock that the pts was forced */
system_pts = VLC_TICK_MAX;
}
- vlc_clock_UpdateVideo(sys->clock, system_pts, pts, sys->rate,
- frame_rate, frame_rate_base);
+ vlc_tick_t drift = vlc_clock_UpdateVideo(sys->clock, system_pts, pts, sys->rate,
+ frame_rate, frame_rate_base);
/* Display the direct buffer returned by vout_RenderPicture */
vout_display_Display(vd, todisplay);
@@ -1377,6 +1377,11 @@ static int RenderPicture(vout_thread_sys_t *sys, bool render_now)
vout_statistic_AddDisplayed(&sys->statistic, 1);
+ if (tracer != NULL && system_pts != VLC_TICK_MAX)
+ vlc_tracer_TraceWithTs(tracer, system_pts, VLC_TRACE("type", "RENDER"),
+ VLC_TRACE("id", sys->str_id),
+ VLC_TRACE("drift", drift), VLC_TRACE_END);
+
return VLC_SUCCESS;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5ae2fbdce6f2e6af72d7ab1bead6e9d8c7fd1462...2e072643d40ebfd6c79e7d22d199d44707635e7f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5ae2fbdce6f2e6af72d7ab1bead6e9d8c7fd1462...2e072643d40ebfd6c79e7d22d199d44707635e7f
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