Commit a8b274e7 authored by Rob Jonson's avatar Rob Jonson Committed by Jean-Baptiste Kempf

add http commands to select title, chapter, subtitle track, audio track and video track

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit e0092fc5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1aa6fdb6
......@@ -149,6 +149,25 @@ Band 0: 60 Hz, 1: 170 Hz, 2: 310 Hz, 3: 600 Hz, 4: 1 kHz,
<Display the list of presets available for the equalizer
---
Commands available from API version 2
---
> select the title
?command=title&val=<val>
> select the chapter
?command=title&val=<val>
> select the audio track (use the number from the stream)
?command=audio_track&val=<val>
> select the video track (use the number from the stream)
?command=video_track&val=<val>
> select the sibtitle track (use the number from the stream)
?command=subtitle_track&val=<val>
playlist.xml or playlist.json:
=============
< get the full playlist tree
......
......@@ -177,6 +177,16 @@ processcommands = function ()
if val == '0' then vlc.equalizer.enable(false) else vlc.equalizer.enable(true) end
elseif command == "setpreset" then
vlc.equalizer.setpreset(val)
elseif command == "title" then
vlc.var.set(vlc.object.input(), "title", val)
elseif command == "chapter" then
vlc.var.set(vlc.object.input(), "chapter", val)
elseif command == "audio_track" then
vlc.var.set(vlc.object.input(), "audio-es", val)
elseif command == "video_track" then
vlc.var.set(vlc.object.input(), "video-es", val)
elseif command == "subtitle_track" then
vlc.var.set(vlc.object.input(), "spu-es", val)
end
local input = nil
......@@ -423,7 +433,7 @@ local aout = vlc.object.aout()
local s ={}
--update api version when new data/commands added
s.apiversion=1
s.apiversion=2
s.version=vlc.misc.version()
s.volume=vlc.volume.get()
......@@ -505,6 +515,10 @@ local aout = vlc.object.aout()
local tag = string.gsub(k,"_","")
s.stats[tag]=v
end
s.information.chapters=vlc.var.get_list(input, "chapter")
s.information.titles=vlc.var.get_list(input, "title")
end
return s
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