diff options
author | Sven Gothel <[email protected]> | 2023-10-15 19:02:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-10-15 19:02:32 +0200 |
commit | bd2aa98d57c0c03bbface35000ed1c4bac6470e2 (patch) | |
tree | ecb89e92162ef92680ad3db9b7772d66cdfc851c /src/test-native/contextRetargetDrawable02.c | |
parent | 2c80bb2e6eb12e155d747daf8a08362396d5e0fc (diff) |
Bug 1472: Enhance GLMediaPlayer AV Sync: Fine tune AV heuristics to (multiple of) audio_dequeued_ms
The case of lagging audio to the audio master-clock (by experience) is a rare and probably synthethic case
of the AV async videos, was
dt_a > MAX_VIDEO_ASYNC && d_apts > 0
now with increased threshold max_adelay = Math.max( 4*audio_dequeued_ms, 4*MAX_VIDEO_ASYNC )
dt_a > max_adelay && d_apts > 0
In conjunction the video-repeat case (video pts > SCR) shall use a higher threshold _when_
detecting, i.e. min1_audio_queued_ms = Math.max( 2*audio_dequeued_ms, 2*MAX_VIDEO_ASYNC )
to ensure enough buffered audio exists (2 audio-frames) before the next getNextTexture()
hits within vsync.
This early detection and min1_audio_queued_ms threshold
is double of the late threshold for video-repeat min0_audio_queued_ms = Math.max( audio_dequeued_ms, MAX_VIDEO_ASYNC ),
when the to-be repeated frame shall be displayed within getNextThreshold().
Failing this requirement (1 audio-frame) will discard it and gather the next video-frame,
allowing to fill the audio-buffer. A subsequent AV sync shall correct the difference.
Strategy is less intervention on less buffered-audio.
This shorter tolerance also reduces some video lag or stuttering on 24fps -> 60fps films.
Diffstat (limited to 'src/test-native/contextRetargetDrawable02.c')
0 files changed, 0 insertions, 0 deletions