[vlc-commits] Lua RC: fix faster and slower commands

Rémi Denis-Courmont git at videolan.org
Wed Oct 5 16:28:06 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct  5 17:26:13 2016 +0300| [868592a421d5de6a7f394f423a2e5148e11de676] | committer: Rémi Denis-Courmont

Lua RC: fix faster and slower commands

(not sure if they ever worked)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=868592a421d5de6a7f394f423a2e5148e11de676
---

 share/lua/intf/cli.lua | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index d6d3001..3c58b87 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -488,11 +488,14 @@ function rate(name,client,value)
         vlc.var.set(input, "rate", common.us_tonumber(value))
     elseif name == "normal" then
         vlc.var.set(input,"rate",1)
-    else
-        vlc.var.set(input,"rate-"..name,nil)
     end
 end
 
+function rate_var(name,client,value)
+    local playlist = vlc.object.playlist()
+    vlc.var.trigger_callback(playlist,"rate-"..name)
+end
+
 function frame(name,client)
     vlc.var.trigger_callback(vlc.object.input(),"frame-next");
 end
@@ -566,8 +569,8 @@ commands_ordered = {
     { "pause"; { func = skip2(vlc.playlist.pause); help = "toggle pause" } };
     { "fastforward"; { func = setarg(common.hotkey,"key-jump+extrashort"); help = "set to maximum rate" } };
     { "rewind"; { func = setarg(common.hotkey,"key-jump-extrashort"); help = "set to minimum rate" } };
-    { "faster"; { func = rate; help = "faster playing of stream" } };
-    { "slower"; { func = rate; help = "slower playing of stream" } };
+    { "faster"; { func = rate_var; help = "faster playing of stream" } };
+    { "slower"; { func = rate_var; help = "slower playing of stream" } };
     { "normal"; { func = rate; help = "normal playing of stream" } };
     { "rate"; { func = rate; args = "[playback rate]"; help = "set playback rate to value" } };
     { "frame"; { func = frame; help = "play frame by frame" } };



More information about the vlc-commits mailing list