Setting and retrieving the overlay properties
TVideoGrabber includes built-in functions to manipulate text and image overlays.
Several text overlays or image overlays can be applied concurrently to the same video stream. Each overlay is identified by its index, in the 0..n-1 range: index 0 for the 1st overlay, index 1 for the 2nd overlay, etc.
The indexes of the overlays are independent: a text overlay with index 0 and an image overlay with index 0 can be used at the same time.
The overlay settings are set by invoking Set...Overlay_propertyname (Index, Value) and read by invoking Get...Overlay_propertyname (Index). The resources of an overlay are allocated the first time its index is used.
E.g.:
// 1st text overlay (index 0)
VideoGrabber.SetTextOverlay_String (0, "first overlay");
VideoGrabber.SetTextOverlay_Left (0, 10);
VideoGrabber.SetTextOverlay_Enabled (0, true);
// 2nd text overlay (index 1)
VideoGrabber.SetTextOverlay_String (1, "2nd overlay");
VideoGrabber.SetTextOverlay_Left (1, 200);
VideoGrabber.SetTextOverlay_Enabled (1, true);
Text overlays
- The text overlay settings are set by invoking the SetTextOverlay... (text overlay index, value) functions, e.g. SetTextOverlay_Enabled (0, true) for the 1st text overlay (index 0).
- The text overlay settings are read by invoking the GetTextOverlay... (text overlay index) functions, e.g. GetTextOverlay_Left (3) for the 4th text overlay (index 3).
Image overlays
- The image overlay settings are set by invoking the SetImageOverlay... (image overlay index, value) functions, e.g. SetImageOverlay_Transparent (2, true) for the 3rd image overlay (index 2).
- The image overlay settings are read by invoking the GetImageOverlay... (image overlay index) functions, e.g. GetImageOverlay_TopLocation (1) for the 2nd image overlay (index 1).
See Text overlays and Image overlays for the complete list of the text and image overlay functions.