Package edu.wpi.first.cscore
Class HttpCamera
java.lang.Object
edu.wpi.first.cscore.VideoSource
edu.wpi.first.cscore.VideoCamera
edu.wpi.first.cscore.HttpCamera
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AxisCamera
public class HttpCamera extends VideoCamera
A source that represents a MJPEG-over-HTTP (IP) camera.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpCamera.HttpCameraKind
Nested classes/interfaces inherited from class edu.wpi.first.cscore.VideoCamera
VideoCamera.WhiteBalance
Nested classes/interfaces inherited from class edu.wpi.first.cscore.VideoSource
VideoSource.ConnectionStrategy, VideoSource.Kind
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HttpCamera(String name, String url)
Create a source for a MJPEG-over-HTTP (IP) camera.HttpCamera(String name, String[] urls)
Create a source for a MJPEG-over-HTTP (IP) camera.HttpCamera(String name, String[] urls, HttpCamera.HttpCameraKind kind)
Create a source for a MJPEG-over-HTTP (IP) camera.HttpCamera(String name, String url, HttpCamera.HttpCameraKind kind)
Create a source for a MJPEG-over-HTTP (IP) camera. -
Method Summary
Modifier and Type Method Description HttpCamera.HttpCameraKind
getHttpCameraKind()
Get the kind of HTTP camera.static HttpCamera.HttpCameraKind
getHttpCameraKindFromInt(int kind)
Convert from the numerical representation of kind to an enum type.String[]
getUrls()
Get the URLs used to connect to the camera.void
setUrls(String[] urls)
Change the URLs used to connect to the camera.Methods inherited from class edu.wpi.first.cscore.VideoCamera
getBrightness, setBrightness, setExposureAuto, setExposureHoldCurrent, setExposureManual, setWhiteBalanceAuto, setWhiteBalanceHoldCurrent, setWhiteBalanceManual
Methods inherited from class edu.wpi.first.cscore.VideoSource
close, enumerateProperties, enumerateSinks, enumerateSources, enumerateVideoModes, equals, getActualDataRate, getActualFPS, getConfigJson, getDescription, getHandle, getKind, getKindFromInt, getLastFrameTime, getName, getProperty, getVideoMode, hashCode, isConnected, isEnabled, isValid, setConfigJson, setConnectionStrategy, setFPS, setPixelFormat, setResolution, setVideoMode, setVideoMode
-
Constructor Details
-
HttpCamera
Create a source for a MJPEG-over-HTTP (IP) camera.- Parameters:
name
- Source name (arbitrary unique identifier)url
- Camera URL (e.g. "http://10.x.y.11/video/stream.mjpg")
-
HttpCamera
Create a source for a MJPEG-over-HTTP (IP) camera.- Parameters:
name
- Source name (arbitrary unique identifier)url
- Camera URL (e.g. "http://10.x.y.11/video/stream.mjpg")kind
- Camera kind (e.g. kAxis)
-
HttpCamera
Create a source for a MJPEG-over-HTTP (IP) camera.- Parameters:
name
- Source name (arbitrary unique identifier)urls
- Array of Camera URLs
-
HttpCamera
Create a source for a MJPEG-over-HTTP (IP) camera.- Parameters:
name
- Source name (arbitrary unique identifier)urls
- Array of Camera URLskind
- Camera kind (e.g. kAxis)
-
-
Method Details
-
getHttpCameraKindFromInt
Convert from the numerical representation of kind to an enum type.- Parameters:
kind
- The numerical representation of kind- Returns:
- The kind
-
getHttpCameraKind
Get the kind of HTTP camera.Autodetection can result in returning a different value than the camera was created with.
- Returns:
- The kind of HTTP camera.
-
setUrls
Change the URLs used to connect to the camera.- Parameters:
urls
- Array of Camera URLs
-
getUrls
Get the URLs used to connect to the camera.- Returns:
- Array of camera URLs.
-