Im printing out contents of a capture.list(), and ive managed to only print cameras with 10 fps like this:
String[] cameras = Capture.list();
String fps = "fps=10";
// String size = "size";
for (int i = 0; i < cameras.length; i++)
{
String cam = cameras[i];
String[] camSplit = split(cam, ',');
if(fps.equals(camSplit[2]) == true) {
print("camera " + i + ": ");
println(cameras[i]);
}
And this is the output:
camera 3: name=webcam2,size=1280x720,fps=10
camera 22: name=webcam2,size=1280x800,fps=10
camera 50: name=HP Truevision HD,size=1280x720,fps=10
There are: 57
is there a way to make it forget the others? so it would print out camera 1, 2 and 3 instead of 3, 22, 50?
any feedback would be grateful.