Package edu.wpi.first.cscore.raw
Class RawSource
java.lang.Object
edu.wpi.first.cscore.VideoSource
edu.wpi.first.cscore.ImageSource
edu.wpi.first.cscore.raw.RawSource
- All Implemented Interfaces:
AutoCloseable
public class RawSource extends ImageSource
A source for user code to provide video frames as raw bytes.
This is a complex API, most cases should use CvSource.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.cscore.VideoSource
VideoSource.ConnectionStrategy, VideoSource.Kind
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected void
putFrame(long data, int width, int height, int pixelFormat, int totalData)
Put a raw image and notify sinks.protected void
putFrame(long data, int width, int height, VideoMode.PixelFormat pixelFormat, int totalData)
Put a raw image and notify sinks.protected void
putFrame(RawFrame image)
Put a raw image and notify sinks.Methods inherited from class edu.wpi.first.cscore.ImageSource
createBooleanProperty, createIntegerProperty, createProperty, createStringProperty, notifyError, setConnected, setDescription, setEnumPropertyChoices
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
-
Method Details
-
putFrame
Put a raw image and notify sinks.- Parameters:
image
- raw frame image
-
putFrame
Put a raw image and notify sinks.- Parameters:
data
- raw frame data pointerwidth
- frame widthheight
- frame heightpixelFormat
- pixel formattotalData
- length of data in total
-
putFrame
protected void putFrame(long data, int width, int height, VideoMode.PixelFormat pixelFormat, int totalData)Put a raw image and notify sinks.- Parameters:
data
- raw frame data pointerwidth
- frame widthheight
- frame heightpixelFormat
- pixel formattotalData
- length of data in total
-