public class WebcamUpdater
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Class and Description |
---|---|
static class |
WebcamUpdater.DefaultDelayCalculator
Default impl of DelayCalculator, based on TARGET_FPS.
|
static interface |
WebcamUpdater.DelayCalculator
Implementation of this interface is responsible for calculating the delay between 2 image
fetching, when the non-blocking (asynchronous) access to the webcam is enabled.
|
Modifier | Constructor and Description |
---|---|
protected |
WebcamUpdater(Webcam webcam)
Construct new webcam updater using DefaultDelayCalculator.
|
|
WebcamUpdater(Webcam webcam,
WebcamUpdater.DelayCalculator delayCalculator)
Construct new webcam updater.
|
Modifier and Type | Method and Description |
---|---|
double |
getFPS()
Return current FPS number.
|
java.awt.image.BufferedImage |
getImage()
Return currently available image.
|
protected boolean |
isImageNew() |
void |
run() |
void |
start()
Start updater.
|
void |
stop()
Stop updater.
|
protected WebcamUpdater(Webcam webcam)
webcam
- the webcam to which updater shall be attachedpublic WebcamUpdater(Webcam webcam, WebcamUpdater.DelayCalculator delayCalculator)
webcam
- the webcam to which updater shall be attacheddelayCalculator
- implementationpublic void start()
public void stop()
public void run()
run
in interface java.lang.Runnable
public java.awt.image.BufferedImage getImage()
protected boolean isImageNew()
public double getFPS()
Copyright © 2012-2018 Bartosz Firyn (SarXos). All Rights Reserved.