-- Nageru theme for TFK mini-tournament 2017, based on the default theme.
+local http_request = require("http.request")
+local cqueues = require("cqueues")
+local cq = cqueues.new()
+local futatabi_server = "http://gruessi.trd.sesse.net:9095"
+
local state = {
transition_start = -2.0,
transition_end = -1.0,
}
local NUM_CAMERAS = 6 -- Remember to update neutral_colors, too.
+-- Update the Futatabi status in the title.
+replay_title = "IPTV"
+cq:wrap(function()
+ while true do
+ local headers, stream = assert(http_request.new_from_uri(futatabi_server .. "/queue_status"):go())
+ replay_title = "IPTV"
+ if headers:get ":status" == "200" then
+ local body = assert(stream:get_body_as_string())
+ if body then
+ replay_title = "IPTV " .. body
+ end
+ end
+ end
+end)
+
-- Valid values for live_signal_num and preview_signal_num.
local INPUT0_SIGNAL_NUM = 0
local INPUT1_SIGNAL_NUM = 1
elseif signal_num == STATIC_SIGNAL_NUM then
return "Static picture"
elseif signal_num == VIDEO_SIGNAL_NUM then
- return "IPTV input"
+ return replay_title
elseif signal_num == OVERLAY_SIGNAL_NUM then
return "Overlay"
end
-- NOTE: The chain returned must be finalized with the Y'CbCr flag
-- if and only if num==0.
function get_chain(num, t, width, height, signals)
+ cq:loop(0)
+
local input_resolution = {}
for signal_num=0,(NUM_CAMERAS-1) do
local res = {