|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 driver| Method Detail |
|---|
public void addFrameListener(FrameListener frameListener)
Driver
addFrameListener in interface DriverframeListener - an implementation of the data listener.Driver.addFrameListener(org.vigia.shared.communications.FrameListener)public void addLogListener(LogListener logListener)
Driver
addLogListener in interface DriverlogListener - 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 Driverpan - pan movementtilt - tilt movementzoom - zoom movementpublic void goHome()
public void start()
start in interface DriverDriver.start()public void stop()
stop in interface DriverDriver.stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||