Showing the changes to TOOLS/lua (1 of 2 files). Show all
Unified · Split
| @@ -15,10 +15,10 @@ · 14 unmodified lines | ||
| 15 | 15 | -- TODO: It might make sense to use hardware assisted vdpaupp=pullup, |
| 16 | 16 | -- if available, but I don't have hardware to test it. Patch welcome. |
| 17 | 17 | |
| 18 | −script_name = mp.get_script_name() | |
| 19 | −pullup_label = string.format("%s-pullup", script_name) | |
| 18 | +local script_name = mp.get_script_name() | |
| 19 | +local pullup_label = string.format("%s-pullup", script_name) | |
| 20 | 20 | |
| 21 | −function pullup_on() | |
| 21 | +local function pullup_on() | |
| 22 | 22 | for _, vf in pairs(mp.get_property_native('vf')) do |
| 23 | 23 | if vf['label'] == pullup_label then |
| 24 | 24 | return "yes" |
| @@ -27,7 +27,7 @@ function pullup_on() · 2 unmodified lines | ||
| 27 | 27 | return "no" |
| 28 | 28 | end |
| 29 | 29 | |
| 30 | −function do_cycle() | |
| 30 | +local function do_cycle() | |
| 31 | 31 | if pullup_on() == "yes" then |
| 32 | 32 | -- if pullup is on remove it |
| 33 | 33 | mp.command(string.format("vf del @%s:pullup", pullup_label)) |
| @@ -44,7 +44,7 @@ function do_cycle() · 10 unmodified lines | ||
| 44 | 44 | end |
| 45 | 45 | end |
| 46 | 46 | |
| 47 | −function cycle_deinterlace_pullup_handler() | |
| 47 | +local function cycle_deinterlace_pullup_handler() | |
| 48 | 48 | do_cycle() |
| 49 | 49 | -- independently determine current state and give user feedback |
| 50 | 50 | mp.osd_message(string.format("deinterlace: %s\n".. |