end
local resample_effect, resize_effect
- if scale then
+ if input_scale then
if hq then
resample_effect = chain:add_effect(ResampleEffect.new())
else
-- and get_channel_resolution_raw() is that this one also can say that
-- there's no signal.
function get_channel_resolution(signal_num)
- res = last_resolution[signal_num]
+ local res = last_resolution[signal_num]
if (not res) or not res.is_connected then
return "disconnected"
end
local input1_type = get_input_type(signals, transition_dst_signal)
local input1_scale = needs_scale(signals, transition_dst_signal, width, height)
local chain = fade_chains[input0_type][input0_scale][input1_type][input1_scale][overlay_enabled][true]
- prepare = function()
+ local prepare = function()
if input0_type == "live" or input0_type == "livedeint" then
chain.input0.input:connect_signal(transition_src_signal)
end
if transition_type == ZOOM_TRANSITION then
-- Transition in or out of SBS.
local chain = get_sbs_chain(signals, t, width, height, input_resolution)
- prepare = function()
+ local prepare = function()
prepare_sbs_chain(chain, calc_zoom_progress(t), transition_type, transition_src_signal, transition_dst_signal, width, height, input_resolution)
prepare_overlay_live(chain, t, 1.0)
end
elseif transition_type == NO_TRANSITION and live_signal_num == SBS_SIGNAL_NUM then
-- Static SBS view.
local chain = get_sbs_chain(signals, t, width, height, input_resolution)
- prepare = function()
+ local prepare = function()
prepare_sbs_chain(chain, 0.0, NO_TRANSITION, 0, SBS_SIGNAL_NUM, width, height, input_resolution)
prepare_overlay_live(chain, t, 1.0)
end
local input_scale = needs_scale(signals, live_signal_num, width, height)
local overlay_really_enabled = overlay_enabled and simple_signal_has_overlay(live_signal_num)
local chain = simple_chains[input_type][input_scale][overlay_really_enabled][true]
- prepare = function()
+ local prepare = function()
if input_type ~= "video" then
chain.input:connect_signal(live_signal_num)
end
return chain.chain, prepare
elseif live_signal_num == STATIC_SIGNAL_NUM then -- Static picture.
local chain = static_chains[true]
- prepare = function()
+ local prepare = function()
prepare_overlay_live(chain, t, 1.0) -- FIXME: Should this ever be here?
end
return chain.chain, prepare
local input_type = get_input_type(signals, signal_num)
local input_scale = needs_scale(signals, signal_num, width, height)
local chain = simple_chains[input_type][input_scale][show_overlay][false]
- prepare = function()
+ local prepare = function()
if input_type ~= "video" then
chain.input:connect_signal(signal_num)
end
local input0_type = get_input_type(signals, INPUT0_SIGNAL_NUM)
local input1_type = get_input_type(signals, INPUT4_SIGNAL_NUM)
local chain = sbs_chains[input0_type][show_overlay][input1_type][false]
- prepare = function()
+ local prepare = function()
prepare_sbs_chain(chain, 0.0, NO_TRANSITION, 0, SBS_SIGNAL_NUM, width, height, input_resolution)
end
return chain.chain, prepare
end
if num == STATIC_SIGNAL_NUM + 2 then
local chain = static_chains[false]
- prepare = function()
+ local prepare = function()
prepare_overlay_static(chain, t)
end
return chain.chain, prepare
end
if num == OVERLAY_SIGNAL_NUM + 2 then
- prepare = function()
+ local prepare = function()
-- prepare_overlay(overlay_chain_lq, t)
end
return overlay_chain_lq, prepare
function prepare_overlay_live(chain, t, extra_alpha_factor)
if chain.overlay then
local tt = calc_fade_progress(t, overlay_transition_start, overlay_transition_end)
- overlay_alpha = overlay_alpha_src + tt * (overlay_alpha_dst - overlay_alpha_src)
+ local overlay_alpha = overlay_alpha_src + tt * (overlay_alpha_dst - overlay_alpha_src)
overlay_alpha = overlay_alpha * extra_alpha_factor
--print("overlay_alpha=" .. overlay_alpha .. " [" .. overlay_alpha_src .. "," .. overlay_alpha_dst .. "]@" .. tt)
if t > overlay_transition_end and overlay_alpha_dst == 0.0 then