hi,
i'm using jmf to capture a webcam.
It works good when I use an extern (USB) webcam,
but when I use the webcam from my laptop it gives this error:
(it's an runtime error)

java.io.IOException: Could not connect to capture device
20-feb-2010 11:15:23 webcam.Main play
SEVERE: null
javax.media.NoDataSourceException: Error instantiating class: com.sun.media.protocol.vfw.DataSource : java.io.IOException: Could not connect to capture device
at javax.media.Manager.createDataSource(Manager.java: 1012)


this is the operation that creates the error:

private Vector<DataSource> getDataSources() throws IOException, NoDataSourceException {
Vector<DataSource> dataSources = new Vector<DataSource>();
//alle checkboxen overlopen en kijken welk apparaat ingeschakeld moet worden
for(int i=0; i<checkBoxDeviceList.size(); i++) {
if(checkBoxDeviceList.elementAt(i).isSelected()) {
//sourcemedialocator van het apparaat bepalen
String deviceName = checkBoxDeviceList.get(i).getText();
MediaLocator sourceMediaLocator = null;
Vector deviceList = getDeviceList();
int index=0;
while(index<deviceList.size() &&
!((CaptureDeviceInfo)deviceList.elementAt(index)). getName().equals(deviceName)) {
index++;
}
if(index<deviceList.size()) {
sourceMediaLocator = ((CaptureDeviceInfo)deviceList.elementAt(index)).g etLocator();
}

DataSource dataSource = Manager.createDataSource(sourceMediaLocator);
//dataSource = Manager.createCloneableDataSource(dataSource);

dataSources.add(dataSource);
}
}
return dataSources;
}