Menu Close

How Can We Help?

< Back
You are here:
Print

SetTextOverlay… vs OverlaySelector

In the older versions of the SDK the overlay index must be first selected with VideoGrabber.OverlaySelector before setting the value.
As this is not thread-safe it is now possible to address each overlay directly by its index with the VideoGrabber.SetTextOverlay…(index, value) or VideoGrabber.SetImageOverlay…(index, value).

E.g., this code:

VideoMonitor.TextOverlay_Selector = 0;
VideoMonitor.TextOverlay_String = “first overlay”;
VideoMonitor.TextOverlay_FontColor = 0xFFFF00;
VideoMonitor.TextOverlayEnabled = true;

VideoMonitor.TextOverlay_Selector = 1;
VideoMonitor.TextOverlay_String = “second overlay”;
VideoMonitor.TextOverlay_FontColor = 0x0A0A0A;
VideoMonitor.TextOverlayEnabled = true;

can be replaced by:

VideoMonitor.SetTextOverlay_String (0, “first overlay”);
VideoMonitor.SetTextOverlay_FontColor (0, 0xFFFF00);
VideoMonitor.SetTextOverlayEnabled (0, true);

VideoMonitor.SetTextOverlay_String (1, “second overlay”);
VideoMonitor.SetTextOverlay_FontColor (1, 0x0A0A0A);
VideoMonitor.SetTextOverlayEnabled (1, true);

Table of Contents