private FrameGrabbingControl frameGrabber;
public FrameGrab() throws IOException, NoDataSourceException {
// Create capture device
Vector devices = CaptureDeviceManager.getDeviceList(null);
CaptureDeviceInfo cdi = null;
for (Iterator i = devices.iterator(); i.hasNext();) {
cdi = (CaptureDeviceInfo) i.next();
/* Get the first Video For Windows (VFW) capture device.
* Use the JMF registry tool in the bin directory of the JMF
* distribution to detect available capture devices on your
* computer.
*/
if (cdi.getName().startsWith("vfw://0"))
break;
}
// start the Timer with 3s intervals
new Timer(3000, this).start();
MediaLocator ml = new MediaLocator("vfw://0");