Commit 8568f791 authored by Akash Mehrotra's avatar Akash Mehrotra Committed by Jean-Baptiste Kempf

LUA: Aspect Ratio

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 7f47ba06
...@@ -61,6 +61,10 @@ status.xml or status.json ...@@ -61,6 +61,10 @@ status.xml or status.json
> set playback rate. must be > 0 > set playback rate. must be > 0
?command=rate&val=<newplaybackrate> ?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>: > sort playlist using sort mode <val> and order <id>:
?command=pl_sort&id=<id>&val=<val> ?command=pl_sort&id=<id>&val=<val>
If id=0 then items will be sorted in normal order, if id=1 they will be If id=0 then items will be sorted in normal order, if id=1 they will be
......
...@@ -154,6 +154,10 @@ processcommands = function () ...@@ -154,6 +154,10 @@ processcommands = function ()
if vlc.object.input() then if vlc.object.input() then
vlc.var.set(vlc.object.input(),"spu-delay",val) vlc.var.set(vlc.object.input(),"spu-delay",val)
end end
elseif command == "aspectratio" then
if vlc.object.vout() then
vlc.var.set(vlc.object.vout(),"aspect-ratio",val)
end
end end
local input = nil local input = nil
...@@ -360,9 +364,10 @@ local aout = vlc.object.aout() ...@@ -360,9 +364,10 @@ local aout = vlc.object.aout()
s.rate=1 s.rate=1
s.subtitledelay=0 s.subtitledelay=0
end end
if vout then if vout then
s.fullscreen=vlc.var.get(vout,"fullscreen") s.fullscreen=vlc.var.get(vout,"fullscreen")
s.aspectratio=vlc.var.get(vout,"aspect-ratio");
if s.aspectratio=="" then s.aspectratio = "default" end
else else
s.fullscreen=0 s.fullscreen=0
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment