Warning: session_start(): open(/var/lib/php/sessions/sess_571oeq4ld2q1bidftsgj65uotg, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sclass OccasionalWebCam > DynSCP {
transient ImageSurface imageSurface;
transient Webcam cam;
JComponent visualize2() {
ret jcenteredbutton("Start", rThread startIt);
}
void startIt {
selectWebCam_withPreferred(vf selectCam);
}
void selectCam(Webcam cam) enter {
this.cam = cam;
print("Cam opened: " + cam.open()); // blocking mode (no background thread)
setComponent(jscroll(imageSurface = imageSurface()));
awtCalcEvery(imageSurface, 0.0, 10.0, r {
time "Get image from webcam" {
BufferedImage img = cam.getImage();
}
imageSurface.setImage(img);
});
}
void cleanMeUp {
if (cam != null) cam.close();
cam = null;
}
}