public class VideoSource
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
VideoSource.Kind |
Modifier and Type | Field and Description |
---|---|
protected int |
m_handle |
Modifier | Constructor and Description |
---|---|
protected |
VideoSource(int handle) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
VideoProperty[] |
enumerateProperties()
Enumerate all properties of this source.
|
VideoSink[] |
enumerateSinks()
Enumerate all sinks connected to this source.
|
static VideoSource[] |
enumerateSources()
Enumerate all existing sources.
|
VideoMode[] |
enumerateVideoModes()
Enumerate all known video modes for this source.
|
boolean |
equals(java.lang.Object other) |
void |
free()
Deprecated.
|
double |
getActualDataRate()
Get the data rate (in bytes per second).
|
double |
getActualFPS()
Get the actual FPS.
|
java.lang.String |
getDescription()
Get the source description.
|
int |
getHandle() |
VideoSource.Kind |
getKind()
Get the kind of the source.
|
static VideoSource.Kind |
getKindFromInt(int kind)
Convert from the numerical representation of kind to an enum type.
|
long |
getLastFrameTime()
Get the last time a frame was captured.
|
java.lang.String |
getName()
Get the name of the source.
|
VideoProperty |
getProperty(java.lang.String name)
Get a property.
|
VideoMode |
getVideoMode()
Get the current video mode.
|
int |
hashCode() |
boolean |
isConnected()
Returns if the source currently connected to whatever is providing the images.
|
boolean |
isValid() |
boolean |
setFPS(int fps)
Set the frames per second (FPS).
|
boolean |
setPixelFormat(VideoMode.PixelFormat pixelFormat)
Set the pixel format.
|
boolean |
setResolution(int width,
int height)
Set the resolution.
|
boolean |
setVideoMode(VideoMode.PixelFormat pixelFormat,
int width,
int height,
int fps)
Set the video mode.
|
boolean |
setVideoMode(VideoMode mode)
Set the video mode.
|
public static VideoSource.Kind getKindFromInt(int kind)
kind
- The numerical representation of kind@Deprecated public void free()
public void close()
close
in interface java.lang.AutoCloseable
public boolean isValid()
public int getHandle()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public VideoSource.Kind getKind()
public java.lang.String getName()
public java.lang.String getDescription()
public long getLastFrameTime()
public boolean isConnected()
public VideoProperty getProperty(java.lang.String name)
name
- Property namepublic VideoProperty[] enumerateProperties()
public VideoMode getVideoMode()
public boolean setVideoMode(VideoMode mode)
mode
- Video modepublic boolean setVideoMode(VideoMode.PixelFormat pixelFormat, int width, int height, int fps)
pixelFormat
- desired pixel formatwidth
- desired widthheight
- desired heightfps
- desired FPSpublic boolean setPixelFormat(VideoMode.PixelFormat pixelFormat)
pixelFormat
- desired pixel formatpublic boolean setResolution(int width, int height)
width
- desired widthheight
- desired heightpublic boolean setFPS(int fps)
fps
- desired FPSpublic double getActualFPS()
public double getActualDataRate()
public VideoMode[] enumerateVideoModes()
public VideoSink[] enumerateSinks()
public static VideoSource[] enumerateSources()