mirror of https://github.com/mpv-player/mpv
player: use OSD formattin for DS on the terminal status line
This commit is contained in:
parent
828881816a
commit
a17d5e4bdd
|
@ -527,9 +527,10 @@ listed.
|
|||
this will indicate a problem. (``total-avsync-change`` property.)
|
||||
- Encoding state in ``{...}``, only shown in encoding mode.
|
||||
- Display sync state. If display sync is active (``display-sync-active``
|
||||
property), this shows ``DS: 1.002``, where the number is the speed change
|
||||
factor applied to audio to achieve sync to display (``audio-speed-correction``
|
||||
property). In sync modes which don't resample, this will always be ``1.000``.
|
||||
property), this shows ``DS: +0.02598%``, where the number is the speed change
|
||||
factor applied to audio to achieve sync to display, expressed in percent
|
||||
deviation from 1.0 (``audio-speed-correction`` property). In sync modes which
|
||||
don't resample, this will always be ``+0.00000%``.
|
||||
- Missed frames, e.g. ``Missed: 4``. (``vo-missed-frame-count`` property.) Shows
|
||||
up in display sync mode only. This is incremented each time a frame took
|
||||
longer to display than intended.
|
||||
|
|
|
@ -226,7 +226,11 @@ static void print_status(struct MPContext *mpctx)
|
|||
// VO stats
|
||||
if (mpctx->d_video) {
|
||||
if (mpctx->display_sync_active) {
|
||||
saddf(&line, " DS: %f", mpctx->speed_factor_a);
|
||||
char *f =
|
||||
mp_property_expand_string(mpctx, "${audio-speed-correction}");
|
||||
if (f)
|
||||
saddf(&line, " DS: %s", f);
|
||||
talloc_free(f);
|
||||
int64_t m = vo_get_missed_count(mpctx->video_out);
|
||||
if (m > 0)
|
||||
saddf(&line, " Missed: %"PRId64, m);
|
||||
|
|
Loading…
Reference in New Issue