This implementation supports the use of an 'overlay' window that will track the video surface position and size. Such an overlay could be used to paint custom graphics over the top of the video.
The overlay window should be non-opaque - support for this depends on the JVM, desktop window manager and graphics device hardware and software.
The overlay also has some significant limitations, it is a component that covers the video surface component and will prevent mouse and keyboard events from being processed by the video surface. Workarounds to delegate the mouse and keyboard events to the underlying Canvas may be possible but that is a responsibility of the overlay component itself and not these bindings.
The overlay will also 'lag' the main application frame when the frame is dragged - the event used to track the frame position does not fire until after the window drag operation has completed (i.e. the mouse pointer is released).
A further limitation is that the overlay will not appear when full-screen exclusive mode is used - if an overlay is required in full-screen mode then the full-screen mode must be simulated (by re-sizing the main window, removing decorations and so on).
If an overlay is used, then because the window is required to be non-opaque then it will appear in front of all other desktop windows, including application dialog windows. For this reason, it may be necessary to disable the overlay while displaying dialog boxes, or when the window is deactivated.
The overlay implementation in this class simply keeps a supplied window in sync with the video surface. It is the responsibility of the client application itself to supply an appropriate overlay component.
Finally, the overlay is experimental and support for the overlay may be changed or removed.
|
|