[vlc-devel] [PATCH] lua: http: Expose renderers
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Tue Aug 11 10:45:37 CEST 2020
---
share/lua/intf/modules/httprequests.lua | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 33f2836a00..fa829cba3d 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -27,7 +27,8 @@ module("httprequests",package.seeall)
local common = require ("common")
local dkjson = require ("dkjson")
-
+-- renderer discovery instance
+local vlcrd = nil
--Round the number to the specified precision
function round(what, precision)
@@ -187,6 +188,11 @@ processcommands = function ()
vlc.player.toggle_video_track(val)
elseif command == "subtitle_track" then
vlc.player.toggle_spu_track(val)
+ elseif command == "set_renderer" then
+ if not vlcrd then
+ return
+ end
+ vlcrd:select(id)
end
local input = nil
@@ -418,10 +424,14 @@ getstatus = function (includecategories)
local vout = vlc.object.vout()
local aout = vlc.object.aout()
+ if not vlcrd then
+ vlcrd = vlc.rd.create()
+ end
+
local s ={}
--update api version when new data/commands added
- s.apiversion=3
+ s.apiversion=4
s.version=vlc.misc.version()
s.volume=vlc.volume.get()
@@ -477,6 +487,8 @@ getstatus = function (includecategories)
s.equalizer.presets=vlc.equalizer.presets()
end
+ s.renderers = vlcrd:list()
+
if (includecategories and item) then
s.information={}
s.information.category={}
--
2.20.1
More information about the vlc-devel
mailing list