Package com.thegongoliers.input.vision
Class MultipleCameraServer
- java.lang.Object
-
- com.thegongoliers.input.vision.MultipleCameraServer
-
public class MultipleCameraServer extends java.lang.Object
A camera server which allows for swapping between multiple cameras (only one streams at a time)
-
-
Constructor Summary
Constructors Constructor Description MultipleCameraServer(java.lang.String name)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCamera(java.lang.String name, edu.wpi.cscore.VideoCamera camera)
Add a camera to the server.edu.wpi.cscore.VideoCamera
getCurrentCamera()
java.lang.String
getCurrentCameraName()
void
switchToCamera(java.lang.String name)
Switch the display to a different camera
-
-
-
Method Detail
-
addCamera
public void addCamera(java.lang.String name, edu.wpi.cscore.VideoCamera camera)
Add a camera to the server. If no camera is currently displayed, the passed in camera will be.- Parameters:
name
- the unique name of the cameracamera
- the camera to add
-
getCurrentCameraName
public java.lang.String getCurrentCameraName()
- Returns:
- the name of the current camera, or null if no camera is set.
-
getCurrentCamera
public edu.wpi.cscore.VideoCamera getCurrentCamera()
- Returns:
- the current camera, of null if no camera is set.
-
switchToCamera
public void switchToCamera(java.lang.String name)
Switch the display to a different camera- Parameters:
name
- the name of the camera to switch to
-
-