function make_sbs_input(chain, signal, deint, hq)
local input = chain:add_live_input(not deint, deint) -- Override bounce only if not deinterlacing.
input:connect_signal(signal)
- local wb_effect = chain:add_effect(WhiteBalanceEffect.new())
local resample_effect = nil
local resize_effect = nil
else
resize_effect = chain:add_effect(ResizeEffect.new())
end
+ local wb_effect = chain:add_effect(WhiteBalanceEffect.new())
local padding_effect = chain:add_effect(IntegralPaddingEffect.new())
local input, wb_effect, resample_effect, last
if live then
input = chain:add_live_input(false, deint)
- wb_effect = chain:add_effect(WhiteBalanceEffect.new())
input:connect_signal(signal)
- last = wb_effect
+ last = input
else
input = chain:add_effect(ImageInput.new("bg.jpeg"))
last = input
last = resample_effect
end
+ -- Make sure to put the white balance after the scaling (usually more efficient).
+ if live then
+ wb_effect = chain:add_effect(WhiteBalanceEffect.new())
+ last = wb_effect
+ end
+
return {
input = input,
wb_effect = wb_effect,
local input = chain:add_live_input(false, input_deint)
input:connect_signal(0) -- First input card. Can be changed whenever you want.
- local wb_effect = chain:add_effect(WhiteBalanceEffect.new())
- chain:finalize(hq)
local resample_effect, resize_effect
if scale then
end
end
+ local wb_effect = chain:add_effect(WhiteBalanceEffect.new())
+ chain:finalize(hq)
+
return {
chain = chain,
input = input,
-- API ENTRY POINT
-- Returns, given a channel number, which signal it corresponds to (starting from 0).
-- Should return -1 if the channel does not correspond to a simple signal.
+-- (The information is used for whether right-click on the channel should bring up
+-- an input selector or not.)
-- Called once for each channel, at the start of the program.
-- Will never be called for live (0) or preview (1).
function channel_signal(channel)
finish_transitions(t)
if live_signal_num == preview_signal_num then
+ -- No transitions possible.
return {}
end
return {"Cut"}
end
+-- API ENTRY POINT
+-- Called when the user clicks a transition button. For our case,
+-- we only do cuts, so we ignore the parameters; just switch live and preview.
function transition_clicked(num, t)
if num == 0 then
-- Cut.