IsVideoSignalDetected
function IsVideoSignalDetected (DetectConnexantBlueScreen: Boolean; DetectCustomRGB: Boolean; CustomR: LongInt; CustomG: LongInt; CustomB: LongInt; UseAsMaxValues: Boolean): Boolean;
bool __fastcall IsVideoSignalDetected(bool DetectConnexantBlueScreen, bool DetectCustomRGB, System::LongInt CustomR, System::LongInt CustomG, System::LongInt CustomB, bool UseAsMaxValues);
public bool IsVideoSignalDetected(bool DetectConnexantBlueScreen, bool DetectCustomRGB, int CustomR, int CustomG, int CustomB, bool UseAsMaxValues);
Public Function IsVideoSignalDetected(DetectConnexantBlueScreen As Boolean, DetectCustomRGB As Boolean, CustomR As Integer, CustomG As Integer, CustomB As Integer, UseAsMaxValues As Boolean) As Boolean
BOOL IsVideoSignalDetected (BOOL DetectConnexantBlueScreen, BOOL DetectCustomRGB, int CustomR, int CustomG, int CustomB, BOOL UseAsMaxValues);
Detects whether a video signal is present. Returns true if a video signal is detected, false if a blue screen or dark screen is detected (see below).
The function works in 2 ways, depending on the DetectConnexantBlueScreen and DetectCustomRGB parameters, which can be combined:
-
DetectConnexantBlueScreen enabled: the "classic blue screen" of the video capture boards with Conexant video chips, which corresponds to "no video signal", is detected (the function then returns false).
-
DetectCustomRGB enabled: the CustomR, CustomG and CustomB parameters specify the color values used to detect whether a video signal is present, according to the UseAsMaxValues parameter.
UseAsMaxValues, when DetectCustomRGB is enabled:
-
UseAsMaxValues disabled: the video signal is reported as "not detected" if all the pixels tested on the video frames have the exact RGB values specified in CustomR, CustomG and CustomB.
-
UseAsMaxValues enabled: the video signal is reported as "not detected" if all the pixels tested on the video frames have a lower value than the CustomR, CustomG and CustomB values specified.
Examples:
-
Conexant (BT8x8) cards: IsVideoSignalDetected (true, false, 0, 0, 0, false) returns false when the blue screen of the Conexant BT8x8 based cards is detected.
-
Techwell cards: IsVideoSignalDetected (false, true, 16, 16, 16, false) returns false when the black screen of the Techwell cards is detected.
-
Conexant as well as Techwell cards: IsVideoSignalDetected (true, true, 16, 16, 16, false) returns false when either the Conexant blue screen or the Techwell black screen is detected.
-
True black video: IsVideoSignalDetected (false, true, 0, 0, 0, false) returns false on a really black video (all RGB values = 0).
-
Detection of a dark ambient light: IsVideoSignalDetected (false, true, 30, 30, 30, true) returns false on a dark or black video (all RGB values below 30).