|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vigia.server.driver.camera.JMFCapture
public class JMFCapture
Field Summary | |
---|---|
private javax.media.util.BufferToImage |
bufferToImage
BufferToImage object |
private static java.lang.String |
CAP_DEVICE
Common name in WinXP/Vista |
private boolean |
closedDevice
closed device indication |
private javax.media.control.FrameGrabbingControl |
fg
FrameGrabbingControl object |
private static int |
MAX_TRIES
tries used while waiting for the BufferToImage object to be initialized |
private javax.media.Player |
p
Player object |
private boolean |
stateTransitionOK
used for waiting until the player has started |
private static int |
TRY_PERIOD
period used while waiting for the BufferToImage object to be initialized |
private java.lang.Object |
waitSync
used for waiting until the player has started |
Constructor Summary | |
---|---|
JMFCapture()
JMFCapture constructor |
Method Summary | |
---|---|
void |
close()
close() and grabImage() are synchronized so that it's not possible to close down the player while a frame is being snapped. |
void |
controllerUpdate(javax.media.ControllerEvent evt)
respond to events |
java.awt.image.BufferedImage |
grabImage()
Capture an image/frame. |
private boolean |
hasBufferToImage()
The BufferToImage object is initialized here, so that when grabImage() is called later, the snap can be quickly changed to an image. |
boolean |
isClosed()
is closed the device? |
private java.awt.image.BufferedImage |
makeBIM(java.awt.Image im)
Make a BufferedImage copy of im, assuming no alpha channel. |
private void |
waitForBufferToImage()
Wait for the BufferToImage object to be initialized. |
private boolean |
waitForStart()
wait for the player to enter its Started state |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String CAP_DEVICE
private static final int MAX_TRIES
private static final int TRY_PERIOD
private javax.media.Player p
private javax.media.control.FrameGrabbingControl fg
private javax.media.util.BufferToImage bufferToImage
private boolean closedDevice
private java.lang.Object waitSync
private boolean stateTransitionOK
Constructor Detail |
---|
public JMFCapture()
Method Detail |
---|
private boolean waitForStart()
private void waitForBufferToImage()
private boolean hasBufferToImage()
public java.awt.image.BufferedImage grabImage()
private java.awt.image.BufferedImage makeBIM(java.awt.Image im)
im
- Image object
public void close()
public boolean isClosed()
public void controllerUpdate(javax.media.ControllerEvent evt)
controllerUpdate
in interface javax.media.ControllerListener
ControllerListener.controllerUpdate(javax.media.ControllerEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |