Class VideoListener

java.lang.Object
edu.wpi.first.cscore.VideoListener
All Implemented Interfaces:
AutoCloseable

public class VideoListener
extends Object
implements AutoCloseable
An event listener. This calls back to a desigated callback function when an event matching the specified mask is generated by the library.
  • Constructor Details

    • VideoListener

      public VideoListener​(Consumer<VideoEvent> listener, int eventMask, boolean immediateNotify)
      Create an event listener.
      Parameters:
      listener - Listener function
      eventMask - Bitmask of VideoEvent.Type values
      immediateNotify - Whether callback should be immediately called with a representative set of events for the current library state.
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isValid

      public boolean isValid()
      Returns true if the video listener handle is valid.
      Returns:
      True if the video listener handle is valid.