OSC rendering used to be smooth (up to OSD rendering fps) before 48f906249ef359c66fc6c5bf4cc5885c8293bf8e, but after that commit the frame duration is hardcoded to 30 ms. This is too high and results in choppy OSC rendering, which is very noticeable with the progress bar while moving mouse over it or playing a short 60 fps video. This makes the duration an option so that it can be decreased to make OSC rendering smoother.
Unified · Split
| @@ -472,6 +472,12 @@ Configurable Options · 471 unmodified lines | |||
| 472 | 472 | ||
| 473 | Sets the colors of the elements that are being pressed or held down. | 473 | Sets the colors of the elements that are being pressed or held down. |
| 474 | 474 | ||
| 475 | ``tick_delay`` | ||
| 476 | Default: 1/60 | ||
| 477 | |||
| 478 | Sets the minimum interval between OSC redraws in seconds. This can be | ||
| 479 | decreased on fast systems to make OSC rendering smoother. | ||
| 480 | |||
| 475 | 481 | ||
| 476 | Script Commands | 482 | Script Commands |
| 477 | ~~~~~~~~~~~~~~~ | 483 | ~~~~~~~~~~~~~~~ |
| @@ -69,7 +69,9 @@ local user_opts = { · 68 unmodified lines | |||
| 69 | top_buttons_color = "#FFFFFF", -- color of top buttons | 69 | top_buttons_color = "#FFFFFF", -- color of top buttons |
| 70 | held_element_color = "#999999", -- color of an element while held down | 70 | held_element_color = "#999999", -- color of an element while held down |
| 71 | 71 | ||
| 72 | time_pos_outline_color = "#000000" -- color of the border timecodes in slimbox and TimePosBar | 72 | time_pos_outline_color = "#000000", -- color of the border timecodes in slimbox and TimePosBar |
| 73 | |||
| 74 | tick_delay = 1 / 60, -- minimum interval between OSC redraws in seconds | ||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | local osc_param = { -- calculated by osc_init() | 77 | local osc_param = { -- calculated by osc_init() |
| @@ -90,7 +92,7 @@ local margins_opts = { · 14 unmodified lines | |||
| 90 | {"b", "video-margin-ratio-bottom"}, | 92 | {"b", "video-margin-ratio-bottom"}, |
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | local tick_delay = 0.03 | 95 | local tick_delay = 1 / 60 |
| 94 | local tracks_osc = {} | 96 | local tracks_osc = {} |
| 95 | local tracks_mpv = {} | 97 | local tracks_mpv = {} |
| 96 | local window_control_box_width = 80 | 98 | local window_control_box_width = 80 |
| @@ -2980,6 +2982,7 @@ end · 2883 unmodified lines | |||
| 2980 | opt.read_options(user_opts, "osc", function() | 2982 | opt.read_options(user_opts, "osc", function() |
| 2981 | validate_user_opts() | 2983 | validate_user_opts() |
| 2982 | set_osc_styles() | 2984 | set_osc_styles() |
| 2985 | tick_delay = user_opts.tick_delay | ||
| 2983 | request_tick() | 2986 | request_tick() |
| 2984 | visibility_mode(user_opts.visibility, true) | 2987 | visibility_mode(user_opts.visibility, true) |
| 2985 | update_duration_watch() | 2988 | update_duration_watch() |