blob: ed9752f2be0ab1516cce629395a8a91ddedda621 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package edu.wpi.first.wpijavacv;
/**
* A class used to gather images from the robot's camera.
* @author Joe Grinstead and Greg Granito
*/
public class WPICamera extends WPIFFmpegVideo {
private static final int DEFAULT_ENDING_IP = 11;
public WPICamera(String loginName, String password, int team) {
this(loginName + ":" + password + "@10." + (team / 100) + "." + (team % 100) + "." + DEFAULT_ENDING_IP);
}
public WPICamera(int team) {
this("10." + (team / 100) + "." + (team % 100) + "." + DEFAULT_ENDING_IP);
}
public WPICamera(String loginName, String password, String ip) {
this(loginName + ":" + password + "@" + ip);
}
public WPICamera(String ip) {
super("http://" + ip + "/mjpg/video.mjpg");
}
}
|