Package edu.wpi.first.cscore
Class CameraServerJNI
java.lang.Object
edu.wpi.first.cscore.CameraServerJNI
public class CameraServerJNI extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CameraServerJNI.Helper
static interface
CameraServerJNI.LoggerFunction
static class
CameraServerJNI.TelemetryKind
-
Constructor Summary
Constructors Constructor Description CameraServerJNI()
-
Method Summary
Modifier and Type Method Description static int
addListener(Consumer<VideoEvent> listener, int eventMask, boolean immediateNotify)
static int
addPolledListener(int poller, int eventMask, boolean immediateNotify)
static long
allocateRawFrame()
static void
cancelPollListener(int poller)
static int
copySink(int sink)
static int
copySource(int source)
static int
createHttpCamera(String name, String url, int kind)
static int
createHttpCameraMulti(String name, String[] urls, int kind)
static int
createListenerPoller()
static int
createMjpegServer(String name, String listenAddress, int port)
static int
createRawSink(String name)
static int
createRawSource(String name, int pixelFormat, int width, int height, int fps)
static int
createSourceProperty(int source, String name, int kind, int minimum, int maximum, int step, int defaultValue, int value)
static int
createUsbCameraDev(String name, int dev)
static int
createUsbCameraPath(String name, String path)
static void
destroyListenerPoller(int poller)
static int[]
enumerateSinkProperties(int sink)
static int[]
enumerateSinks()
static int[]
enumerateSourceProperties(int source)
static int[]
enumerateSources()
static int[]
enumerateSourceSinks(int source)
static VideoMode[]
enumerateSourceVideoModes(int source)
static UsbCameraInfo[]
enumerateUsbCameras()
static void
forceLoad()
Force load the library.static void
freeRawFrame(long frame)
static int
getCameraBrightness(int source)
static String[]
getEnumPropertyChoices(int property)
static String
getHostname()
static int
getHttpCameraKind(int source)
static String[]
getHttpCameraUrls(int source)
static String
getMjpegServerListenAddress(int sink)
static int
getMjpegServerPort(int sink)
static String[]
getNetworkInterfaces()
static int
getProperty(int property)
static int
getPropertyDefault(int property)
static int
getPropertyKind(int property)
static int
getPropertyMax(int property)
static int
getPropertyMin(int property)
static String
getPropertyName(int property)
static int
getPropertyStep(int property)
static String
getSinkConfigJson(int sink)
static String
getSinkDescription(int sink)
static String
getSinkError(int sink)
static int
getSinkKind(int sink)
static String
getSinkName(int sink)
static int
getSinkProperty(int sink, String name)
static int
getSinkSource(int sink)
static int
getSinkSourceProperty(int sink, String name)
static String
getSourceConfigJson(int source)
static String
getSourceDescription(int source)
static int
getSourceKind(int source)
static long
getSourceLastFrameTime(int source)
static String
getSourceName(int source)
static int
getSourceProperty(int source, String name)
static VideoMode
getSourceVideoMode(int source)
static String
getStringProperty(int property)
static double
getTelemetryAverageValue(int handle, int kind)
static double
getTelemetryAverageValue(int handle, CameraServerJNI.TelemetryKind kind)
static double
getTelemetryElapsedTime()
static long
getTelemetryValue(int handle, int kind)
static long
getTelemetryValue(int handle, CameraServerJNI.TelemetryKind kind)
static UsbCameraInfo
getUsbCameraInfo(int source)
static String
getUsbCameraPath(int source)
static long
grabSinkFrame(int sink, RawFrame rawFrame)
static long
grabSinkFrameTimeout(int sink, RawFrame rawFrame, double timeout)
static boolean
isSourceConnected(int source)
static boolean
isSourceEnabled(int source)
static void
notifySourceError(int source, String msg)
static VideoEvent[]
pollListener(int poller)
static VideoEvent[]
pollListenerTimeout(int poller, double timeout)
static void
putRawSourceFrame(int source, long data, int width, int height, int pixelFormat, int totalData)
static void
putRawSourceFrame(int source, RawFrame raw)
static void
putRawSourceFrameBB(int source, ByteBuffer data, int width, int height, int pixelFormat, int totalData)
static void
releaseSink(int sink)
static void
releaseSource(int source)
static void
removeListener(int handle)
static void
runMainRunLoop()
static int
runMainRunLoopTimeout(double timeoutSeconds)
static void
setCameraBrightness(int source, int brightness)
static void
setCameraExposureAuto(int source)
static void
setCameraExposureHoldCurrent(int source)
static void
setCameraExposureManual(int source, int value)
static void
setCameraWhiteBalanceAuto(int source)
static void
setCameraWhiteBalanceHoldCurrent(int source)
static void
setCameraWhiteBalanceManual(int source, int value)
static void
setHttpCameraUrls(int source, String[] urls)
static void
setLogger(CameraServerJNI.LoggerFunction func, int minLevel)
static void
setProperty(int property, int value)
static boolean
setSinkConfigJson(int sink, String config)
static void
setSinkDescription(int sink, String description)
static void
setSinkEnabled(int sink, boolean enabled)
static void
setSinkSource(int sink, int source)
static boolean
setSourceConfigJson(int source, String config)
static void
setSourceConnected(int source, boolean connected)
static void
setSourceConnectionStrategy(int source, int strategy)
static void
setSourceDescription(int source, String description)
static void
setSourceEnumPropertyChoices(int source, int property, String[] choices)
static boolean
setSourceFPS(int source, int fps)
static boolean
setSourcePixelFormat(int source, int pixelFormat)
static boolean
setSourceResolution(int source, int width, int height)
static boolean
setSourceVideoMode(int source, int pixelFormat, int width, int height, int fps)
static void
setStringProperty(int property, String value)
static void
setTelemetryPeriod(double seconds)
static void
setUsbCameraPath(int source, String path)
static void
stopMainRunLoop()
-
Constructor Details
-
CameraServerJNI
public CameraServerJNI()
-
-
Method Details
-
forceLoad
Force load the library.- Throws:
IOException
- if library load failed
-
getPropertyKind
-
getPropertyName
-
getProperty
-
setProperty
-
getPropertyMin
-
getPropertyMax
-
getPropertyStep
-
getPropertyDefault
-
getStringProperty
-
setStringProperty
-
getEnumPropertyChoices
-
createUsbCameraDev
-
createUsbCameraPath
-
createHttpCamera
-
createHttpCameraMulti
-
createRawSource
-
getSourceKind
-
getSourceName
-
getSourceDescription
-
getSourceLastFrameTime
-
setSourceConnectionStrategy
-
isSourceConnected
-
isSourceEnabled
-
getSourceProperty
-
enumerateSourceProperties
-
getSourceVideoMode
-
setSourceVideoMode
public static boolean setSourceVideoMode(int source, int pixelFormat, int width, int height, int fps) -
setSourcePixelFormat
-
setSourceResolution
-
setSourceFPS
-
setSourceConfigJson
-
getSourceConfigJson
-
enumerateSourceVideoModes
-
enumerateSourceSinks
-
copySource
-
releaseSource
-
setCameraBrightness
-
getCameraBrightness
-
setCameraWhiteBalanceAuto
-
setCameraWhiteBalanceHoldCurrent
-
setCameraWhiteBalanceManual
-
setCameraExposureAuto
-
setCameraExposureHoldCurrent
-
setCameraExposureManual
-
setUsbCameraPath
-
getUsbCameraPath
-
getUsbCameraInfo
-
getHttpCameraKind
-
setHttpCameraUrls
-
getHttpCameraUrls
-
putRawSourceFrameBB
public static void putRawSourceFrameBB(int source, ByteBuffer data, int width, int height, int pixelFormat, int totalData) -
putRawSourceFrame
public static void putRawSourceFrame(int source, long data, int width, int height, int pixelFormat, int totalData) -
putRawSourceFrame
-
notifySourceError
-
setSourceConnected
-
setSourceDescription
-
createSourceProperty
public static int createSourceProperty(int source, String name, int kind, int minimum, int maximum, int step, int defaultValue, int value) -
setSourceEnumPropertyChoices
-
createMjpegServer
-
createRawSink
-
getSinkKind
-
getSinkName
-
getSinkDescription
-
getSinkProperty
-
enumerateSinkProperties
-
setSinkConfigJson
-
getSinkConfigJson
-
setSinkSource
-
getSinkSourceProperty
-
getSinkSource
-
copySink
-
releaseSink
-
getMjpegServerListenAddress
-
getMjpegServerPort
-
setSinkDescription
-
grabSinkFrame
-
grabSinkFrameTimeout
-
getSinkError
-
setSinkEnabled
-
addListener
public static int addListener(Consumer<VideoEvent> listener, int eventMask, boolean immediateNotify) -
removeListener
-
createListenerPoller
-
destroyListenerPoller
-
addPolledListener
-
pollListener
- Throws:
InterruptedException
-
pollListenerTimeout
public static VideoEvent[] pollListenerTimeout(int poller, double timeout) throws InterruptedException- Throws:
InterruptedException
-
cancelPollListener
-
setTelemetryPeriod
-
getTelemetryElapsedTime
-
getTelemetryValue
-
getTelemetryValue
-
getTelemetryAverageValue
-
getTelemetryAverageValue
-
setLogger
-
enumerateUsbCameras
-
enumerateSources
-
enumerateSinks
-
getHostname
-
getNetworkInterfaces
-
allocateRawFrame
-
freeRawFrame
-
runMainRunLoop
-
runMainRunLoopTimeout
-
stopMainRunLoop
-