Setting and retrieving the overlay properties

Prev

Next

 






































































































Graphic and text overlays

Description

TVideoGrabber includes build-in functions to manipulate text and image overlays.

Several text overlays or image overlays can be applied concurrently on the same video stream, each overlay is identified by its index, in the 0..n-1 range.
The indexes of the overlays are independent, it is possible to use a text overlay with index 0 and an image overlay with index 0 at the same time.

The overlays can be set in 2 ways:
- either by invoking SetOverlay_propertyname (index, value) or GetOverlay_propertyname (Index)
- either by setting the overlay index selector first, then setting or reading the property name

1. THE -STRAIGHT- FUNCTION WAY (recommended) e.g.:

VideoGrabber.SetTextOverlay_String (0, "first overlay");
VideoGrabber.SetTextOverlay_Left (0, 10);
VideoGrabber.SetTextOverly_Enabled (0, true);

VideoGrabber.SetTextOverlay_String (1, "2nd overlay");
VideoGrabber.SetTextOverlay_Left (1, 200);
VideoGrabber.SetTextOverly_Enabled (1, true);

Text overlays
- the text overlays can be set by invoking SetTextOverlay... (text overlay index, value) functions, e.g. SetTextOverlay_Enabled (0, true) for the 1st text overlay
- the text overlay properties can be read by invoking GetTextOverlay... (text overlay index) functions, e.g. GetTextOverlay_Left (3) for the 4th text overlay

Image overlays
- the image overlay settings can be set by invoking SetImageOverlay... (image overlay index, value) function, e.g. SetImageOverlay_Transparent (2, true) for the 3rd image overlay
- the image overlay settings can be read by invoking GetImageOverlay... (image overlay index) functions, e.g. GetIMageOverlay_TopLocation (1) for the 2nd image overlay)


2. THE "PROPERTIES" WAY (not recommended when using many overlays) e.g.:

VideoGrabber.TextOverlay_Selector = 0
VideoGrabber.TextOverlay_String = "first overlay"
VideoGrabber.TextOverlay_Left = 10
VideoGrabber.TextOverly_Enabled = true

VideoGrabber.TextOverlay_Selector = 1
VideoGrabber.TextOverlay_String = "2nd overlay"
VideoGrabber.TextOverlay_Left = 200
VideoGrabber.TextOverly_Enabled = true

Text overlays
The text overlays can be set and retrieved:
- by first setting the TextOverlay_Selector property
- then by setting or reading the TextOverlay_... properties, e.g. TextOverlay_Left

Image overlays
The image overlays can be set and retrieved:
- by first setting the ImageOverlaySelector property
- then by setting or reading the ImageOverlay_... properties, e.g. ImageOverlay_LeftLocation