-- there's no signal.
function get_channel_resolution(signal_num)
res = last_resolution[signal_num]
- if (not res) or res.height <= 0 then
+ if (not res) or not res.is_connected then
+ return "disconnected"
+ end
+ if res.height <= 0 then
return "no signal"
end
if not res.has_signal then
-- 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.)
+-- Should return -1 if the channel does not correspond to a simple signal
+-- (one connected to a capture card, or a video input). The information is used for
+-- whether right-click on the channel should bring up a context menu or not,
+-- typically containing an input selector, resolution menu etc.
+--
-- 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)
width = signals:get_width(signal_num),
height = signals:get_height(signal_num),
interlaced = signals:get_interlaced(signal_num),
+ is_connected = signals:get_is_connected(signal_num),
has_signal = signals:get_has_signal(signal_num),
frame_rate_nom = signals:get_frame_rate_nom(signal_num),
frame_rate_den = signals:get_frame_rate_den(signal_num)