end
function input_info(name,client)
- local item = vlc.item()
+ local item = vlc.input.item()
+ if(item == nil) then return end
local categories = item:info()
for cat, infos in pairs(categories) do
client:append("+----[ "..cat.." ]")
end
function stats(name,client)
- local item = vlc.item()
+ local item = vlc.input.item()
+ if(item == nil) then return end
local stats_tab = item:stats()
client:append("+----[ begin of statistical info")
client:append("+-[Incoming]")
client:append("| input bytes read : "..string.format("%8.0f KiB",stats_tab["read_bytes"]/1024))
- client:append("| input bitrate : "..string.format("%6.0f kB/s",stats_tab["input_bitrate"]*8000))
+ client:append("| input bitrate : "..string.format("%6.0f kb/s",stats_tab["input_bitrate"]*8000))
client:append("| demux bytes read : "..string.format("%8.0f KiB",stats_tab["demux_read_bytes"]/1024))
- client:append("| demux bitrate : "..string.format("%6.0f kB/s",stats_tab["demux_bitrate"]*8000))
+ client:append("| demux bitrate : "..string.format("%6.0f kb/s",stats_tab["demux_bitrate"]*8000))
client:append("| demux corrupted : "..string.format("%5i",stats_tab["demux_corrupted"]))
client:append("| discontinuities : "..string.format("%5i",stats_tab["demux_discontinuity"]))
client:append("|")
end
function playlist_status(name,client)
- client:append( "( new input: " .. "FIXME" .. " )" )
+ local item = vlc.input.item()
+ if(item ~= nil) then
+ client:append( "( new input: " .. vlc.strings.decode_uri(item:uri()) .. " )" )
+ end
client:append( "( audio volume: " .. tostring(vlc.volume.get()) .. " )")
client:append( "( state " .. vlc.playlist.status() .. " )")
end
{ "chapter_p"; { func = titlechap_offset(-1); help = "previous chapter in current item" } };
{ "" };
{ "seek"; { func = seek; args = "X"; help = "seek in seconds, for instance `seek 12'" } };
- { "pause"; { func = setarg(common.hotkey,"key-play-pause"); help = "toggle pause" } };
+ { "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" } };