[vlc-commits] [Git][videolan/vlc][master] 2 commits: pulse: use VLC_TICK_FROM_US

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Thu Jul 14 16:45:19 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
3141daae by Thomas Guillem at 2022-07-14T16:26:47+00:00
pulse: use VLC_TICK_FROM_US

- - - - -
9dfe4399 by Thomas Guillem at 2022-07-14T16:26:47+00:00
pulse: include the timestamp of the timing_info

To get more precise timing report.

Here is the result of pa_timeval_age(&ti->timestamp) for info:

125 us
109 us
124 us
67 us
109 us
142 us
103 us
83 us
152 us
130 us
122 us
138 us
74 us
135 us
81 us

- - - - -


1 changed file:

- modules/audio_output/pulse.c


Changes:

=====================================
modules/audio_output/pulse.c
=====================================
@@ -317,8 +317,16 @@ static void stream_latency_cb(pa_stream *s, void *userdata)
         {
             if (likely(rt >= sys->flush_rt))
             {
+                /* Subtract the timestamp of the timing_info from the monotonic
+                 * time */
+                const pa_timing_info *ti = pa_stream_get_timing_info(s);
+                pa_usec_t ti_age_us = pa_timeval_age(&ti->timestamp);
+                vlc_tick_t system_ts = vlc_tick_now()
+                                     - VLC_TICK_FROM_US(ti_age_us);
+
                 rt -= sys->flush_rt;
-                aout_TimingReport(aout, vlc_tick_now(), rt);
+
+                aout_TimingReport(aout, system_ts, VLC_TICK_FROM_US(rt));
             }
 #ifndef NDEBUG
             else



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9a463265369622727f91512731d94a128c5b9fb1...9dfe4399a0c00e469ceb9411e15e1835f1695859

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9a463265369622727f91512731d94a128c5b9fb1...9dfe4399a0c00e469ceb9411e15e1835f1695859
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