public class VideoSource extends java.lang.Object
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 |
---|---|
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() |
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) |
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()
Is 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.
|
protected int m_handle
protected VideoSource(int handle)
public static VideoSource.Kind getKindFromInt(int kind)
public void free()
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 VideoMode[] enumerateVideoModes()
public VideoSink[] enumerateSinks()
public static VideoSource[] enumerateSources()