stats.lua: remove print_perfdata_passes

22a8b99 introduced print_perfdata_passes as a stopgap until a dedicated
performance stats page would be implemented. Since it has been
implemented for many years, remove this option, which isn't even
documented, and is likely to make the stats overflow beyond the screen.
This commit is contained in:
Guido Cella 2024-06-08 15:37:57 +02:00 committed by Kacper Michajłow
parent 73e779a1ee
commit 1a5edb1e49
1 changed files with 4 additions and 5 deletions

View File

@ -30,7 +30,6 @@ local o = {
redraw_delay = 1, -- acts as duration in the toggling case redraw_delay = 1, -- acts as duration in the toggling case
ass_formatting = true, ass_formatting = true,
persistent_overlay = false, -- whether the stats can be overwritten by other output persistent_overlay = false, -- whether the stats can be overwritten by other output
print_perfdata_passes = false, -- when true, print the full information about all passes
filter_params_max_length = 100, -- show one filter per line if list exceeds this length filter_params_max_length = 100, -- show one filter per line if list exceeds this length
show_frame_info = false, -- whether to show the current frame info show_frame_info = false, -- whether to show the current frame info
term_width_limit = -1, -- overwrites the terminal width term_width_limit = -1, -- overwrites the terminal width
@ -316,7 +315,7 @@ local function scroll_hint(search)
return format(" {\\fs%s}%s{\\fs%s}", font_size * 0.66, hint, font_size) return format(" {\\fs%s}%s{\\fs%s}", font_size * 0.66, hint, font_size)
end end
local function append_perfdata(header, s, dedicated_page, print_passes) local function append_perfdata(header, s, dedicated_page)
local vo_p = mp.get_property_native("vo-passes") local vo_p = mp.get_property_native("vo-passes")
if not vo_p then if not vo_p then
return return
@ -363,7 +362,7 @@ local function append_perfdata(header, s, dedicated_page, print_passes)
local data = vo_p[frame] local data = vo_p[frame]
local f = "%s%s%s{\\fn%s}%s / %s / %s %s%s{\\fn%s}%s%s%s" local f = "%s%s%s{\\fn%s}%s / %s / %s %s%s{\\fn%s}%s%s%s"
if print_passes then if dedicated_page then
s[#s+1] = format("%s%s%s:", o.nl, o.indent, s[#s+1] = format("%s%s%s:", o.nl, o.indent,
bold(frame:gsub("^%l", string.upper))) bold(frame:gsub("^%l", string.upper)))
@ -893,7 +892,7 @@ local function add_video_out(s)
append_property(s, "frame-drop-count", {suffix=" (output)", nl="", indent=""}) append_property(s, "frame-drop-count", {suffix=" (output)", nl="", indent=""})
end end
append_display_sync(s) append_display_sync(s)
append_perfdata(nil, s, false, o.print_perfdata_passes) append_perfdata(nil, s, false)
if mp.get_property_native("deinterlace-active") then if mp.get_property_native("deinterlace-active") then
append_property(s, "deinterlace", {prefix="Deinterlacing:"}) append_property(s, "deinterlace", {prefix="Deinterlacing:"})
@ -1153,7 +1152,7 @@ local function vo_stats()
local header, content = {}, {} local header, content = {}, {}
eval_ass_formatting() eval_ass_formatting()
add_header(header) add_header(header)
append_perfdata(header, content, true, true) append_perfdata(header, content, true)
header = {table.concat(header)} header = {table.concat(header)}
return finalize_page(header, content, true) return finalize_page(header, content, true)
end end