public class DroidCamDevice
extends com.github.sarxos.webcam.ds.ipcam.IpCamDevice
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CAM_NAME
Kameraname
|
| Constructor and Description |
|---|
DroidCamDevice(java.lang.String host,
int port)
Erstellt ein DroidCam Instance durch Angabe der IP und des Ports.
|
DroidCamDevice(java.net.URL url)
Erstellt ein DroidCam Instance durch Angabe der URL.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
getImage()
Liest ein Bild von der DroidCam.
|
boolean |
isOnline()
Pings the DroidCam URL.
|
public static final java.lang.String CAM_NAME
public DroidCamDevice(java.lang.String host,
int port)
throws java.net.MalformedURLException
host - Der Host des Streams. Kann auch IP-Adresse sein.port - Der Port des Streams.java.net.MalformedURLExceptionpublic DroidCamDevice(java.net.URL url)
url - Die URL zu dem mjpegfeed Stream der DroidCam App. Das Suffix mjpegfeed muss mit angegeben werden.public java.awt.image.BufferedImage getImage()
getImage in interface com.github.sarxos.webcam.WebcamDevicegetImage in class com.github.sarxos.webcam.ds.ipcam.IpCamDevicepublic boolean isOnline()
true if the response code
is in the 200-399 range.isOnline in class com.github.sarxos.webcam.ds.ipcam.IpCamDevicetrue if the given HTTP URL has returned response code 200-399 on a HEAD request within the
given TIMEOUT_PING, otherwise false.