[vlc-commits] LUA: Aspect Ratio
Akash Mehrotra
git at videolan.org
Tue Aug 30 19:41:44 CEST 2011
vlc | branch: master | Akash Mehrotra <mehrotra.akash at gmail.com> | Sun Aug 7 18:51:50 2011 +0530| [8568f791efbcb3d502512cf9e3e28d737773eb91] | committer: Jean-Baptiste Kempf
LUA: Aspect Ratio
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8568f791efbcb3d502512cf9e3e28d737773eb91
---
share/lua/http/requests/README.txt | 4 ++++
share/lua/intf/modules/httprequests.lua | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index bdd0059..b9b2ae7 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -61,6 +61,10 @@ status.xml or status.json
> set playback rate. must be > 0
?command=rate&val=<newplaybackrate>
+> set aspect ratio. Must be one of the following values. Any other value will reset aspect ratio to default
+ ?command=aspectratio&val=<newratio>
+ Valid aspect ratio values: 1:1 , 4:3 , 5:4 , 16:9 , 16:10 , 221:100 , 235:100 , 239:100
+
> sort playlist using sort mode <val> and order <id>:
?command=pl_sort&id=<id>&val=<val>
If id=0 then items will be sorted in normal order, if id=1 they will be
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index c88b8b4..664ac1f 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -154,6 +154,10 @@ processcommands = function ()
if vlc.object.input() then
vlc.var.set(vlc.object.input(),"spu-delay",val)
end
+ elseif command == "aspectratio" then
+ if vlc.object.vout() then
+ vlc.var.set(vlc.object.vout(),"aspect-ratio",val)
+ end
end
local input = nil
@@ -360,9 +364,10 @@ local aout = vlc.object.aout()
s.rate=1
s.subtitledelay=0
end
-
if vout then
s.fullscreen=vlc.var.get(vout,"fullscreen")
+ s.aspectratio=vlc.var.get(vout,"aspect-ratio");
+ if s.aspectratio=="" then s.aspectratio = "default" end
else
s.fullscreen=0
end
More information about the vlc-commits
mailing list