X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.lua;h=0f390f426aadb8503f374b0bca77046a73db4f56;hb=2b806ed340112b4b464b6f2b9c34e4873de5f1c5;hp=1243ad15de6be7cfb64d059969f958487de837f3;hpb=077cd176b7e56c31efb5c6a7315f701864c780a2;p=nageru diff --git a/theme.lua b/theme.lua index 1243ad1..0f390f4 100644 --- a/theme.lua +++ b/theme.lua @@ -313,6 +313,11 @@ end -- the output, although you can ignore them if you don't need them -- (they're useful if you want to e.g. know what to resample by). -- +-- is basically an exposed InputState, which you can use to +-- query for information about the signals at the point of the current +-- frame. In particular, you can call get_width() and get_height() +-- for any signal number, and use that to e.g. assist in chain selection. +-- -- You should return two objects; the chain itself, and then a -- function (taking no parameters) that is run just before rendering. -- The function needs to call connect_signal on any inputs, so that @@ -324,7 +329,7 @@ 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) +function get_chain(num, t, width, height, signals) if num == 0 then -- Live. if live_signal_num == INPUT0_SIGNAL_NUM or live_signal_num == INPUT1_SIGNAL_NUM then -- Plain input. prepare = function()