edu.wpi.cscore

## Class UsbCamera

- java.lang.Object
- - edu.wpi.cscore.VideoSource
  - - edu.wpi.cscore.VideoCamera
    - - edu.wpi.cscore.UsbCamera

-     public class UsbCamera
      extends VideoCamera

  A source that represents a USB camera.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class edu.wpi.cscore.VideoCamera

      `VideoCamera.WhiteBalance`

    - ### Nested classes/interfaces inherited from class edu.wpi.cscore.VideoSource

      `VideoSource.Kind`

  - ### Field Summary

    - ### Fields inherited from class edu.wpi.cscore.VideoSource

      `m_handle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UsbCamera(java.lang.String name, int dev)` Create a source for a USB camera based on device number.
    `UsbCamera(java.lang.String name, java.lang.String path)` Create a source for a USB camera based on device path.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UsbCameraInfo[]` | `enumerateUsbCameras()` Enumerate USB cameras on the local system.
    `java.lang.String` | `getPath()` Get the path to the device.

    - ### Methods inherited from class edu.wpi.cscore.VideoCamera

      `getBrightness, setBrightness, setExposureAuto, setExposureHoldCurrent, setExposureManual, setWhiteBalanceAuto, setWhiteBalanceHoldCurrent, setWhiteBalanceManual`

    - ### Methods inherited from class edu.wpi.cscore.VideoSource

      `enumerateProperties, enumerateSinks, enumerateSources, enumerateVideoModes, equals, free, getDescription, getHandle, getKind, getKindFromInt, getLastFrameTime, getName, getProperty, getVideoMode, hashCode, isConnected, isValid, setFPS, setPixelFormat, setResolution, setVideoMode, setVideoMode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UsbCamera

          public UsbCamera(java.lang.String name,
                           int dev)

      Create a source for a USB camera based on device number.
      Parameters:
        `name` - Source name (arbitrary unique identifier)
        `dev` - Device number (e.g. 0 for /dev/video0)

    - #### UsbCamera

          public UsbCamera(java.lang.String name,
                           java.lang.String path)

      Create a source for a USB camera based on device path.
      Parameters:
        `name` - Source name (arbitrary unique identifier)
        `path` - Path to device (e.g. "/dev/video0" on Linux)

  - ### Method Detail

    - #### enumerateUsbCameras

          public static UsbCameraInfo[] enumerateUsbCameras()

      Enumerate USB cameras on the local system.
      Returns:
        Vector of USB camera information (one for each camera)

    - #### getPath

          public java.lang.String getPath()

      Get the path to the device.