|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vigia.server.driver.camera.CameraDriver
public class CameraDriver
The camera driver class
Nested Class Summary | |
---|---|
protected class |
CameraDriver.FrameThread
Thread to get the frames from the camera |
Field Summary | |
---|---|
private JMFCapture |
camera
JMFCapture object (webcam) |
private int |
currentXPos
Current XPos of the camera |
private int |
currentYPos
Current YPos of the camera |
private static int |
DELAY
Delay between frames |
private java.awt.image.BufferedImage |
frame
current frame |
protected java.util.Set<FrameListener> |
frameListeners
List of camera's frame listeners |
protected CameraDriver.FrameThread |
fThread
The tread that grabs the frames |
private int |
imageCount
count of images (frames) |
protected java.util.Set<LogListener> |
logListeners
List of camera's log listeners |
private int |
m_Port
Server's port |
private java.lang.String |
m_Server
Server's IP address |
private boolean |
stop
If true the camera's thread will stop |
private long |
totalTime
total time of capturing period |
Constructor Summary | |
---|---|
CameraDriver()
CameraDriver class constructor |
|
CameraDriver(java.lang.String server,
int port)
CameraDriver class constructor |
Method Summary | |
---|---|
void |
addFrameListener(FrameListener frameListener)
Adds a listener to obtain the frames from the camera. |
void |
addLogListener(LogListener logListener)
Adds a listener to obtain control messages from the camera. |
void |
goHome()
Go to home position |
void |
move(int pan,
int tilt,
int zoom)
Move to relative position (pan,tilt) and zoom |
void |
start()
Start to capture frames from the camera |
void |
stop()
Stop to capture frames from the camera |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<FrameListener> frameListeners
protected java.util.Set<LogListener> logListeners
private java.lang.String m_Server
private int m_Port
private int currentXPos
private int currentYPos
private static final int DELAY
private boolean stop
private JMFCapture camera
private int imageCount
private long totalTime
private java.awt.image.BufferedImage frame
protected CameraDriver.FrameThread fThread
Constructor Detail |
---|
public CameraDriver()
public CameraDriver(java.lang.String server, int port) throws CameraDriverException
server
- server IP addressport
- server HTTP port
CameraDriverException
- exception creating the camera driverMethod Detail |
---|
public void addFrameListener(FrameListener frameListener)
Driver
addFrameListener
in interface Driver
frameListener
- an implementation of the data listener.Driver.addFrameListener(org.vigia.shared.communications.FrameListener)
public void addLogListener(LogListener logListener)
Driver
addLogListener
in interface Driver
logListener
- an implementation of the control listener.Driver.addLogListener(org.vigia.shared.communications.LogListener)
public void move(int pan, int tilt, int zoom)
move
in interface Driver
pan
- pan movementtilt
- tilt movementzoom
- zoom movementpublic void goHome()
public void start()
start
in interface Driver
Driver.start()
public void stop()
stop
in interface Driver
Driver.stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |