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 size, int width, int height, int stride, PixelFormat pixelFormat)
Put a raw image and notify sinks.void
putFrame(RawFrame image)
Put a raw image and notify sinks.void
putFrame(ByteBuffer data, int width, int height, int stride, PixelFormat pixelFormat)
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
protected void putFrame(long data, int size, int width, int height, int stride, PixelFormat pixelFormat)Put a raw image and notify sinks.- Parameters:
data
- raw frame native data pointersize
- total size in byteswidth
- frame widthheight
- frame heightstride
- size of each row in bytespixelFormat
- pixel format
-
putFrame
Put a raw image and notify sinks.- Parameters:
data
- raw frame native ByteBufferwidth
- frame widthheight
- frame heightstride
- size of each row in bytespixelFormat
- pixel format
-