|
Bartosz Firyn (SarXos) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice
public class WebcamDefaultDevice
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.github.sarxos.webcam.WebcamDevice |
---|
WebcamDevice.BufferAccess |
Method Summary | |
---|---|
void |
close()
Close device, however it can be open again. |
void |
dispose()
Dispose device. |
BufferedImage |
getImage()
Fetch image from underlying camera. |
ByteBuffer |
getImageBytes()
Get image in form of raw bytes. |
String |
getName()
Get device name. |
Dimension |
getResolution()
Get currently set image size. |
Dimension[] |
getResolutions()
Get the list of all possible image resolutions. |
int |
getTimeout()
Get timeout for image acquisition. |
boolean |
isOpen()
Is webcam device open? |
void |
open()
Open device, it can be closed any time. |
void |
setFailOnSizeMismatch(boolean fail)
Determines if device should fail when requested image size is different than actually received. |
void |
setResolution(Dimension size)
Set new expected image size. |
void |
setTimeout(int timeout)
Set timeout for image acquisition. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getName()
WebcamDevice
getName
in interface WebcamDevice
public Dimension[] getResolutions()
WebcamDevice
getResolutions
in interface WebcamDevice
public Dimension getResolution()
WebcamDevice
getResolution
in interface WebcamDevice
public void setResolution(Dimension size)
WebcamDevice
setResolution
in interface WebcamDevice
size
- the size to be setpublic ByteBuffer getImageBytes()
WebcamDevice.BufferAccess
getImageBytes
in interface WebcamDevice.BufferAccess
public BufferedImage getImage()
WebcamDevice
getImage
in interface WebcamDevice
public void open()
WebcamDevice
open
in interface WebcamDevice
public void close()
WebcamDevice
close
in interface WebcamDevice
public void dispose()
WebcamDevice
dispose
in interface WebcamDevice
public void setFailOnSizeMismatch(boolean fail)
fail
- the fail on size mismatch flag, true or falsepublic boolean isOpen()
WebcamDevice
isOpen
in interface WebcamDevice
public int getTimeout()
public void setTimeout(int timeout)
timeout
- the timeout value in milliseconds
|
Bartosz Firyn (SarXos) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |