- local chain = get_sbs_chain(signals, t, width, height, input_resolution)
- 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
- return chain.chain, prepare
- elseif transition_type == FADE_TRANSITION then
- return get_fade_chain(signals, t, width, height, input_resolution)
- elseif is_plain_signal(live_signal_num) then
- local input_type = get_input_type(signals, live_signal_num)
- 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()
- chain.input:connect_signal(live_signal_num)
- set_scale_parameters_if_needed(chain, width, height)
- set_neutral_color_from_signal(chain.wb_effect, live_signal_num)
- prepare_overlay_live(chain, t, 1.0)
- end
- return chain.chain, prepare
- elseif live_signal_num == STATIC_SIGNAL_NUM then -- Static picture.
- local chain = static_chains[true]
- prepare = function()
- prepare_overlay_live(chain, t, 1.0) -- FIXME: Should this ever be here?
+ sbs_scene.input0.overlay.overlay_effect:enable_if(state.overlay_enabled)
+ prepare_sbs_scene(state, sbs_scene, 0.0, NO_TRANSITION, 0, SBS_SIGNAL_NUM, width, height, input_resolution, true)
+ prepare_overlay_live(state, sbs_scene, t, 1.0)
+ return sbs_scene.scene
+ elseif state.transition_type == FADE_TRANSITION then
+ return get_fade_scene(state, signals, t, width, height, input_resolution)
+ elseif is_plain_signal(state.live_signal_num) then
+ local overlay_really_enabled = state.overlay_enabled and simple_signal_has_overlay(state.live_signal_num)
+ if state.stinger_in_progress then
+ stinger_scene.overlay.overlay_effect:enable_if(overlay_really_enabled)
+ if state.live_signal_num == VIDEO_SIGNAL_NUM then
+ stinger_scene.input:display(iptv_video)
+ else
+ stinger_scene.input:display(state.live_signal_num)
+ end
+ set_scale_parameters_if_needed(stinger_scene, signals, state.live_signal_num, width, height, true)
+
+ stinger_scene.stinger_input:display(stinger_images[state.stinger_frame])
+ state.stinger_frame = state.stinger_frame + 1
+ if state.stinger_frame >= 25 then
+ state.stinger_in_progress = false
+ state.preview_signal_num = state.stinger_src_signal
+ state.live_signal_num = state.stinger_dst_signal
+
+ if state.stinger_dst_signal == VIDEO_SIGNAL_NUM then
+ -- Turn off the overlay when playing video.
+ state.stinger_save_overlay = state.overlay_enabled
+ state.overlay_enabled = false
+ else
+ -- Restore the state.
+ state.overlay_enabled = state.stinger_save_overlay
+ end
+ end
+
+ if overlay_really_enabled then
+ prepare_overlay_live(state, stinger_scene, t, 1.0)
+ end
+ return stinger_scene.scene
+ else
+ simple_scene.overlay.overlay_effect:enable_if(overlay_really_enabled)
+ if state.live_signal_num == VIDEO_SIGNAL_NUM then
+ simple_scene.input:display(iptv_video)
+ else
+ simple_scene.input:display(state.live_signal_num)
+ end
+ set_scale_parameters_if_needed(simple_scene, signals, state.live_signal_num, width, height, true)
+ prepare_overlay_live(state, simple_scene, t, 1.0)
+ return simple_scene.scene